home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / vms / 12931 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.2 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!EQL.CALTECH.EDU!rankin
  2. From: rankin@EQL.CALTECH.EDU (Pat Rankin)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Convert VMS condition value to errno code.
  5. Message-ID: <920729181505.234012f1@EQL.Caltech.Edu>
  6. Date: 30 Jul 92 01:15:42 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 18
  11.  
  12. > Is there a function in the VAXC-library that converts a VMS condition
  13. > value the corresponding errno value?
  14.  
  15.      Yes, but you probably shouldn't use it.  If you look in tables
  16. B-1 and B-2 in Appendix B of the _VAX_C_Run-Library_Reference_Manual_
  17. you'll find C$$TRANSLATE().  It sets `errno' rather than returning the
  18. converted value.  However, it is only available if you link with object
  19. library VAXCRTL.OLB, not if you link with shareable image VAXCRTL.EXE.
  20.  
  21.      It's much simpler to use
  22.         errno = EVMSERR;
  23.         vaxc$errno = your_condition_value;
  24. than to worry about matching up miscellaneous codes.  perror() will give
  25. two lines though, the first being "non-translatable VMS error code" or
  26. something close to that.
  27.  
  28.                 Pat Rankin, rankin@eql.caltech.edu
  29.  
  30.