Retrieval of records from VSAM files organized as RRDS can be sequential, skip sequential, or direct, using a full key argument only. Specification of a generic key is not permitted.
When using the skip sequential or direct retrieval methods, you must define the key as the first four bytes of the record I/O area. Other than the above restrictions, the rules of KSDS retrieval also apply to RRDS retrieval. Code the 'defineparameters' necessary for relative record processing of a VSAM file as follows:
►►─ 'RROD,KEY, ─┬───────┬─ ' ─────────────────────────────────────────────────►◄ ├─ SEQ ─┤ ├─ SKP ─┤ └─ DIR ─┘
The following Reporting Facility program illustrates the techniques necessary for RRDS VSAM sequential file access:
USER 'XYZ COMPANY, INC.'
MASTER: FILE VSAM 'RRDS,KEY,SEQ' RECORD=29
DEF RELATIVE-KEY-VALUE 1-4 B
DEF DIVISION 5-6 X
DEF DEPARTMENT 7-9 X
DEF EMPLOYEE-NUMBER 10-13 N 'EMPNO'
DEF EMPLOYEE-NAME 14-29 X
REPORT 'RRDS SAMPLE 1'
SELECT ALL
CONTROL EMPLOYEE-NUMBER
PRINT DIVISION DEPARTMENT EMPLOYEE-NUMBER EMPLOYEE-NAME
END
|
Copyright © 2014 CA.
All rights reserved.
|
|