Previous Topic: Example—KSDS Pointed StartNext Topic: Procedure Modules


Performing a Direct Read

To perform a direct read, code the following:

  1. The INPUT parameter using the UM(CULLVSAM) option
  2. REC parameters describing the VSAM file

    The start position of the VSAM record is relative to the beginning of the input buffer. The input buffer contains the entire key-file record followed by the VSAM record.

  3. Type 7 logic (for key-sequenced files) to compare key file values to the key value of the retrieved VSAM record
  4. The VSAM and key file assignment in the CA Culprit job control language:
  5. A KEY control statement in the CULL step of the CA Culprit job control language. See the following "Coding the KEY control statement" for syntax.

Coding the KEY Control Statement for Direct Reads

To directly access specific records in the file, code the KEY control statement as shown below:

The code...

Identifies...

F (default)

Fixed-length records

V

Variable-length records

U

Undefined length records

The code...

Identifies a...

Blank (default)

Sequential file (z/VSE)

Tape file (z/VSE)

4

Punched card (z/VSE)

8

VSAM file (z/OS)

The code...

Identifies...

Blank (default)

Standard labels

S

Standard labels

N

No labels

A

Standard labels

User-defined labels

The keyword...

Identifies...

K

KSDS

A

ESDS

Notes

Example

This example retrieves selected records directly from a variable-length KSDS file.

The following code uses: