Copyright © Cloud Software Group, Inc. All Rights Reserved |
Line Number Saves the address and length of the incoming COMMAREA in the local variables COMMAREA_PTR and COMMAREA_LEN. Sets @MAP.ADDRESS to zero as required to allocate ENVIRONMENT storage. Sets @MAP.SIZE to the size of a single row of the MAP table EMPLOYEE_SUMMARY (shown in Sample MAP Tables). Saves the address of the newly allocated space in the local variable NEWCOMMAREA_PTR. Sets the address and length of the newly allocated space in the table @SESSION, thus making the new block of storage the active COMMAREA. Uses the MAP table COMM_HEADER (shown in Sample MAP Tables) to map the area addressed by the original COMMAREA pointer. Uses the MAP table INPUT_HEADER (shown in INPUT_HEADER Table) to map the area addressed by the field COMM_HEADER.POINTER. The FORALL statement retrieves records starting at address EMPLOYEE_PTR whose SALARY value is greater than or equal to 1000. The record count in INPUT_HEADER.EMPLOYEE_COUNT is used to limit the number of occurrences in storage traversed by the FORALL. Fields in the summary table EMPLOYEE_SUMMARY (shown in EMPLOYEE_RECORD Table) are copied from the MAP table EMPLOYEE_RECORD (shown in EMPLOYEE_RECORD Table). The key field is set to 1 so that the first logical occurrence of the EMPLOYEE_SUMMARY table is the one written.The REPLACE statement writes the EMPLOYEE_SUMMARY data to the storage area pointed to by NEWCOMMAREA_PTR. The external routine CICS_ROUTINE (which must be listed in the ROUTINES table) is called. Since the EMPLOYEE_SUMMARY record was written to the storage area pointed to by @SESSION.COMMAREA, the external CICS routine has access to it. F, G, and H Returns the COMMAREA pointer and length to their original values for the original caller to use (for example, for another call to this routine).TIBCO Object Service Broker for z/OS External Environments for more information on the routines.
Copyright © Cloud Software Group, Inc. All Rights Reserved |