i have an query
Moderators: dbzTHEdinosauer, Moderator Group
i have an query
can we read a file in reverse order?
- Kalicharan
- Moderator
- Posts: 31
- Joined: Wed Feb 08, 2006 1:51 pm
Hi,
QSAM files can be processed in reverse order using REVERSED keyowrd.
Use REVERSED option of the OPEN statement to process files in reverse order. The file is positioned at the end, and READ statements read the data records in reverse order, starting with the last record. The REVERSED option is supported only for files that have fixed-length records.
We can process VSAM Key Sequenced Data Set (KSDS) via an alternate index in reverse sequence, the order in which VSAM returns records is not the reverse of the order in which the records are returned when the same data set is processed in a forward sequential manner.
Reverse order processing depends on how data stores for an alternate index.
Thanks
Kalicharan
QSAM files can be processed in reverse order using REVERSED keyowrd.
Use REVERSED option of the OPEN statement to process files in reverse order. The file is positioned at the end, and READ statements read the data records in reverse order, starting with the last record. The REVERSED option is supported only for files that have fixed-length records.
We can process VSAM Key Sequenced Data Set (KSDS) via an alternate index in reverse sequence, the order in which VSAM returns records is not the reverse of the order in which the records are returned when the same data set is processed in a forward sequential manner.
Reverse order processing depends on how data stores for an alternate index.
Thanks
Kalicharan
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page