2 Incredible Ideas on Deleting a VSAM record in CICS

The first thing any CICS programmer must do is proper plan for coding. What step first and what step next gives a fair idea on CICS coding. This question asked in CICS interviews many times.

Related: Python+Jobs+Best skill by Udemy

First option is READ a record with UPDATE option.

EXEC CICS

READ FILE(FILEA) INTO(record1) RIDFLD(key1)

UPDATE

END-EXEC

The next thing is DELETE  a record:

EXEC CICS

DELETE FILE(FILEA) RIDFLD(Key1)

END-EXEC

So, the above code works to delete a single record, which already READ with UPDATE option.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.