O'Reilly logo

Designing and Programming CICS Applications by Members of the CICS Development Team at IBM Hursley, John Horswill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling Files

CICS allows you to access file data in a variety of ways. In an online system, most file accesses are random, because the transactions to be processed aren’t batched and sorted into any kind of order. Therefore CICS supports the keyed access method provided by VSAM. It also allows you to access data using a variety of database managers.

This book covers only VSAM Key-Sequenced Data Sets (KSDS) that are accessed by supplying a key. Other VSAM data set format types—Entry-Sequenced Data Sets (ESDS) and Relative-Record Data Sets (RRDS) are described in more detail in the CICS Application Programming Guide. CICS also supports sequential access to keyed files in several forms; one of these, browsing, is covered in the next section.

The most important information kept for each file is the symbolic filename (normally the MVS DDNAME) or the data set name. When a CICS program makes a file request, it always uses a symbolic filename. CICS looks up this name in the FCT, and from the information there it makes the appropriate request of the operating system. This technique keeps CICS programs independent of the specific resources on which they are operating.

In the examples that follow, we’ll use the symbolic filename ACCTFIL for the account file and ACCTNAM for the name file which is actually a path to the same data set via an alternate index on the last name (surname).

READ Commands

There are three READ commands:

READ

Reads a record from a file.

READNEXT

Reads the next record during ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required