Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon Mar 03, 2003 7:22 am Post subject:
sanat,
There are many ways to do it. Run a sort or file-aid step to reverse the file.If you have the file on a tape , you can use the clause REVERSED which will read the file from the last record.
Use the REVERSED option of the OPEN statement to process tape files in reverse order. Execution of the OPEN statement will then position the file at its end. Subsequent READ statements read the data records in reverse order, starting with the last record. The REVERSED option is supported only for files with fixed-length records.
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
Posted: Mon Mar 03, 2003 7:33 am Post subject:
Hi sanat,
Why have you posted this question in the CICS forum. If you are trying to read a KSDS from a CICS application program from bottom to top, then move HIGH VALUES to the record key (RIDFLD parameter) in the STARTBR command which will position your pointer at the very last record. Use subsequent READPREV to read the file backwards.
If however, you are reading a file in batch, then you can use batch File-Aid as Kolusu has suggested.
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