
- CICS Tutorial
- CICS - Home
- CICS - Overview
- CICS - Environment
- CICS - Basic Terms
- CICS - Nucleus
- CICS - Transactions
- CICS - COBOL Basics
- CICS - BMS
- CICS - MAP
- CICS - Interface Block
- CICS - Pseudo Programming
- CICS - Aid Keys
- CICS - File Handling
- CICS - Error Handling
- CICS - Control Operations
- CICS - Temporary Storage
- CICS - Intercommunication
- CICS - Status Codes
- CICS - Interview Questions
- CICS Useful Resources
- CICS - Quick Guide
- CICS - Useful Resources
- CICS - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
CICS - READNEXT / READPREV
When we issue a STARTBR command, it does not make the records available. It just tells from where to start reading the file. To get the first record and sequence after that, we need to use the READNEXT command.
The FILE, INTO, and LENGTH parameters are defined in the same way as they are in the READ command. We only need the FILE parameter because CICS allows us to browse several files at once and this tells which one we want to read next.
RIDFLD points to a data area into which the CICS will "feed back" the key of the record it just read.
The READPREV command is almost like READNEXT, except that it lets us proceed backward through a data set instead of forward.
Syntax
Following is the syntax of READNEXT / READPREV command −
EXEC CICS READNEXT/READPREV FILE ('name') INTO (data-value) LENGTH (data-value) RIDFLD (data-value) END-EXEC
cics_file_handling.htm
Advertisements