Appendix F. Batch Application Program Interface (API) 635
1st ed., 6/30/04 - 312579601
Sample QCDS Requests
The following QCDS program samples detail two different scenarios:
• a request to open the current primary CDS
• a request to process two library element record area types.
Both of these examples can be found in the SAMPLIB data set distributed to customers.
Error processing code has been omitted in the examples.
Sample 1 - Reading the Volume Record Area of the Current Primary CDS
This sample QCDS request uses automatic CDS allocation to open the current primary
CDS. Automatic CDS allocation does not require JCL to identify the input CDS but does
require an operational HSC address space.
After opening the CDS volume record area, the program reads groups of volume records
into a 64 KB response area buffer.
SLURRDBA 24 - Read failed: Attempt to read beyond the end of the
record area.
SLURRDIB 28 - Read failed: Invalid response area buffer address.
SLURRDIL 32 - Read failed: Response area buffer length too short to
contain both the reply header and at least one library element
record.
CLOSE Return Codes:
SLURCLOK 0 - Record area was closed successfully.
SLURCLAC 4 - Close failed: Attempt to close a record area that is
already closed.
SLURCLIT 8 - Close failed: Invalid token value.
SLURCLRA 12 - Close failed: Invalid record area type.
SLURCLIO 16 - Close failed: I/O error while accessing the associated
CDS.
Table 81. Batch API Return Codes (Continued)
Return Field Name: Decimal Value and Description: