CICS- VSAM Files and Key Points

See Learn Teradata RDBMS
See Learn Teradata RDBMS

VSAM Files we can use in CICS like flat files how we use Cobol programs.

READ, WRITE, REWRITE, DELETE

As we already know VSAM files can be concurrently accessed by Batch and Online. VSAM Record-Level Sharing (RLS). This explores a method for accessing VSAM files that gives multiple CICS address spaces concurrent READ/WRITE access to recoverable VSAM data sets.

Syntax for READ:

EXEC CICS READ FILE(‘name’)

INTO(dataarea)

RIDFLD(dataarea)

LENGTH(datavalue)

KEYLENGTH(datavalue)

ENDEXEC.

Syntax for WRITE:

EXEC CICS WRITE FILE(name)

FROM(dataarea)

RIDFLD(dataarea)

LENGTH(datavalue)

KEYLENGTH(datavalue)

ENDEXEC

Syntax for REWRITE:

EXEC CICS

REWRITE FILE (name)

FROM (dataarea)

LENGTH (datavalue) ENDEXEC.

Syntax for DELETE:

EXEC CICS DELETE

FILE(‘name’)

RIDFLD(datavalue) ENDEXEC.

Refer various file handle error code here…

Advertisements