Subject: | |
From: | |
Reply To: | Walter J. Murray |
Date: | Sun, 1 Jun 2008 15:57:00 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Marianne asks:
> Can anyone help and enlighten me with the file error I'm encountering
-
> file status 9?
Many have already replied, including me. However, just for the sake of
completeness, I'll mention that there is an intrinsic specifically for
decoding COBOL 9x file status codes. It's named "CKERROR". Here is an
example of how it's used.
-----begin COBOL example-----
01 STAT.
02 STATUS-KEY-1 PIC X.
02 STATUS-KEY-2 PIC X.
01 RESULT PIC 9(4).
.
.
.
IF STATUS-KEY-1 = "9"
CALL "CKERROR" USING STAT, RESULT
DISPLAY "ERROR NUMBER ", RESULT
END-IF
-----end COBOL example-----
You can find CKERROR documented in several places, including the "Using
KSAM XL" manual (see Appendix A).
I don't recommend using CKERROR in new code. It was written back when
COBOL was a less powerful language than it is today. But you may see it
in existing code.
Walter
Walter J. Murray
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|