*process macro not('^') or('|') rules(nolaxdcl); *process limits(name(100) extname(8) fixeddec(15,31) fixedbin(31,63)); *process system(IMS) display(std); /********************************************************************* * IBM Rational Developer for System z * Enterprise Service Tools (EST) * Single-service Projects (XSE) * IMS Enterprise Suite SOAP Gateway * Web Service Provider Template MPP * * Date created: 2012-03-14 15:09:38 PDT * UUID: 4e63ba2c-bbe2-4989-a51f-abdadf9b2363 * INSTALLATION: 8.3.200 ********************************************************************/ WSPOC1Package: package exports(*); /* IMS PL/I service provider include */ %INCLUDE IRZPWSH; /* WSDL2ELS language structures */ %INCLUDE WSPOC1; /*-------------------------------------------------------------------* * Procedure: WSPOC1 * Description: Implementation of a Web service provider MPP for ser * vice "WS_poc_1" and binding "WS_poc_1_Binding" of the Web service * definition file "WS_PoC_1.wsdl". *------------------------------------------------------------------*/ WSPOC1: procedure(iopcb_mask_ptr) options(main); dcl iopcb_mask_ptr pointer; dcl host_text_1 char(1024) varying init(''); dcl host_text_2 char(1024) varying init(''); /* Begin mainline logic. */ @irz_iopcb_mask_ptr = iopcb_mask_ptr; @irz_cee_feedback_ptr = addr(@irz_cee_feedback); call ProcessMessages(); /* End mainline logic. */ return; /*-------------------------------------------------------------------* * Procedure: ProcessMessages * Description: Retrieve the IRZPWSIO message header from the IMS Me * ssage Queue and invoke a handler procedure based on the service c * ontext. *------------------------------------------------------------------*/ ProcessMessages: procedure internal; /* Allocate memory for the IRZPWSIO message header and copy it fro m the IMS Message Queue. */ allocate @irz_async_msg_header set (@irz_async_msg_header_ptr); call CEETDLI(@irz_dli_get_unique, @irz_iopcb_mask, @irz_async_msg_header); /* Branch to a handler procedure corresponding to the operation ci ted in the service context. */ do while(@irz_iopcb_mask.iopcb_status_code = @irz_dli_status_ok); select(@irz_async_msg_header.service_name); when('WS_poc_1') do; select(@irz_async_msg_header.operation_name); when('getteam_1_0') do; call getteam_1_0Handler; end; when('setteam_1_0') do; call setteam_1_0Handler; end; when('ping_1_0') do; call ping_1_0Handler; end; when('ping_2_0') do; call ping_2_0Handler; end; otherwise do; host_text_1 = @irz_async_msg_header.operation_name; host_text_2 = @irz_async_msg_header.service_name; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'Operation name "' || trim(host_text_1) || '" ' || 'is not valid for Service name "' || trim(host_text_2) || '".'); end; end; end; otherwise do; host_text_1 = @irz_async_msg_header.service_name; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'Service name "' || trim(host_text_1) || '" ' || 'is not valid or is not implemented by this ' || 'application.'); end; end; call CEETDLI(@irz_dli_get_unique, @irz_iopcb_mask, @irz_async_msg_header); end; if (@irz_iopcb_mask.iopcb_status_code ^= @irz_dli_end_messages) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEETDLI(@irz_dli_get_unique, @irz_iopcb_mask,' || '@irz_async_msg_header){' || '@irz_iopcb_mask.iopcb_status_code=' || @irz_iopcb_mask.iopcb_status_code || '}.'); end; free @irz_async_msg_header; return; end ProcessMessages; /*-------------------------------------------------------------------* * Procedure: getteam_1_0Handler * Description: Handle the protocol logic for operation "getteam_1_0 * " using the following steps: (1) Check for and retrieve the SOAP * Header structure, (2) Check for and retrieve the request SOAP Bod * y structure, (3) Invoke the user-written implementation (Impl) pr * ocedure, (4) Optionally set a response SOAP Body or response SOAP * Fault structure, (4) Finally, free language structures. *------------------------------------------------------------------*/ getteam_1_0Handler: procedure internal; /* Get the SOAP Header structure from the IMS Message Queue using the IRZQGETS API. */ @irz_soap_header_ptr = sysnull(); if (@irz_async_msg_header.soap_header_bit = '1'b) then do; @irz_struct_name = '@irz_soap_header'; @irz_struct_type = @irz_soap_header_struct; @irz_struct_ptr = sysnull(); @irz_struct_size = 0; call IRZQGETSWrapper(procedurename()); @irz_soap_header_ptr = @irz_struct_ptr; end; /* Get the request SOAP Body structure from the IMS Message Queue using the IRZQGETS API. */ getteam_1_0_ptr = sysnull(); if (@irz_async_msg_header.soap_body_bit = '1'b) then do; @irz_struct_name = 'getteam_1_0'; @irz_struct_type = @irz_soap_body_struct; @irz_struct_ptr = sysnull(); @irz_struct_size = 0; call IRZQGETSWrapper(procedurename()); getteam_1_0_ptr = @irz_struct_ptr; end; /* Invoke the user-written implementation of operation "getteam_1_ 0" passing pointers to the SOAP Header, request SOAP Body, respons e SOAP Body, and SOAP Fault structures. */ getteam_1_0Response_ptr = sysnull(); ServiceException_ptr = sysnull(); call getteam_1_0Impl(@irz_iopcb_mask_ptr, @irz_soap_header_ptr, gette am_1_0_ptr, getteam_1_0Response_ptr, ServiceException_ptr); /* Set the response SOAP Body or response SOAP Fault structure for operation "getteam_1_0". If no language structure was supplied by the user-written implementation (Impl) procedure, insert only the IRZPWSIO message header. */ @irz_struct_ptr = sysnull(); if (getteam_1_0Response_ptr ^= sysnull()) then do; @irz_struct_name = 'getteam_1_0Response'; @irz_struct_type = @irz_soap_body_struct; @irz_struct_ptr = getteam_1_0Response_ptr; @irz_struct_size = storage(getteam_1_0Response); end; else if (ServiceException_ptr ^= sysnull()) then do; @irz_struct_name = 'ServiceException'; @irz_struct_type = @irz_soap_fault_struct; @irz_struct_ptr = ServiceException_ptr; @irz_struct_size = storage(ServiceException); end; if (@irz_struct_ptr ^= sysnull()) then do; @irz_commit_structs = '1'b; call IRZQSETSWrapper(procedurename()); end; else do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'A response structure was not set by procedure ' || 'getteam_1_0Impl' || '.'); end; /* Free language structure "@irz_soap_header". */ if (@irz_soap_header_ptr ^= sysnull()) then do; call CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback); if (^fbcheck(@irz_cee_feedback, cee000)) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback){' || '@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || '}.'); end; else do; @irz_soap_header_ptr = sysnull(); end; end; /* Free language structure "getteam_1_0". */ if (getteam_1_0_ptr ^= sysnull()) then do; call CEEFRST(getteam_1_0_ptr, @irz_cee_feedback); if (^fbcheck(@irz_cee_feedback, cee000)) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEEFRST(getteam_1_0_ptr, @irz_cee_feedback){' || '@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || '}.'); end; else do; getteam_1_0_ptr = sysnull(); end; end; /* Free language structure "getteam_1_0Response". */ if (getteam_1_0Response_ptr ^= sysnull()) then do; call plifree(getteam_1_0Response_ptr); getteam_1_0Response_ptr = sysnull(); end; /* Free language structure "ServiceException". */ if (ServiceException_ptr ^= sysnull()) then do; call plifree(ServiceException_ptr); ServiceException_ptr = sysnull(); end; return; end getteam_1_0Handler; /*-------------------------------------------------------------------* * Procedure: getteam_1_0Impl * Description: Implement the business logic for operation "getteam_ * 1_0" using the following steps: (1) Process the optional SOAP Hea * der structure @irz_soap_header, (2) Process the request SOAP Body * structure "getteam_1_0", (3) Allocate and fill in the response S * OAP Body structure "getteam_1_0Response" or a SOAP Fault structu * re from the set {ServiceException}, (4) Finally, set the respecti * ve response SOAP Body or SOAP Fault structure pointer before retu * rning to the operation handler (Handler) procedure. If an error o * ccurs that requires a rollback, use parameter iopcb_mask_ptr to a * ccess the IOPCB. Note: If Language Environment callable services * are used to allocate storage for a response or fault structure, t * his MPP must be compiled with option CHECK(NOSTORAGE). *------------------------------------------------------------------*/ getteam_1_0Impl: procedure(iopcb_mask_ptr, irz_soap_header_ptr, getteam _1_0_ptr, getteam_1_0Response_ptr, ServiceException_ptr) internal; dcl iopcb_mask_ptr pointer byvalue; dcl irz_soap_header_ptr pointer byvalue; dcl getteam_1_0_ptr pointer byvalue; dcl getteam_1_0Response_ptr pointer byaddr; dcl ServiceException_ptr pointer byaddr; return; end getteam_1_0Impl; /*-------------------------------------------------------------------* * Procedure: setteam_1_0Handler * Description: Handle the protocol logic for operation "setteam_1_0 * " using the following steps: (1) Check for and retrieve the SOAP * Header structure, (2) Check for and retrieve the request SOAP Bod * y structure, (3) Invoke the user-written implementation (Impl) pr * ocedure, (4) Optionally set a response SOAP Body or response SOAP * Fault structure, (4) Finally, free language structures. *------------------------------------------------------------------*/ setteam_1_0Handler: procedure internal; /* Get the SOAP Header structure from the IMS Message Queue using the IRZQGETS API. */ @irz_soap_header_ptr = sysnull(); if (@irz_async_msg_header.soap_header_bit = '1'b) then do; @irz_struct_name = '@irz_soap_header'; @irz_struct_type = @irz_soap_header_struct; @irz_struct_ptr = sysnull(); @irz_struct_size = 0; call IRZQGETSWrapper(procedurename()); @irz_soap_header_ptr = @irz_struct_ptr; end; /* Get the request SOAP Body structure from the IMS Message Queue using the IRZQGETS API. */ setteam_1_0_ptr = sysnull(); if (@irz_async_msg_header.soap_body_bit = '1'b) then do; @irz_struct_name = 'setteam_1_0'; @irz_struct_type = @irz_soap_body_struct; @irz_struct_ptr = sysnull(); @irz_struct_size = 0; call IRZQGETSWrapper(procedurename()); setteam_1_0_ptr = @irz_struct_ptr; end; /* Invoke the user-written implementation of operation "setteam_1_ 0" passing pointers to the SOAP Header, request SOAP Body, respons e SOAP Body, and SOAP Fault structures. */ setteam_1_0Response_ptr = sysnull(); ServiceException_ptr = sysnull(); call setteam_1_0Impl(@irz_iopcb_mask_ptr, @irz_soap_header_ptr, sette am_1_0_ptr, setteam_1_0Response_ptr, ServiceException_ptr); /* Set the response SOAP Body or response SOAP Fault structure for operation "setteam_1_0". If no language structure was supplied by the user-written implementation (Impl) procedure, insert only the IRZPWSIO message header. */ @irz_struct_ptr = sysnull(); if (setteam_1_0Response_ptr ^= sysnull()) then do; @irz_struct_name = 'setteam_1_0Response'; @irz_struct_type = @irz_soap_body_struct; @irz_struct_ptr = setteam_1_0Response_ptr; @irz_struct_size = storage(setteam_1_0Response); end; else if (ServiceException_ptr ^= sysnull()) then do; @irz_struct_name = 'ServiceException'; @irz_struct_type = @irz_soap_fault_struct; @irz_struct_ptr = ServiceException_ptr; @irz_struct_size = storage(ServiceException); end; if (@irz_struct_ptr ^= sysnull()) then do; @irz_commit_structs = '1'b; call IRZQSETSWrapper(procedurename()); end; else do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'A response structure was not set by procedure ' || 'setteam_1_0Impl' || '.'); end; /* Free language structure "@irz_soap_header". */ if (@irz_soap_header_ptr ^= sysnull()) then do; call CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback); if (^fbcheck(@irz_cee_feedback, cee000)) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback){' || '@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || '}.'); end; else do; @irz_soap_header_ptr = sysnull(); end; end; /* Free language structure "setteam_1_0". */ if (setteam_1_0_ptr ^= sysnull()) then do; call CEEFRST(setteam_1_0_ptr, @irz_cee_feedback); if (^fbcheck(@irz_cee_feedback, cee000)) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEEFRST(setteam_1_0_ptr, @irz_cee_feedback){' || '@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || '}.'); end; else do; setteam_1_0_ptr = sysnull(); end; end; /* Free language structure "setteam_1_0Response". */ if (setteam_1_0Response_ptr ^= sysnull()) then do; call plifree(setteam_1_0Response_ptr); setteam_1_0Response_ptr = sysnull(); end; /* Free language structure "ServiceException". */ if (ServiceException_ptr ^= sysnull()) then do; call plifree(ServiceException_ptr); ServiceException_ptr = sysnull(); end; return; end setteam_1_0Handler; /*-------------------------------------------------------------------* * Procedure: setteam_1_0Impl * Description: Implement the business logic for operation "setteam_ * 1_0" using the following steps: (1) Process the optional SOAP Hea * der structure @irz_soap_header, (2) Process the request SOAP Body * structure "setteam_1_0", (3) Allocate and fill in the response S * OAP Body structure "setteam_1_0Response" or a SOAP Fault structu * re from the set {ServiceException}, (4) Finally, set the respecti * ve response SOAP Body or SOAP Fault structure pointer before retu * rning to the operation handler (Handler) procedure. If an error o * ccurs that requires a rollback, use parameter iopcb_mask_ptr to a * ccess the IOPCB. Note: If Language Environment callable services * are used to allocate storage for a response or fault structure, t * his MPP must be compiled with option CHECK(NOSTORAGE). *------------------------------------------------------------------*/ setteam_1_0Impl: procedure(iopcb_mask_ptr, irz_soap_header_ptr, setteam _1_0_ptr, setteam_1_0Response_ptr, ServiceException_ptr) internal; dcl iopcb_mask_ptr pointer byvalue; dcl irz_soap_header_ptr pointer byvalue; dcl setteam_1_0_ptr pointer byvalue; dcl setteam_1_0Response_ptr pointer byaddr; dcl ServiceException_ptr pointer byaddr; return; end setteam_1_0Impl; /*-------------------------------------------------------------------* * Procedure: ping_1_0Handler * Description: Handle the protocol logic for operation "ping_1_0" u * sing the following steps: (1) Check for and retrieve the SOAP Hea * der structure, (2) Check for and retrieve the request SOAP Body s * tructure, (3) Invoke the user-written implementation (Impl) proce * dure, (4) Optionally set a response SOAP Body or response SOAP Fa * ult structure, (4) Finally, free language structures. *------------------------------------------------------------------*/ ping_1_0Handler: procedure internal; /* Get the SOAP Header structure from the IMS Message Queue using the IRZQGETS API. */ @irz_soap_header_ptr = sysnull(); if (@irz_async_msg_header.soap_header_bit = '1'b) then do; @irz_struct_name = '@irz_soap_header'; @irz_struct_type = @irz_soap_header_struct; @irz_struct_ptr = sysnull(); @irz_struct_size = 0; call IRZQGETSWrapper(procedurename()); @irz_soap_header_ptr = @irz_struct_ptr; end; /* No request SOAP Body structure is defined for operation "ping_1 _0". */ /* Invoke the user-written implementation of operation "ping_1_0" passing pointers to the SOAP Header, request SOAP Body, response S OAP Body, and SOAP Fault structures. */ ping_1_0Response_ptr = sysnull(); ServiceException_ptr = sysnull(); call ping_1_0Impl(@irz_iopcb_mask_ptr, @irz_soap_header_ptr, ping_1_0 Response_ptr, ServiceException_ptr); /* Set the response SOAP Body or response SOAP Fault structure for operation "ping_1_0". If no language structure was supplied by th e user-written implementation (Impl) procedure, insert only the IR ZPWSIO message header. */ @irz_struct_ptr = sysnull(); if (ping_1_0Response_ptr ^= sysnull()) then do; @irz_struct_name = 'ping_1_0Response'; @irz_struct_type = @irz_soap_body_struct; @irz_struct_ptr = ping_1_0Response_ptr; @irz_struct_size = storage(ping_1_0Response); end; else if (ServiceException_ptr ^= sysnull()) then do; @irz_struct_name = 'ServiceException'; @irz_struct_type = @irz_soap_fault_struct; @irz_struct_ptr = ServiceException_ptr; @irz_struct_size = storage(ServiceException); end; if (@irz_struct_ptr ^= sysnull()) then do; @irz_commit_structs = '1'b; call IRZQSETSWrapper(procedurename()); end; else do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'A response structure was not set by procedure ' || 'ping_1_0Impl' || '.'); end; /* Free language structure "@irz_soap_header". */ if (@irz_soap_header_ptr ^= sysnull()) then do; call CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback); if (^fbcheck(@irz_cee_feedback, cee000)) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback){' || '@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || '}.'); end; else do; @irz_soap_header_ptr = sysnull(); end; end; /* Free language structure "ping_1_0Response". */ if (ping_1_0Response_ptr ^= sysnull()) then do; call plifree(ping_1_0Response_ptr); ping_1_0Response_ptr = sysnull(); end; /* Free language structure "ServiceException". */ if (ServiceException_ptr ^= sysnull()) then do; call plifree(ServiceException_ptr); ServiceException_ptr = sysnull(); end; return; end ping_1_0Handler; /*-------------------------------------------------------------------* * Procedure: ping_1_0Impl * Description: Implement the business logic for operation "ping_1_0 * " using the following steps: (1) Process the optional SOAP Header * structure @irz_soap_header, (2) Process the request SOAP Body st * ructure "n/a", (3) Allocate and fill in the response SOAP Body st * ructure "ping_1_0Response" or a SOAP Fault structure from the se * t {ServiceException}, (4) Finally, set the respective response SO * AP Body or SOAP Fault structure pointer before returning to the o * peration handler (Handler) procedure. If an error occurs that req * uires a rollback, use parameter iopcb_mask_ptr to access the IOPC * B. Note: If Language Environment callable services are used to al * locate storage for a response or fault structure, this MPP must b * e compiled with option CHECK(NOSTORAGE). *------------------------------------------------------------------*/ ping_1_0Impl: procedure(iopcb_mask_ptr, irz_soap_header_ptr, ping_1_0Re sponse_ptr, ServiceException_ptr) internal; dcl iopcb_mask_ptr pointer byvalue; dcl irz_soap_header_ptr pointer byvalue; dcl ping_1_0Response_ptr pointer byaddr; dcl ServiceException_ptr pointer byaddr; return; end ping_1_0Impl; /*-------------------------------------------------------------------* * Procedure: ping_2_0Handler * Description: Handle the protocol logic for operation "ping_2_0" u * sing the following steps: (1) Check for and retrieve the SOAP Hea * der structure, (2) Check for and retrieve the request SOAP Body s * tructure, (3) Invoke the user-written implementation (Impl) proce * dure, (4) Optionally set a response SOAP Body or response SOAP Fa * ult structure, (4) Finally, free language structures. *------------------------------------------------------------------*/ ping_2_0Handler: procedure internal; /* Get the SOAP Header structure from the IMS Message Queue using the IRZQGETS API. */ @irz_soap_header_ptr = sysnull(); if (@irz_async_msg_header.soap_header_bit = '1'b) then do; @irz_struct_name = '@irz_soap_header'; @irz_struct_type = @irz_soap_header_struct; @irz_struct_ptr = sysnull(); @irz_struct_size = 0; call IRZQGETSWrapper(procedurename()); @irz_soap_header_ptr = @irz_struct_ptr; end; /* No request SOAP Body structure is defined for operation "ping_2 _0". */ /* Invoke the user-written implementation of operation "ping_2_0" passing pointers to the SOAP Header, request SOAP Body, response S OAP Body, and SOAP Fault structures. */ ServiceException_ptr = sysnull(); call ping_2_0Impl(@irz_iopcb_mask_ptr, @irz_soap_header_ptr, ServiceE xception_ptr); /* Set the response SOAP Body or response SOAP Fault structure for operation "ping_2_0". If no language structure was supplied by th e user-written implementation (Impl) procedure, insert only the IR ZPWSIO message header. */ @irz_struct_ptr = sysnull(); if (ServiceException_ptr ^= sysnull()) then do; @irz_struct_name = 'ServiceException'; @irz_struct_type = @irz_soap_fault_struct; @irz_struct_ptr = ServiceException_ptr; @irz_struct_size = storage(ServiceException); end; if (@irz_struct_ptr ^= sysnull()) then do; @irz_commit_structs = '1'b; call IRZQSETSWrapper(procedurename()); end; else do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'A response structure was not set by procedure ' || 'ping_2_0Impl' || '.'); end; /* Free language structure "@irz_soap_header". */ if (@irz_soap_header_ptr ^= sysnull()) then do; call CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback); if (^fbcheck(@irz_cee_feedback, cee000)) then do; call SignalError(trim(packagename()) || '#' || trim(procedurename()) || '(): ' || 'CEEFRST(@irz_soap_header_ptr, @irz_cee_feedback){' || '@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || '}.'); end; else do; @irz_soap_header_ptr = sysnull(); end; end; /* Free language structure "ServiceException". */ if (ServiceException_ptr ^= sysnull()) then do; call plifree(ServiceException_ptr); ServiceException_ptr = sysnull(); end; return; end ping_2_0Handler; /*-------------------------------------------------------------------* * Procedure: ping_2_0Impl * Description: Implement the business logic for operation "ping_2_0 * " using the following steps: (1) Process the optional SOAP Header * structure @irz_soap_header, (2) Process the request SOAP Body st * ructure "n/a", (3) Allocate and fill in the response SOAP Body st * ructure "n/a" or a SOAP Fault structure from the set {ServiceExc * eption}, (4) Finally, set the respective response SOAP Body or SO * AP Fault structure pointer before returning to the operation hand * ler (Handler) procedure. If an error occurs that requires a rollb * ack, use parameter iopcb_mask_ptr to access the IOPCB. Note: If L * anguage Environment callable services are used to allocate storag * e for a response or fault structure, this MPP must be compiled wi * th option CHECK(NOSTORAGE). *------------------------------------------------------------------*/ ping_2_0Impl: procedure(iopcb_mask_ptr, irz_soap_header_ptr, ServiceExc eption_ptr) internal; dcl iopcb_mask_ptr pointer byvalue; dcl irz_soap_header_ptr pointer byvalue; dcl ServiceException_ptr pointer byaddr; return; end ping_2_0Impl; /*-------------------------------------------------------------------* * Procedure: IRZQGETSWrapper * Description: Get a language structure from the IMS Message Queue * using the IRZQGETS API. *------------------------------------------------------------------*/ IRZQGETSWrapper: procedure(caller_procedurename) internal; dcl caller_procedurename char(*) byaddr; @return_code = IRZQGETS(@irz_async_msg_header_ptr, @irz_iopcb_mask_ptr, @irz_struct_type, @irz_struct_name, @irz_struct_ptr, @irz_struct_size, @irz_cee_feedback_ptr, @irz_debug); if (@return_code ^= @irz_success) then do; if (@irz_struct_ptr ^= sysnull()) then do; call plifree(@irz_struct_ptr); @irz_struct_ptr = sysnull(); @irz_struct_size = 0; end; host_text_1 = @irz_struct_name; call SignalError(trim(packagename()) || '#' || trim(caller_procedurename) || '().' || trim(procedurename()) || '(): ' || '@return_code=IRZQGETS(@irz_async_msg_header_ptr,' || '@irz_iopcb_mask_ptr, @irz_struct_type,' || '@irz_struct_name, @irz_struct_ptr,' || '@irz_struct_size, @irz_cee_feedback_ptr,' || '@irz_debug){@return_code=' || trim(@return_code) || ',@irz_iopcb_mask.iopcb_status_code=' || @irz_iopcb_mask.iopcb_status_code || ',@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || ',@irz_struct_type=' || trim(@irz_struct_type) || ',@irz_struct_name=' || trim(host_text_1) || ',@irz_struct_size=' || trim(@irz_struct_size) || '}.'); end; return; end IRZQGETSWrapper; /*-------------------------------------------------------------------* * Procedure: IRZQSETSWrapper * Description: Set a language structure and optionally commit it to * the IMS Message Queue using the IRZQSETS API. *------------------------------------------------------------------*/ IRZQSETSWrapper: procedure(caller_procedurename) internal; dcl caller_procedurename char(*) byaddr; @return_code = IRZQSETS(@irz_async_msg_header_ptr, @irz_iopcb_mask_ptr, @irz_struct_type, @irz_struct_name, @irz_struct_ptr, @irz_struct_size, @irz_commit_structs, @irz_cee_feedback_ptr, @irz_debug); if (@return_code ^= @irz_success) then do; host_text_1 = @irz_struct_name; call SignalError(trim(packagename()) || '#' || trim(caller_procedurename) || '().' || trim(procedurename()) || '(): ' || '@return_code=IRZQSETS(@irz_async_msg_header_ptr,' || '@irz_iopcb_mask_ptr, @irz_struct_type,' || '@irz_struct_name, @irz_struct_ptr,' || '@irz_struct_size, @irz_commit_structs,' || '@irz_cee_feedback_ptr, @irz_debug){' || '@return_code=' || trim(@return_code) || ',@irz_iopcb_mask.iopcb_status_code=' || @irz_iopcb_mask.iopcb_status_code || ',@irz_cee_feedback.msgno=' || trim(@irz_cee_feedback.msgno) || ',@irz_struct_type=' || trim(@irz_struct_type) || ',@irz_struct_name=' || trim(host_text_1) || ',@irz_struct_size=' || trim(@irz_struct_size) || ',@irz_commit_structs=' || trim(@irz_commit_structs) || '}.'); end; return; end IRZQSETSWrapper; /*-------------------------------------------------------------------* * Procedure: SignalError * Description: Common procedure for logging and signaling errors. T * his procedure may be customized as needed. *------------------------------------------------------------------*/ SignalError: procedure(text) internal; dcl text char(*) varying byaddr; put skip list(datetime() || ' ERROR, ' || text); flush file(sysprint); signal error; return; end SignalError; end WSPOC1; end WSPOC1Package;