I am trying to read multiple records from a VSAM KSDS file sequentially.
This is a KSDS DB with a 36 character key, the key contains the job/application/job#/time/date:
SRTJOB SRTJBAPP 110 10.00.26062222
I have OPSVSAM reading the first record, but don't see how to advance to the next record. I've tried the 3 following formats and can display the RBA, but still don't see how to advance to the next record.
record = OPSVSAM('READ','JOBFILE',,,KGE)
record = OPSVSAM('POINT','JOBFILE',JOBKEY,,KGE)
record = OPSVSAM('READ','JOBFILE',JOBKEY)
Release : 14.0
Component : OPS/MVS
The syntax of the OPSVSAM READ function is as follows:
var = OPSVSAM('READ',ddname,[key[,keylength[,criterion]] ])
In order to sequentially read through a VSAM KSDS file by retrieving the next record on each OPSVSAM READ call, all that is needed is the ddname. For instance, if the ddname is OPSDDN, the the call should be coded as:
RECORD = OPSVSAM('READ',OPSDDN)
Each invocation of the above call will read the next record sequentially into the variable "RECORD" from the VSAM file associated with the ddname OPSDDN.
From the OPSVSAM Function documentation located here:
under "Usage Notes" the following is stated: