HP3000-L Archives

August 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Wed, 15 Aug 2001 12:23:43 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
As Tom Brandt says, you can use the CKERROR intrinsic to extract the byte.
The error numbers are the same as those documented under FCHECK.  You can
call FCHECK if you move the return from CKERROR to a COMP field.

You can also unpack the value yourself with redefines or reference
modification.
E.g. (warning: untested code ahead)

 01 my-file-status pic 99.
 01 redefines my-file-status.
    05 my-file-status-1 pic 9.
    05 my-file-status-2 pic x.

 01 fserr-disp   pic 9(4).

 01 fserr        pic s9(4) comp.
 01 redefines fserr.
    05                pic x.
    05 fserr-lowbyte  pic x.

 01 fserror-msg   pic x(72).


 if my-file-status-1 = 9
   move 0 to fserr
   move my-file-status-2 to fserr-lowbyte
   move spaces to fserror-msg
   call intrinsic "FCHECK" using fserr, fserror-msg
   display "File system error " fserr, ": ", fserr-msg
 else
   ...
 end-if

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2