July 3, 2020
Read VSAM File in REVERSE Order
Apart from reading forward, VSAM KSDS file can be read Backwards starting from a specified Key value. READPREV command is used for this purpose. To read a record in reverse order starting from a key needs to establish a starting point first which can be done using STARTBR, then READNEXT and READPREV does the backwards