  DCL Error Handling? 
 The Question is:
 
I am trying to write a command file that reads tape that was mounted as
 foriegn.  A good tape would have 4 records where the first three are empty. If
 the system that generates these tapes (+25 year old HP computer) has a problem
 then it sometimes over wr
ites the tape and usually causes a 5th record to contain data some valid data.
 I have written a command file that reads the tape and store the data into
 files.  I am trying to test for the possibility of a 5 record and there are
 three possible conditions
that could occurs.  1st there is not data in the 5th record (blank - this is
 GOOD) 2nd there is a parity error (tapes recycled may have been at different
 density) and third there is valid data.  When the tape drive reads either a
 blank tape or parity erro
r I can capture the $STATUS into a LOG file which only indicated a read error.
 What I really would like to do is capture the specific  error message that
 indicated either "incomplete read" or "parity error".
 
Any help would be greatly appreciated.  I was a former assistant VMS system
 manager too many years ago to remember how to do this.  I have been reading
 the system manuals but have not found the key to solve this problem.
 
Thank you
 
 
 The Answer is:
 
  Assuming the error code is not stored in the $STATUS symbol, then a
  program will likely be required.  You will also want to declare an
  ON ERROR handler, or use SET NOON.
 
  Note that DCL is not particularly suited for reading binary data.
