TITLE 'HZSSRCHK - IBM Health Checker for z/OS Sample Remote' */* START OF SPECIFICATIONS ******************************************* * *01* MODULE-NAME: HZSSRCHK * *01* CSECT NAME: HZSSRCHK * *01* DESCRIPTIVE-NAME: Sample remote routine for the * IBM Health Checker fo z/OS (Health Checker) * * *01* PROPRIETARY STATEMENT= * * **PROPRIETARY_STATEMENT********************************************* * * * * * LICENSED MATERIALS - PROPERTY OF IBM * * 5694-A01 COPYRIGHT IBM CORP. 2006 * * * * STATUS= HBB7730 * * * * **END_OF_PROPRIETARY_STATEMENT************************************** * * * * *01* FUNCTION: * * This module adds a remote check to the IBM Health Checker for * z/OS and then processes that check. * The check, HZS_SAMPLE_REMOTE_CHECK, performs the same function * as HZS_SAMPLE_ONE_TIME in sample HZSSCHKR: * - Produces a report consisting of a "header" and multiple * entries * - Produces an exception message or a success message * *02* RECOVERY-OPERATION: * * The system provides no recovery on behalf of remote checks. * If the check routine abends while performing its function, * it is the check routine's responsibility to deal with that. * *********************************************************************** * *01* NOTES: * * - This module must be linkedited with IEACSS in order * to use the pause/release services (alternately, it could * be changed to load IEAVAPE, IEAVPSE, and IEAVDPE to * obtain their addresses * - This module must be linkedited with a message table * assembled from the output of the HZSMSGEN REXX exec. * For purposes of an example, we are using the message * table defined by the (SGML source) HZSSMSGT sample. * - If this module is not APF-authorized, the user must * be authorized for control access to XFACILIT profile * HZS.sysname.chkowner.ADD or * HZS.sysname.chkowner.checkname.ADD * - The x'800'-byte PQECHKWORK area is really of no use * to this routine, as this routine does not terminate * and thus any data that it puts into its own dynamic * storage will be available the next time that it * wakes up. Thus this sample does not show use of * PQECHKWORK. * - Unlike the checks in HZSSCHKR, this check uses * MGBFORMAT=1 when issuing messages. This support is * available as of z/OS 1.8. You might find it easier * to use than the MGBFORMAT=0 support. * *02* DEPENDENCIES: * * None * *02* RESTRICTIONS: * * None * *02* REGISTER-CONVENTIONS: * *03* REGISTERS SAVED: all *03* REGISTERS RESTORED: 2-14 *03* CODE REGISTER: None (Relative Branch) *03* STATIC Data REGISTER: R12 *03* DYNAMIC DATA REGISTER: R13 * *02* PATCH-LABEL: None * *01* MODULE-TYPE: Procedure * *02* PROCESSOR: High Level Assembler * *02* MODULE-SIZE: See External Symbol Dictionary * *02* ATTRIBUTES: * *03* LOCATION: Link list library *03* LOAD MOD: HZSSRCHK *03* TYPE: Reentrant *03* AMODE: 31 *03* RMODE: Any * *********************************************************************** * *01* ENTRY-POINT: HZSSRCHK * *02* PURPOSE: See FUNCTION section for this module. * *03* OPERATION: See OPERATION section for this module. * *02* ATTRIBUTES: * *03* ENTRY * *04* MODE: Enabled *04* STATE: Problem *04* KEY: 8 *04* AMODE: 31 *04* LOCKS HELD: None *04* ASCMODE: Primary *04* MEMORY MODE: P=S=H *04* DISPATCH MODE: Task *04* ADDRESS SPACE: Job * *03* EXECUTION * *04* MODE: Enabled *04* STATE: Problem *04* KEY: 8 *04* AMODE: 31 *04* LOCKS OBTAINED: NONE *04* ASCMODE: Primary *04* MEMORY MODE: P=S=H *04* ADDRESS SPACE: Job * *02* LINKAGE: Branch from the system upon jobstep attach * *03* CALLERS: * * System * *02* INPUT: None * *03* ENTRY-REGISTERS: * * Reg 1 - Address of address of area containing JCL parameter * information * Reg 13 - Address of a 144 byte save area * Reg 14 - Return address. * Reg 15 - Address of the check routine * *02* OUTPUT: * * 1) Messages issued via HZSFMSG * *02* EXIT-NORMAL: RETURN TO CALLER * *03* CONDITIONS: Successful completion * *03* EXIT-REGISTERS: * * R0 - R13 - Unpredictable * R14 - Unchanged * R15 - Unpredictable * *03* RETURN-CODES: None * *02* EXIT-ERROR: None * *********************************************************************** * *01* EXTERNAL-REFERENCES : * *02* ROUTINES: * * None * *02* DATA-AREAS: * * None * *02* CONTROL-BLOCKS: * * Name Mapping Use Description * -------- -------- ---- ------------ * MGB1 HZSMGB C Message Block * PQE HZSPQE R Process Queue Element * CONS HZSZCONS R Constants * * Legend: C=Create, R=Read, W=Write, D=Delete * *01* MACROS-EXECUTABLE: * * HZSFMSG - IBM Health Checker for z/OS Message Macro * *01* SERIALIZATION: * * None * *01* MESSAGES: * * HZSH0011E * HZSH0021I * HZSH0022I * HZSH0031I * * *01* ABEND-CODES: None * *01* WAIT-STATE-CODES: * * None * *01* CHANGE-ACTIVITY: * * $L0=HCHECK ,HBB7730,060101,PDXB: Sample Remote check * **** END OF SPECIFICATIONS *******************************************/ TITLE 'HZSSRCHK - IBM Health Checker for z/OS Sample Remote' HZSSRCHK CSECT HZSSRCHK AMODE 31 HZSSRCHK RMODE 31 R0 EQU 0 Work Register R1 EQU 1 Work Register R2 EQU 2 Work Register R3 EQU 3 Work Register R4 EQU 4 Work Register R5 EQU 5 Work Register R6 EQU 6 Work Register R7 EQU 7 Work Register R8 EQU 8 Available for use R9 EQU 9 Available for use R10 EQU 10 Address of message table R11 EQU 11 Subroutine linkage register R12 EQU 12 Static area Base R13 EQU 13 Dynamic area Base R14 EQU 14 Work Register R15 EQU 15 Work Register SYSSTATE ARCHLVL=2 * The check routine is not required to save regs J Chk_Over_ID Jump over the identifier DC CL8'HZSSRCHK' ... Program Name DC CL8'&SYSDATE' ... Assembly Date Chk_Over_ID DC 0H STM R14,R12,12(R13) Save entry registers LARL R12,STATIC_DATA Address static data USING STATIC_DATA,R12 Address static data L R0,=A(DYNSIZE) GETMAIN RU,LV=(0),SP=132 Get dynamic storage ST R1,8(,R13) Set previous forward pointer ST R13,4(,R1) Set this backward pointer LR R13,R1 Access dynamic storage USING DYNAREA,R13 Access dynamic storage LA R3,theMGB1Area ST R3,Addr_Of_MGB1 Save addressabilty for later XC LifeOfCheckResourceAddr,LifeOfCheckResourceAddr L R10,=V(HZSMSGTB) Address of message table CSECT - within HZSSMSGT *********************************************************************** * Obtain a pause element * * Note that it is necessary that the AuthLevel use IEA_UNAUTHORIZED * * even if the code is running in some authorized state. * *********************************************************************** MVC theAuthLevel,=A(IEA_UNAUTHORIZED) CALL IEAVAPE,(IEAVAPE_ReturnCode, - theAuthLevel, - thePauseElementToken), - MF=(E,CallList) ICM R15,B'1111',IEAVAPE_ReturnCode JNZ ErrorFound *********************************************************************** * Loop * *********************************************************************** AddcheckLoop DS 0H *********************************************************************** * Add the check * *********************************************************************** HZSADDCK CHECKOWNER=CK_Owner, ... the Owner of the check - CHECKNAME=CK_Name, ... the Name of the Check - REMOTE=YES, ... This is a remote check - HANDLE=CK_Handle, ... The handle for the check - PETOKEN=thePauseElementToken, - ACTIVE, ... Not Inactive - LOCAL, ... Not Global - DATE=CK_Date, ... Base date for defaults - REASON=CK_Reason, ... Reason for this check - REASONLEN=CK_Rsn_Len, ... ... and its length - PARMS=CK_Parm, ... Default Parameters - PARMSLEN=CK_Parm_Len, ... ... and their length - SEVERITY=LOW, ... Severity of check - INTERVAL=TIMER, ... A check that is executed * HOURS=CK_Hours, ... ... Every this many hours * MINUTES=CK_Minutes, ... ... and this many minutes * USS=NO, ... Check does not use USS - VERBOSE=NO, ... Not "VERBOSE" by default - Retcode=HZSADDCK_RC, - Rsncode=HZSADDCK_RSN, - MF=(E,HZSADDCK_PLIST) ... Execute form CHI R15,4 ... RC = 0/4 is OK JH ErrorFound * There is no reason to check the return code. Any "bad" error * would result in an abend. And there are some cases during refresh * processing where non-zero return codes are expected. *********************************************************************** * NestedLoop * *********************************************************************** CheckExistsLoop DS 0H *********************************************************************** * Pause waiting for instructions * *********************************************************************** CALL IEAVPSE,(IEAVPSE_ReturnCode, - theAuthLevel, - thePauseElementToken, ... current token - thePauseElementToken, ... updated token - theReleaseCode), ... updated token - MF=(E,CallList) ICM R15,B'1111',IEAVPSE_ReturnCode JNZ ErrorFound *********************************************************************** * When InitRun * * Issue OpStart, Get initial resources, run the check, * * Issue OpComplete * * Wait for the next function * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_InitRun JNE Not_InitRun BRAS R11,OpStart BRAS R11,GetResources BRAS R11,RunCheck BRAS R11,OpComplete J IterateCheckExistsLoop Not_InitRun DS 0H *********************************************************************** * When Run * * Issue OpStart, Run the check, * * Issue OpComplete * * Wait for the next function * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_Run JNE Not_Run BRAS R11,OpStart BRAS R11,RunCheck BRAS R11,OpComplete J IterateCheckExistsLoop Not_Run DS 0H *********************************************************************** * When Deactivate * * Issue OpStart, cleanup resources, * * Issue OpComplete * * Wait for the next function * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_Deactivate JNE Not_Deactivate BRAS R11,OpStart BRAS R11,CleanupResources BRAS R11,OpComplete J IterateCheckExistsLoop Not_Deactivate DS 0H *********************************************************************** * When Delete * * Issue OpStart, cleanup resources, * * Issue OpComplete * * Leave. The customer has said he doesn't want this check * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_Delete JNE Not_Delete BRAS R11,OpStart BRAS R11,CleanupResources BRAS R11,OpComplete J AfterAddcheckLoop Not_Delete DS 0H *********************************************************************** * When DeleteTerm (Deletion because HC is terminating) * * Issue OpStart, cleanup resources, * * Issue OpComplete * * Wait for the next function * * The expectation is that HC will restart and wake you up again * * with a "Restart" function * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_DeleteTerm JNE Not_DeleteTerm BRAS R11,OpStart BRAS R11,CleanupResources BRAS R11,OpComplete J IterateCheckExistsLoop Not_DeleteTerm DS 0H *********************************************************************** * When DeleteRefresh (Deletion because of a refresh request) * * Issue OpStart, cleanup resources, * * Issue OpComplete * * Re-Add the check and continue from the beginning * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_DeleteRefresh JNE Not_DeleteRefresh BRAS R11,OpStart BRAS R11,CleanupResources BRAS R11,OpComplete J AddcheckLoop Not_DeleteRefresh DS 0H *********************************************************************** * When Restart * * Cleanup resources, re-add the check and continue * *********************************************************************** CLI FunctionToDo,Hzs_Remote_Function_Restart JNE Not_Restart BRAS R11,CleanupResources J AddcheckLoop Not_Restart DS 0H *********************************************************************** * End NestedLoop * *********************************************************************** IterateCheckExistsLoop EQU CheckExistsLoop J CheckExistsLoop AfterCheckExistsLoop DS 0H *********************************************************************** * End Loop * *********************************************************************** IterateAddcheckLoop EQU AddcheckLoop J AddcheckLoop AfterAddcheckLoop DS 0H *********************************************************************** * Deallocate the pause element * *********************************************************************** CALL IEAVDPE,(IEAVDPE_ReturnCode, - theAuthLevel, - thePauseElementToken), - MF=(E,CallList) Return_Linkage DS 0H LR R1,R13 Area to free L R13,4(,R13) Address of savearea L R0,=A(DYNSIZE) FREEMAIN RU,A=(1),LV=(0),SP=132 Free dynamic storage LM R14,R12,12(R13) Restore regs BR R14 Return to the caller ErrorFound DS 0H *********************************************************************** * Place code here to handle an unexpected error * *********************************************************************** ABEND 1 Sample error action EJECT *********************************************************************** * OpStart: * * Indicate "operation start". The system will return the PQE * * in the designated area for this routine to use as it chooses * *********************************************************************** OpStart DS 0H HZSCHECK REQUEST=OPSTART, - REMOTE=YES, - HANDLE=CK_Handle, - PETOKEN=thePauseElementToken, - REXX=NO, - PQE=thePQE, - Retcode=HZSCHECK_RC, - Rsncode=HZSCHECK_RSN, - MF=(E,HZSCHECK_PLIST) ... Execute form LTR R15,R15 JNZ ErrorFound BR R11 *********************************************************************** * Define addressability to the returned PQE * *********************************************************************** EJECT *********************************************************************** * OpComplete: * * Indicate "operation complete". * *********************************************************************** OpComplete DS 0H HZSCHECK REQUEST=OPCOMPLETE, - REMOTE=YES, - HANDLE=CK_Handle, - REXX=NO, - Retcode=HZSCHECK_RC, - Rsncode=HZSCHECK_RSN, - MF=(E,HZSCHECK_PLIST) ... Execute form LTR R15,R15 JNZ ErrorFound BR R11 *********************************************************************** * GetResources: * * Obtain any resources the check needs * *********************************************************************** GetResources DS 0H * * Place code here to obtain any needed resources * For example, GETMAIN RU,SP=1,LV=4096 ST R1,LifeOfCheckResourceAddr BR R11 *********************************************************************** * CleanupResources: * * Clean up any resources the check obtained * *********************************************************************** CleanupResources DS 0H * * Place code here to clean up resources that were obtained * For example, ICM R1,B'1111',LifeOfCheckResourceAddr JZ No_Free * Clear the area containing the address so that we will not * mistakenly attempt to free it without having obtained it. XC LifeOfCheckResourceAddr,LifeOfCheckResourceAddr FREEMAIN RU,A=(1),LV=4096,SP=1 No_Free DS 0H BR R11 EJECT *********************************************************************** * RunCheck: * * This is the actual "check routine" * *********************************************************************** RunCheck DS 0H Using HZSMGB1,theMGB1Area Addressability for MGB Using HZSPQE,thePQE Addressability for PQE XC DynareaToClear(DynareaToClear_Len),DynareaToClear *********************************************************************** * Put code here for Check processing for HZS_Sample_Remote_Check * *********************************************************************** * Process parameters * *********************************************************************** TM PQE_MoreFlags,PQE_LookAtParms JZ Remote_No_Parms_Change * * Put code here to process the parameters in PQE_ParmArea. The * length of the parameters is in PQE_ParmLen. * For our example, * - assume that the required parameter string is LIMIT(nnn) where * nnn is a 3-digit decimal number. The processing converts this * from character to decimal and saves in field "Parm_Limit" which * is retained from one check iteration to the next. * - Bit ParameterError in byte Flags is set upon detecting an error *********************************************************************** * Check that parameter length is 10 * *********************************************************************** CLC PQE_ParmLen,=H'10' JNE Remote_SetParmError *********************************************************************** * Check that parameter begins with "LIMIT(" * *********************************************************************** CLC PQE_ParmArea(6),=CL6'LIMIT(' JNE Remote_SetParmError *********************************************************************** * Check that nnn is valid decimal * *********************************************************************** CLI PQE_ParmArea+6,C'0' JL Remote_SetParmError CLI PQE_ParmArea+6,C'9' JH Remote_SetParmError CLI PQE_ParmArea+7,C'0' JL Remote_SetParmError CLI PQE_ParmArea+7,C'9' JH Remote_SetParmError CLI PQE_ParmArea+8,C'0' JL Remote_SetParmError CLI PQE_ParmArea+8,C'9' JH Remote_SetParmError *********************************************************************** * Check that parameter ends with ")" * *********************************************************************** CLI PQE_ParmArea+9,C')' JNE Remote_SetParmError *********************************************************************** * Convert from character * *********************************************************************** PACK Packed(8),PQE_ParmArea+6(3) CVB R15,Packed ST R15,Parm_Limit J Remote_No_ParameterError Remote_SetParmError DS 0H OI Flags,ParameterError * * If a parameter error is detected, stop calling the check. * IBM Health Checker for z/OS will write a message. * HZSFMSG REQUEST=STOP,REASON=BADPARM, - REMOTE=YES,HANDLE=CK_Handle, - MF=(E,HZSFMSG_LIST) J EndRunCheck Remote_No_ParameterError DS 0H Remote_No_Parms_Change DS 0H *********************************************************************** * Put the body of Check processing for HZS_Sample_Remote_Check here. * *********************************************************************** * .... * *********************************************************************** * Having determined the need to write a report with data that * * consists of a report line and two report entries, and having * * put the values into variables Avail1, Inuse1, Avail2, Inuse2, * * use HZSFMSG to write the messages * *********************************************************************** * Write the report header * *********************************************************************** MVC MGB1_MessageNumber,=F'2' Message with XREFTEXT=002 MVC MGB1_Insert_Cnt,=F'0' No inserts. HZSFMSG REQUEST=CHECKMSG,MGBADDR=Addr_Of_MGB1, - MGBFORMAT=1, - REMOTE=YES,HANDLE=CK_Handle, - MsgTable=(R10), - MF=(E,HZSFMSG_List) *********************************************************************** * Write line 1 which has the type, num-avail, num-inuse * *********************************************************************** * Set up the MGB header * *********************************************************************** MVC MGB1_MessageNumber,=F'3' Message with XREFTEXT=003 MVC MGB1_Insert_Cnt,=F'3' Three inserts *********************************************************************** * Set up the inserts * *********************************************************************** Push Using Using MGB1_MsgInsertDesc,theMGB1Insert1 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Type1) LA R2,Type1 ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert2 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Avail1) LA R2,Avail1 ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert3 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Inuse1) LA R2,Inuse1 ST R2,MGB1_MsgInsertDesc_Addr Pop Using *********************************************************************** * Issue HZSFMSG to write the message * *********************************************************************** HZSFMSG REQUEST=CHECKMSG,MGBADDR=Addr_Of_MGB1, - MGBFORMAT=1, - REMOTE=YES,HANDLE=CK_Handle, - MsgTable=(R10), - MF=(E,HZSFMSG_List) *********************************************************************** * Write line 2 which has the type, num-avail, num-inuse * *********************************************************************** * Note that we did not have to set up the MGB header again, since the * * values from the previous call are what we need for this call * *********************************************************************** * Set up the inserts * *********************************************************************** Push Using Using MGB1_MsgInsertDesc,theMGB1Insert1 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Type2) LA R2,Type2 ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert2 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Avail2) LA R2,Avail2 ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert3 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Inuse2) LA R2,Inuse2 ST R2,MGB1_MsgInsertDesc_Addr Pop Using *********************************************************************** * Issue HZSFMSG to write the message * *********************************************************************** HZSFMSG REQUEST=CHECKMSG,MGBADDR=Addr_Of_MGB1, - MGBFORMAT=1, - REMOTE=YES,HANDLE=CK_Handle, - MsgTable=(R10), - MF=(E,HZSFMSG_List) *********************************************************************** * Place code here to determine whether to write exception message(s) * * (label Remote_Found_Exception to write the message) * * or an "all is OK" message * * (label Remote_No_Exception to write the message). * *********************************************************************** * .... Remote_Found_Exception DS 0H *********************************************************************** * Assuming the code above detected an exception situation, * * Build and write exception message * *********************************************************************** * Set up the MGB header * *********************************************************************** MVC MGB1_MessageNumber,=F'1' Message with XREFTEXT=004 MVC MGB1_Insert_Cnt,=F'4' Four inserts *********************************************************************** * Set up the inserts * * Note that because the message uses the "available" value twice, * * we must provide it twice as inserts. Similarly, the message uses * * the "limit" value twice so we provide it twice as inserts. * *********************************************************************** Push Using Using MGB1_MsgInsertDesc,theMGB1Insert1 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Avail2) LA R2,Avail2 ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert2 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Avail2) LA R2,Avail2 ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert3 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Parm_Limit) LA R2,Parm_Limit ST R2,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert4 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Parm_Limit) LA R2,Parm_Limit ST R2,MGB1_MsgInsertDesc_Addr Pop Using *********************************************************************** * Issue HZSFMSG to write the message * *********************************************************************** HZSFMSG REQUEST=CHECKMSG,MGBADDR=Addr_Of_MGB1, - MGBFORMAT=1, - REMOTE=YES,HANDLE=CK_Handle, - MsgTable=(R10), - MF=(E,HZSFMSG_List) J EndRunCheck *********************************************************************** * Assuming the code above did not detect an exception situation, * * Write "all is OK" message * *********************************************************************** Remote_No_Exception DS 0H MVC MGB1_MessageNumber,=F'4' Message with XREFTEXT=004 MVC MGB1_Insert_Cnt,=F'0' No inserts. HZSFMSG REQUEST=CHECKMSG,MGBADDR=Addr_Of_MGB1, - MGBFORMAT=1, - REMOTE=YES,HANDLE=CK_Handle, - MsgTable=(R10), - MF=(E,HZSFMSG_List) EndRunCheck DS 0H BR R11 EJECT STATIC_DATA DS 0D Static data LTORG Instantiate literals DS 0D Align for cleanliness CK_Owner DC CL16'IBMSAMPLE' Owner of these health checks CK_Name DC CL32'HZS_SAMPLE_REMOTE_CHECK' Name for this check CK_Date DC CL8'20051201' ... Date this check's defaults * ... were set. The installation * ... must provide a date after * ... this in order to override * ... the defaults CK_Hours DC H'00' Hours and Minutes between calls CK_Minutes DC H'05' ... of this check. CK_Rsn_Len DC A(L'CK_Reason) Length of health check reason CK_Parm_Len DC A(L'CK_Parm) Length of health check parms CK_Reason DC C'A sample remote health check' - Reason for this Health Check CK_Parm DC C'LIMIT(047)' Set the initial limit Type1 DC C'Normal ' Type2 DC C'Special' EJECT DYNAREA DSECT Dynamic storage DS CL72 SaveArea for external calls DS 0D CK_Handle DS CL16 Handle thePauseElementToken DS CL16 IEAVAPE_ReturnCode DS F IEAVPSE_ReturnCode DS F IEAVDPE_ReturnCode DS F theAuthLevel DS F MaxInserts EQU 4 We will have up to 4 inserts theMGB1Area DS 0D Area for MGB and insert info theMGB1 DS CL(HZSMGB1_LEN) theMGB1Insert1 DS CL(MGB1_MsgInsertDesc_Len) theMGB1Insert2 DS CL(MGB1_MsgInsertDesc_Len) theMGB1Insert3 DS CL(MGB1_MsgInsertDesc_Len) theMGB1Insert4 DS CL(MGB1_MsgInsertDesc_Len) HZSADDCK_RC DS F Return code from HZSADDCK HZSADDCK_RSN DS F Reason code from HZSADDCK HZSCHECK_RC DS F Return code from HZSCHECK HZSCHECK_RSN DS F Reason code from HZSCHECK theReleaseCode DS 0CL3 3-byte release code FunctionToDo DS X First byte is the function DS 2X LifeOfCheckResourceAddr DS A Address of area obtained Parm_Limit DS F The parameter value ParmLists DS 0D HZSADDCK MF=(L,HZSADDCK_PLIST), - PLISTVER=MAX HZSADDCK parm list ORG ParmLists HZSCHECK MF=(L,HZSCHECK_PLIST), - PLISTVER=MAX HZSCHECK parm list ORG ParmLists HZSFMSG MF=(L,HZSFMSG_List), - PLISTVER=MAX HZSFMSG parm list ORG ParmLists CallList CALL ,(,,,),MF=L ORG , Packed DS D Workarea for PACK and CVB DynareaToClear EQU * Flags DS X ParameterError EQU X'80' Parameter error detected Avail1 DS F InUse1 DS F Avail2 DS F InUse2 DS F DynareaToClear_Len EQU *-DynareaToClear Addr_Of_MGB1 DS A * thePQE DS CL4096 Area to receive the PQE DYNSIZE EQU *-DYNAREA Size of dynamic storage IEAASM , Equates for pause/release HZSMGB , MGB for messages HZSPQE , PQE HZSZCONS , Return and Reason codes END HZSSRCHK