home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / sysutl / err_ret.arc / ERR_RET.DOC < prev    next >
Text File  |  1989-09-21  |  2KB  |  46 lines

  1. ERR_RET, last modified 9/20/89.
  2.  
  3.     There have been many times that I wanted to know what error
  4. level a program returned when it terminated. The only way that I am
  5. aware of to determine this is to set up a series of tests within a 
  6. batch file. This can be very cumbersome, especially if any of the 255
  7. possible values might be returned. I have never seen a utility that
  8. will run another program and report the returned error level. This is
  9. a shame as there are many utilities that use this facility to report
  10. system parameters or errors and a simple way to test them is needed.
  11. Some of the programs I am writing are designed to be called by another
  12. program and to return some status information via the error level. This
  13. kind of utility would be very handy for testing and debugging. I
  14. therefore wrote this short program that does just that task.
  15.  
  16.     To use it, at the DOS prompt, type ERR_RET and the command
  17. line parameters that you were planning to use. For example, if you
  18. were going to type:
  19.  
  20.     MYPROG -C -X INFILE.DAT
  21.  
  22. you would type:
  23.  
  24.     ERR_RET MYPROG -C -X INFILE.DAT.
  25.  
  26. Your program will be run as it would have normally been and a message
  27. will be issued at the end with the returned error level.
  28.  
  29.     If you run ERR_RET without any other parameters, you will get
  30. a short message with the correct syntax. If there is not enough memory
  31. or ERR_RET cannot find your program in the current directory or DOS PATH,
  32. you will get an appropriate error message.
  33.  
  34.     ERR_RET was compiled with Turbo C, Version 2.0.    It may be freely
  35. copied, modified, used, etc. If you distribute it, please keep the 3 files
  36. together. Please do not modify this documentation and be sure to mark very
  37. clearly any modifications that you have added.
  38.  
  39.     Comments may be sent to:
  40.  
  41.     Steven Fischkoff, M.D.
  42.     CompuServe: 76367,307
  43.     GEnie: EOSINOPHIL
  44.     Prodigy: SVBC97A
  45.  
  46.