No, but I can tell you how to obtain the Reason Code. After returning from the OPEN with an RC=8 in R15, do the following:
Code:
CVD R15,DPACK8 CONVERT RC TO 8-BYTE PACKED FIELD
UNPK RETURN8,DPACK8+4(4) UNPACK RC TO 8-BYTE ZONED FIELD
OI RETURN8+7,X'F0' RESET ZONE BITS FOR DISPLAY
XC VSAMRC4,VSAMRC4 CLEAR VSAM REASON CODE
SHOWCB RPL=SYSRPL,AREA=VSAMRC4,LENGTH=4,FIELDS=(FDBK)
L R15,VSAMRC4 R15 = VSAM REASON CODE
CVD R15,DPACK8 CONVERT RC TO 8-BYTE PACKED FIELD
UNPK REASON8,DPACK8+4(4) UNPACK RC TO 8-BYTE ZONED FIELD
OI REASON8+7,X'F0' RESET ZONE BITS FOR DISPLAY
HTH...
Ron _________________ A computer once beat me at chess, but it was no match for me at kick boxing.
Hi Ron,
Thanks..But I don't understand why you are moving the return code from R15 to RETURN8 field before issuing a call to SHOWCB ? I gues it won't be used by SHOWCB.
I tried this , But reason code is not returned in VSAMRC4 field ?
I'm moving the return code from R15 to RETURN8 field before doing a SHOWCB so that I can "display" the VSAM Return Code as well as the VSAM Reason Code. After the SHOWCB etc., I "display" both the Return Code AND the Reason Code.
It is my experience, though, that the situation you describe ( empty VSAM kSDS being opened for Input ) results in a Return Code of 8, and a Reason Code of zero. I don't know WHY the Reason Code is zero, but it is.
Ron _________________ A computer once beat me at chess, but it was no match for me at kick boxing.
Hi Ron,
You are right if Return code is 8(empty VSAM KSDS being opened for Input), Reason code is zero!
In my case I found a way. The file I am opening contains a NULL record always as the first record.
I open it and if there is an OPEN error (R15 = 8), I use SHOWCB to get the count of the records in the file. If it is not greater or equal to 1, then it means it is an empty file error.
And if its non-empty OPEN error, than SHOWCB itself fails to give the record count.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum