How a PL/I edit routine interacts with CICS

The user edit program is called by using the standard CICS LINK command interface. Your program is executing on a different program level than the main QMF program. The user edit program must be translated using the CICS translator for PL/I.

The CICS communications area DFHCOMMAREA is used to provide addresses to the user edit routine program parameters, DXEECS, input data, and output data as shown in the following diagram.

FHCOMMAREA consists of three boxes all labeled as  pointer. The first
box points to DXEECS, the second box points to Input data, and the  third
box points to Result buffer.

After translation, the CICS translator provides a procedure statement that describes the CICS environment block DFHEIBLK. Provide a parameter that is a pointer to the CICS communications block DFHCOMMAREA such as the following example:

DSQUECIC:
    PROCEDURE(DFHCOMMP) OPTIONS(REENTRANT,MAIN);
 

QMF provides addresses to the user edit routine control block DXEECS, input data, and output data in the CICS communications area DFHCOMMAREA. Provide your own description of the DFHCOMMAREA in the PL/I program as follows:

/*******************************************************************/
  /*  CICS DFHCOMM ARE DESCRIPTION OF EDIT EXIT PARAMETERS           */
  /*******************************************************************/
  DECLARE
    DFHCOMMP PTR;
  DECLARE
    1  DFHCOMM BASED(DFHCOMMP),
       02 DFHCOMM_ECSPTR PTR,
       02 DFHCOMM_INPTR  PTR,
       02 DFHCOMM___OUTPTR PTR;
 

To provide addressability to the user edit routine control block DXEECS, input data area ECSINPT, and the result data area ECSRSLT, set the addresses of these data areas to the values located in DFHCOMMAREA as in the following example:

ECSPTR   = DFHCOMM_ECSPTR    /* ADDRESS OF DXEECS:
                                     EDIT CODE SPECIFICATIONS        */
    ECSINPTP = DFHCOMM_INPTR     /* ADDRESS OF INPUT DATA           */
    ECSRSLTP = DFHCOMM_OUTPTR    /* ADDRESS OF RESULT AREA          */

A PL/I data structure is shipped with QMF as DXEECSP, located in library QMF720.SDSQSAPE. Include this structure in your program.

Return control to QMF using a standard CICS RETURN command such as the following:

EXEC CICS RETURN;
[ Previous Page | Next Page | Contents | Index ]