StorageTek 6 Water System User Manual


 
638 VM/HSC 6.0 System Programmer’s Guide
1st ed., 6/30/04 - 312579601
* Inner loop - process each VTV record in the response area:
*
VOLPROC DS 0H Over all VTV records in reply:
* ... process VTV record here ...
PUT WKFLATDD,((R8))
LA R8,VDRECLEN(,R8) Pointer to next VTV record
BCT R9,VOLPROC Process next VTV record
CHECKEOA DS 0H Check for more VTV records
CLC WKRDRC,=A(SLURRDEA) VTV end-of-area?
BNE READVOL No, read more VTV records
*
* Close the CDS VTV record area:
*
CLOSEVOL DS 0H Close VTV record area:
LA R4,WKFLATDD
CLOSE ((R4))
SLSUREQ QCDS, +
REQUEST=CLOSE, +
DDNAME==CL8'CDS1', +
TYPE=VTV, +
TOKEN=WKTOK, +
UCALADR=WKUCAL, +
MF=(E,WKQCDS)
LTR R15,R15 Check for CLOSE failure
BNZ CLOSEERR Handle CLOSE error
B EXIT
READERR WTO 'READ ERROR'
B EXIT
CLOSEERR WTO 'CLOSE ERROR'
B EXIT
*
* Clean up and return to caller:
*
OPENERR WTO 'OPEN ERROR'
EXIT DS 0H Clean up and return to caller:
DELETE EP=SLSUCAL Unload SLSUCAL routine
L R0,QCDSBLEN Load response area length
L R1,WKBUFP Pointer to response area
FREEMAIN R,A=(R1),LV=(R0) Release response area buffer
LR R1,R13 Pointer to module work area
L R13,4(,R13) Restore caller's save area pointer
FREEMAIN R,A=(R1),LV=WKAREAL Release module work area
L R14,12(,R13) Restore return address
LM R0,R12,20(R13) Restore caller's registers 0-12
XR R15,R15 Set return code zero
BR R14 Return to caller
*
Figure 33. Sample 1 - Automatic CDS Allocation
(3 of 4)