CICS – File Handling

CICS allows us to access file data in many ways. Most file accesses are random in online system as the transactions to be processed are not batched and sorted into any kind of order. Therefore CICS supports the usual direct access methods − VSAM and DAM (Direct Access Method). It also allows us to access data using database managers.

Random Access

Following are the commands which are used for random processing −

Sr.NoCommands & Description
1READREAD command reads data from a file using primary key.
2WRITEWrite command is used to add new records to a file.
3REWRITEREWRITE command is used to modify a record that is already present in a file.
4DELETEDELETE command is used to delete a record that is present in a file.

Sequential Access

Following are the commands which are used for sequential processing −

Sr.NoCommands & Description
1STARTBRSTARTBR is known as start browse.
2READNEXT / READPREVWhen we issue a STARTBR command, it does not make the records available.
3RESETBRThe RESETBR command allows us to reset our starting point in the middle of a browse.
4ENDBRWhen we have finished reading a file sequentially, we terminate the browse using the ENDBR command.

Leave a Reply