
Accessing DSN Catalog Records (TSIDAC2) TSIDAC2 Search Arguments and Calls
Chapter 4. Accessing the DSN Catalog 4-9
.
.
MOVE HEX02 TO USR-KEY-POS-1.
MOVE 'EP3452' TO USR-KEY-SER.
CALL 'TSIDAC2' USING ACC-RECORD.
.
.
.
To read the entire DSN Catalog sequentially:
1.
Move spaces to the USR-KEY field.
2. Issue multiple calls to TSIDAC2.
PROCEDURE DIVISION.
.
.
.
SEQUENTIAL-READ.
MOVE SPACES TO USR-KEY.
CALL 'TSIDAC2' USING ACC-RECORD.
IF USER-RETURN_CODE = 1
GO TO END-OF-CATALOG.
(process the catalog information here)
GO TO SEQUENTIAL-READ.
To specify a starting point for sequential processing:
1. Move the starting dataset name into the USR-KEY field.
2.
Call TSIDAC2.
3. Move spaces to the USR-KEY field.
4. Issue multiple calls to TSIDAC2.
PROCEDURE DIVISION.
.
.
.
MOVE 'DATA.SET.NAME.B' TO USR-KEY.
CALL 'TSIDAC2' USING ACC-RECORD.
SEQUENTIAL-READ.
MOVE SPACES TO USR-KEY.
CALL 'TSIDAC2' USING ACC-RECORD.
IF USER-RETURN_CODE = 1
GO TO END-OF-CATALOG.
(process the catalog information here)
GO TO SEQUENTIAL-READ.
Sequential access to the DSN Catalog is normally terminated at end-of-file. In certain
circumstances, however, you may wish to terminate sequential processing prior to end-of-file
and allow your programs to change between sequential and random processing. No records
are returned when performing this type of call.
To terminate sequential processing prior to end-of-file:
1.
Move high-values (hex FF) to the USR-KEY field.
2.
Call TSIDAC2.
Sequential Access
Example
Example
Terminating
Sequential Access
Comentarios a estos manuales