Appendix F. Batch Application Program Interface (API) 641
1st ed., 6/30/04 - 312579601
QACSDRV TITLE ‘QCDS READ ACS AND DRIVE RECORD AREAS TOGETHER’
*
* QACSDRV ! QCDS READ ACS AND DRIVE RECORD AREAS TOGETHER.
*
* FUNCTION: USE SEPARATE RESPONSE AREAS TO READ THE ACS AND DRV
* RECORD AREAS IN AN ALTERNATING FASHION.
* EACH RESPONSE AREA IS A 1KB BUFFER.
*
* ATTRIBUTES:
* 1. PROBLEM STATE, USER KEY.
* 2. NON!APF AUTHORIZED.
* 3. AMODE 31, RMODE ANY, REENTRANT.
*
* NOTES:
* THE CALLER MUST HAVE READ ACCESS FOR THE INPUT CDS.
*
**ENDPROLOGUE*****************************************************
PRINT GEN
ENTRY QACSDRV
QACSDRV CSECT
QACSDRV AMODE 31
QACSDRV RMODE ANY
*
* SAVE THE CALLER’S REGISTERS, ESTABLISH CSECT ADDRESSABILITY
* AND ESTABLISH NEW REGISTER SAVE AREA:
*
STM R14,R12,12(R13) SAVE REGISTERS
LR R12,R15 LOAD BASE REGISTER R12
USING QACSDRV,R12 DECLARE CSECT BASE REGISTER R12
GETMAIN R,LV=WKAREAL ALLOCATE MODULE WORK AREA
ST R13,WKSAVE!WKAREA+4(,R1) LINK NEW SAVE AREA TO OLD ONE
ST R1,8(,R13) LINK OLD SAVE AREA TO NEW ONE
LR R13,R1 POINTER TO MODULE WORK AREA
USING WKAREA,R13 ADDRESSABILITY TO MODULE WORK AREA
*
* LOAD MODULE SLSUCAL:
*
LOAD EP=SLSUCAL LOAD SLSUCAL INTO STORAGE
ST R0,WKUCAL SAVE SLSUCAL ROUTINE ADDRESS
*
* INITIALIZE THE QCDS TOKEN AND THE SLSUREQ PLIST:
*
XC WKTOK,WKTOK QCDS TOKEN INITIALLY ZERO
LA R0,WKQCDS POINTER TO SLSUREQ PLIST STORAGE
LA R1,QCDSMLEN LENGTH OF SLSUREQ PLIST
LA R14,QCDSMODL POINTER TO SLSUREQ PLIST MODEL
LR R15,R1 LENGTH OF SLSUREQ PLIST MODEL
MVCL R0,R14 INITIALIZE SLSUREQ PLIST STORAGE
Figure 34. Sample 2 - Reading ACS and DRV Together
(1 of 4)