Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 4: addressed-sequential retrieval (ESDS) z/OS DFSMS Macro Instructions for Data Sets SC23-6852-02 |
|
In this example, one GET macro is used to retrieve multiple fixed-length,
20-byte records. The records are moved to a work area (only option).
The GENCB macro generates 10 request parameter lists; the lists are subsequently chained together by using the MODCB macro to modify the NXTRPL parameter in each copy. Because SEQ is specified in each request parameter list, and no previous request has been issued against the access method control block since it was opened, retrieval begins at the beginning of the data set. Each time the GET macro is executed, VSAM is positioned at the next record in RBA sequence. VSAM moves each record into the work area provided for the request parameter list that identifies the record. If an error occurs for one of the request parameter lists in the chain and you supply error-analysis routines, VSAM takes a LERAD or SYNAD exit before returning to your program. Register 15 is set to indicate the status of the request. A code of 0 indicates that no error was associated with any of the request parameter lists. Any other code indicates that an error occurred for one of the request parameter lists. You should issue a SHOWCB macro for each request parameter list in the chain to find out which had an error. VSAM does not process any of the request parameter lists except the one with an error. |
Copyright IBM Corporation 1990, 2014
|