CICS - File Handling


Advertisements

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.No Commands & Description
1 READ

READ command reads data from a file using primary key.

2 WRITE

Write command is used to add new records to a file.

3 REWRITE

REWRITE command is used to modify a record that is already present in a file.

4 DELETE

DELETE 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.No Commands & Description
1 STARTBR

STARTBR is known as start browse.

2 READNEXT / READPREV

When we issue a STARTBR command, it does not make the records available.

3 RESETBR

The RESETBR command allows us to reset our starting point in the middle of a browse.

4 ENDBR

When we have finished reading a file sequentially, we terminate the browse using the ENDBR command.

Advertisements