TITLE 'HZSSRCHC - IBM Health Checker for z/OS Sample HZSCPARS' */* START OF SPECIFICATIONS ******************************************* * *01* MODULE-NAME: HZSSRCHC * *01* CSECT NAME: HZSSRCHC * *01* DESCRIPTIVE-NAME: Sample remote check routine for the * IBM Health Checker for z/OS (Health Checker) * Use of HZSCPARS * * *01* PROPRIETARY STATEMENT= * * **PROPRIETARY_STATEMENT********************************************* * * * * * LICENSED MATERIALS - PROPERTY OF IBM * * 5694-A01 COPYRIGHT IBM CORP. 2006,2008 * * * * STATUS= HBB7750 * * * * **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_HZSCPARS * - Parses the input parameters (see subroutine PARSE for * a description of the syntax to be processed) * *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. * But since message processing is shown within other * samples, this sample will not show any message * processing. * - 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. * - This check uses HZSCPARS for parsing. This support * is available as of z/OS 1.8. * - This check uses HZSPREAD and HZSPWRIT for persistent * data. This support is available as of z/OS 1.10. * It uses the data space provided in z/OS 1.8 for * the target of HZSPREAD and the source of HZSPWRIT. * Upon completion, it page-releases the relevant * pages * *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: HZSSRCHC *03* TYPE: Reentrant *03* AMODE: 31 *03* RMODE: Any * *********************************************************************** * *01* ENTRY-POINT: HZSSRCHC * *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: * * HZSH0111E * HZSH0121I * HZSH0122I * HZSH0131I * * *01* ABEND-CODES: None * *01* WAIT-STATE-CODES: * * None * *01* CHANGE-ACTIVITY: * * $L0=HCHECK ,HBB7730,060101,PDXB: Sample Remote check * **** END OF SPECIFICATIONS *******************************************/ TITLE 'HZSSRCHC - IBM Health Checker for z/OS Sample Remote' HZSSRCHC CSECT HZSSRCHC AMODE 31 HZSSRCHC 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 kveReg EQU R9 KeyValueEntry address 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'HZSSRCHC' ... 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 *********************************************************************** * This sample does not do complete message processing (i.e., writes * * no exception or success messages) so does not set up addressability * * to the check's message table. A "real" check would want to do that. * *********************************************************************** *********************************************************************** * 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 Using CParKeywordInfo,theCParKeywordInfo XC DynareaToClear(DynareaToClear_Len),DynareaToClear *********************************************************************** * Put code here for Check processing for HZS_Sample_REMOTE_HZSCPARS * *********************************************************************** * Process parameters * *********************************************************************** TM PQE_MoreFlags,PQE_LookAtParms JZ Remote_No_Parms_Change BRAS R14,Parse TM Flags,ParameterError JNZ EndRunCheck Remote_No_Parms_Change DS 0H *********************************************************************** * Put the body of Check processing for HZS_Sample_REMOTE_HZSCPARS * * here. * *********************************************************************** * .... * *********************************************************************** * 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 *********************************************************************** * Place code here to write the exception message * *********************************************************************** J EndRunCheck *********************************************************************** * Assuming the code above did not detect an exception situation, * * Write "all is OK" message * *********************************************************************** Remote_No_Exception DS 0H *********************************************************************** * Place code here to write the success message * *********************************************************************** EndRunCheck DS 0H BR R11 EJECT *********************************************************************** * Routine: Parse * Parse the parameter area * Keywords supported * Parm1=(x1a,x1b) or Parm1(x1a,x1b)) * where x1 is a pair of decimal values, each from 1 to 99999. * Parm2=x2 or Parm2(x2) * where x2 is a hexadecimal value from 0 to x'FFF' * Parm3=x3 or Parm3(x3) * where x3 is a character string of length 1-8 * its acceptable values are CHOICE1 and CHOICE2 * The specification can be in any order. * Sample specification on * F hzsproc,UPDATE,..., * Parm='Parm2=A48,Parm3=CHOICE2,Parm1=48%' *********************************************************************** PARSE DS 0H STM R14,R12,Parse_Save *********************************************************************** * Set up defaults for parameters in case not specified * *********************************************************************** MVC Parm1A_Value,=AD(1) MVC Parm1B_Value,=AD(999) MVC Parm2_Value,=AD(x'100') MVC Parm3_Value,=CL8'CHOICE1' * * - Bit ParameterError in byte Flags is set upon detecting an error * - The parameters are in PQE_ParmArea. * - The length of the parameters is in PQE_ParmLen. NI Flags,x'FF'-ParameterError *********************************************************************** * Move parameter length to a fullword for HZSCPARS * *********************************************************************** XC Temp_ParmLen,Temp_ParmLen MVC Temp_ParmLen+2(L'PQE_ParmLen),PQE_ParmLen *********************************************************************** * Tokenize/Parse the parameter string * *********************************************************************** HZSCPARS REQUEST=PARSE,TOUPPER=YES, * REMOTE=YES,HANDLE=CK_Handle, * Parm=PQE_ParmArea,ParmLen=Temp_ParmLen, * CParAreaAddr=CParArea@, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR R15,R15 Check for bad return code JZ Parse_OK Parse succeeded, branch OI Flags,ParameterError J EndParse Parse_OK DS 0H L R2,CParArea@ Using CPARAREA,R2 *********************************************************************** * Check existence and number of values for parameter Parm1 * *********************************************************************** HZSCPARS REQUEST=CHECKPARM, * REMOTE=YES,HANDLE=CK_Handle, * CParArea=CParArea, * Parmname==CL16'PARM1', * MinValues=2,MaxValues=2, * FirstValueAddr=fvAddr, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR 15,15 Check for bad return code JZ Parm1_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE EndParm1 Not syntax error -- just not * present, so will use default OI Flags,ParameterError J EndParse_ButFree Parm1_OK DS 0H *********************************************************************** * Check first value for parameter Parm1 * *********************************************************************** L kveReg,fvAddr Address of first KeyValueEntry HZSCPARS REQUEST=CHECKDEC,PercentOK=NO, * REMOTE=YES,HANDLE=CK_Handle, * Parmname==CL16'PARM1', * KeyValueEntry=(kveReg), * NextValueAddr=nvAddr, * MinValueDec==AD(0),MaxValueDec==AD(99999), * KeyInfoArea=theCParKeywordInfo, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR R15,R15 Check for bad return code JZ Parm1AVal_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE Parm1AVal_OK Not syntax error -- OK too OI Flags,ParameterError J EndParse_ButFree Parm1AVal_OK DS 0H MVC Parm1A_Value,CParKeywordInfoValue *********************************************************************** * Check second value for parameter Parm1 * *********************************************************************** L kveReg,nvAddr Address of next KeyValueEntry HZSCPARS REQUEST=CHECKDEC,PercentOK=NO, * REMOTE=YES,HANDLE=CK_Handle, * Parmname==CL16'PARM1', * KeyValueEntry=(kveReg), * NextValueAddr=nvaddr, * MinValueDec==AD(0),MaxValueDec==AD(99999), * KeyInfoArea=theCParKeywordInfo, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR R15,R15 Check for bad return code JZ Parm1BVal_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE Parm1BVal_OK Not syntax error -- OK too OI Flags,ParameterError J EndParse_ButFree Parm1BVal_OK DS 0H MVC Parm1B_Value,CParKeywordInfoValue EndParm1 DS 0H *********************************************************************** * Check existence and number of values for parameter Parm2 * *********************************************************************** HZSCPARS REQUEST=CHECKPARM, * REMOTE=YES,HANDLE=CK_Handle, * CParArea=CParArea, * Parmname==CL16'PARM2', * MinValues=1,MaxValues=1, * FirstValueAddr=fvAddr, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR 15,15 Check for bad return code JZ Parm2_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE EndParm2 Not syntax error -- just not * present, so will use default OI Flags,ParameterError J EndParse_ButFree Parm2_OK DS 0H *********************************************************************** * Check value for parameter Parm2 * *********************************************************************** L kveReg,fvAddr Address of first KeyValueEntry HZSCPARS REQUEST=CHECKHEX, * REMOTE=YES,HANDLE=CK_Handle, * Parmname==CL16'PARM2', * KeyValueEntry=(kveReg), * NextValueAddr=nvaddr, * MinValueHex==AD(0),MaxValueHex==AD(x'FFF'), * KeyInfoArea=theCParKeywordInfo, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR R15,R15 Check for bad return code JZ Parm2Val_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE Parm2Val_OK Not syntax error -- OK too OI Flags,ParameterError J EndParse_ButFree Parm2Val_OK DS 0H MVC Parm2_Value,CParKeywordInfoValue EndParm2 DS 0H *********************************************************************** * Check existence and number of values for parameter Parm3 * *********************************************************************** HZSCPARS REQUEST=CHECKPARM, * REMOTE=YES,HANDLE=CK_Handle, * CParArea=CParArea, * Parmname==CL16'PARM3', * MinValues=1,MaxValues=1, * FirstValueAddr=fvAddr, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR 15,15 Check for bad return code JZ Parm3_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE EndParm3 Not syntax error -- just not * present, so will use default OI Flags,ParameterError J EndParse_ButFree Parm3_OK DS 0H *********************************************************************** * Check length for parameter Parm3 * *********************************************************************** L kveReg,fvAddr Address of first KeyValueEntry HZSCPARS REQUEST=CHECKCHAR, * REMOTE=YES,HANDLE=CK_Handle, * Parmname==CL16'PARM3', * KeyValueEntry=(kvereg), * NextValueAddr=nvaddr, * MinLen=1,MaxLen=8, * KeyInfoArea=theCParKeywordInfo, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR R15,R15 Check for bad return code JZ Parm3Val_OK Parse succeeded, branch CHI R0,HZSCPARSRsn_SyntaxError JNE Parm3Val_OK Not syntax error -- OK too OI Flags,ParameterError J EndParse_ButFree Parm3Val_OK DS 0H *********************************************************************** * Save the parameter value string, after blanking out the area, * * moving only as many characters as were specified. * *********************************************************************** PUSH USING USING CParKeywordValueEntry,kvereg USING CParKeywordData,CParKeywordValueEntryData MVC Parm3_Value,Blanks L R1,CParKeywordDataLen L R4,CParKeywordDataAddr BCTR R1,0 EX R1,MoveData POP USING *********************************************************************** * Check that Parm3 is valid (either CHOICE1 or CHOICE2) * *********************************************************************** CLC Parm3_Value,=CL8'CHOICE1 ' JE EndParm3 CLC Parm3_Value,=CL8'CHOICE2 ' JE EndParm3 MVC MGB1_Insert_Cnt,=F'2' 2 inserts Push Using Using MGB1_MsgInsertDesc,theMGB1Insert1 MVC MGB1_MsgInsertDesc_Length,=AL2(L'=CL16'PARM3') LA R4,=CL16'PARM3' ST R4,MGB1_MsgInsertDesc_Addr Pop Using Push Using Using MGB1_MsgInsertDesc,theMGB1Insert2 MVC MGB1_MsgInsertDesc_Length,=AL2(L'Parm3_Value) LA R4,Parm3_Value ST R4,MGB1_MsgInsertDesc_Addr Pop Using HZSFMSG REQUEST=HZSMSG,REASON=PARS1203, * REMOTE=YES,HANDLE=CK_Handle, - MGBFORMAT=1, - MGBADDR=Addr_Of_MGB1, - Retcode=HZSFMSG_RC,Rsncode=HZSFMSG_RSN, - MF=(E,HZSFMSG_LIST) OI Flags,ParameterError J EndParse_ButFree EndParm3 DS 0H *********************************************************************** * Check if any keywords were not processed * *********************************************************************** HZSCPARS REQUEST=CHECKNOTPROC, * REMOTE=YES,HANDLE=CK_Handle, * CParArea=CParArea, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) LTR R15,R15 Check for bad return code JZ NotProc_OK Parse succeeded, branch OI Flags,ParameterError J EndParse_ButFree NotProc_OK DS 0H EndParse_ButFree DS 0H *********************************************************************** * Free parse area * *********************************************************************** HZSCPARS REQUEST=FREE, * REMOTE=YES,HANDLE=CK_Handle, * CParArea=CParArea, * Retcode=HZSCPARS_RC,Rsncode=HZSCPARS_RSN, * MF=(E,HZSCPARS_LIST) *********************************************************************** * Check if parse has succeeded * *********************************************************************** EndParse DS 0H * * If a parameter error is detected, stop calling the check. * IBM Health Checker for z/OS will write a message. * TM Flags,ParameterError JZ No_ParmError HZSFMSG REQUEST=STOP,REASON=BADPARM, * REMOTE=YES,HANDLE=CK_Handle, - Retcode=HZSFMSG_RC,Rsncode=HZSFMSG_RSN, - MF=(E,HZSFMSG_LIST) No_ParmError DS 0H Remote_No_ParameterError DS 0H LM R14,R12,Parse_Save BR R14 EJECT STATIC_DATA DS 0D Static data MoveData MVC Parm3_Value(0),0(R4) Blanks DC CL8' ' 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_HZSCPARS' Check name CK_Date DC CL8'20060701' ... 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'PARM1(1,999),PARM2(100),PARM3(CHOICE1)' EJECT DYNAREA DSECT Dynamic storage DS CL72 SaveArea for external calls Parse_Save DS CL64 SaveArea for PARSE routine 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 Parm1A_Value DS D Parm1B_Value DS D Parm2_Value DS D Parm3_Value DS CL8 MaxInserts EQU 2 We will have up to 2 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) 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 HZSCPARS_RC DS F Return code from HZSCPARS HZSCPARS_RSN DS F Reason code from HZSCPARS HZSFMSG_RC DS F Return code from HZSFMSG HZSFMSG_RSN DS F Reason code from HZSFMSG theReleaseCode DS 0CL3 3-byte release code FunctionToDo DS X First byte is the function DS 2X LifeOfCheckResourceAddr DS A Address of area obtained Chkwork_Parm1A DS D Value for Parm1A Chkwork_Parm1B DS D Value for Parm1B Chkwork_Parm2 DS D Value for Parm2 Chkwork_Parm3 DS CL8 Value for Parm3 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 HZSCPARS MF=(L,HZSCPARS_List), - PLISTVER=MAX HZSCPARS parm list ORG ParmLists CallList CALL ,(,,,),MF=L ORG , Packed DS D Workarea for PACK and CVB Temp_ParmLen DS F DynareaToClear EQU * Flags DS X ParameterError EQU X'80' Parameter error detected Avail1 DS F InUse1 DS F Avail2 DS F InUse2 DS F CParArea@ DS A fvAddr DS A nvAddr DS A DynareaToClear_Len EQU *-DynareaToClear theCPARKeywordInfo DS CL(CParKeywordInfo_Len) 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 HZSZCPAR , HZSCPARS mappings HZSZCONS , Return and Reason codes END HZSSRCHC