Reading a VSAM file with a condition.
Posted: Fri Feb 10, 2017 1:54 pm
Hi,
I have a VSAM with following key structure with key length of 110:
For my requirement, I need to read only those records which has VSAM-KEY-FLAG set to 'N'.
This is in my program:
But it ends 23 VSAM status. I don't know the remaining keys of vsam i know only the last byte that is 'N'. Please help to resolve this one.
Thanks.
I have a VSAM with following key structure with key length of 110:
Code: Select all
01 VSAM-KEY-REC.
05 VSAM-KEY-DATA PIC X(109).
05 VSAM-KEY-FLAG PIC X(01).
This is in my program:
Code: Select all
MOVE LOW-VALUES TO VSAM-KEY-DATA.
MOVE 'N' TO VSAM-KEY-FLAG.
*
READ VSAM-FILE
KEY IS VSAM-KEY-REC
END-READ.
Thanks.