Itanium
Active User
Joined: 22 Jan 2006 Posts: 114 Location: India
|
|
|
|
I have a file with below format, File is of 80 bytes Record Length and all 80 bytes is
Code: |
01 WS-KEY.
05 WS-FIELD1 PIC X(10)
05 FILLER PIC X(1)
05 WS-FIELD2 PIC X(10)
05 FILLER PIC X(1)
05 WS-FIELD3 PIC X(10)
05 FILLER PIC X(48) |
which is having values as below
Code: |
AAA .1111111111.9999999999...........
ABCDF .2222222222.9999999999...........
AB .3333333333.9999999999...........
|
In my program, i don't have values for WS-FIELD1. I would need to read the 3rd record based on WS-FIELD2. I tried to use START and READ NEXT as below, but it didn't work.
Code: |
MOVE LOW-VALUES TO WS-KEY
MOVE '333333333' TO WS-FIELD2
START FILE-NAME KEY IS >= WS-KEY
NOT INVALID
READ FILE-NAME NEXT
.
.
|
But this is actually not working. After the READ, we tried to put a display of the VSAM file REC, that is always the first record.
We tried with different values passed into WS-FIELD2.
Is there any way to satisfy our requirement ? |
|