CEETDLI—Invoke IMS

CEETDLI provides an interface to PL/I facilities that operates in IMS™. In assembler, COBOL, PL/I, and C/C++, you can also invoke IMS by using the following interfaces:
  • In assembler, the ASMTDLI interface
  • In COBOL, the CBLTDLI interface
  • In PL/I, the PLITDLI interface
  • In C/C++, the CTDLI interface, a ctdli() function call
CEETDLI performs essentially the same functions as these interfaces, but it offers some advantages, particularly if you plan to run an ILC application in IMS.

The names CEETDLI, AIBTDLI, ASMTDLI, CBLTDLI, CTDLI, and PLITDLI are all interpreted as IMS interfaces. If you are currently using them in any other way in your application, you must change them. The CEETDLI interface supports calls to IMS that use an application interface block (AIB) or a program communication block (PCB).

Read syntax diagramSkip visual syntax diagram
Syntax

>>-CEETDLI--(--+--------------+--,--function--,--+------+--)---><
               '-parmcount--,-'                  '-args-'      

parmcount
A fullword integer specifying the total number of arguments for the CEETDLI call. This option usually is not needed and can be omitted; it is supported for compatibility with earlier interface modules.
function
The IMS function that you want to perform. The possible values for this field are defined by IMS, not Language Environment.
args
Arguments that you pass to IMS. You cannot pass runtime options as CEETDLI arguments. You cannot alter the settings of runtime options when invoking IMS facilities. The order and meaning of the arguments is defined by IMS, not Language Environment.

Usage notes

  • CEETDLI is not supported with CICS®.
  • z/OS UNIX considerations—IMS supports only applications that use the POSIX(ON) runtime option from a single thread. Calls to z/OS UNIX threading functions are restricted under IMS. See z/OS XL C/C++ Programming Guide for a list of restrictions on running IMS and z/OS UNIX.

For more information

  • For more information about AIB and a complete description of all available IMS functions and argument parameters you can specify in CEETDLI, see IMS Application Programming Guide.
  • For more information about CEETDLI in the context of other DLI interfaces, and in the context of IMS condition handling, see z/OS Language Environment Programming Guide.

Examples

  1. Following is an example of CEETDLI called by C.
    /*Module/File Name: EDCMRCR   */
    
    #pragma runopts(env(IMS),plist(IMS))
    #include <ims.h>
    #include <leawi.h>
    #define io_pcb ((IO_PCB_TYPE *)(__pcblist??(0??)))
    
    /* ------------------------------------------------ */
    /*                                                  */
    /*   Function: Use CEETDLI - interface to IMS       */
    /*                           from C.                */
    /*                                                  */
    /*   In this example, a call is made to CEETDLI     */
    /*   to interface to IMS for an IMS service.        */
    /*                                                  */
    /* ------------------------------------------------ */
    /*                 ENTRY POINT                      */
    /* ------------------------------------------------ */
    
    main() {
    
      static char func_GU??(4??) = "GU  ";
      char msg_seg_io_area??(32??);
      CEETDLI(func_GU,io_pcb,msg_seg_io_area);
    }
  2. Following is an example of CEETDLI called by COBOL.
          *Module/File Name: IGZTTDLI
          ***********************************************/
          **                                            */
          ** Function: Use CEETDLI - interface to IMS   */
          **                         from COBOL.        */
          **                                            */
          ** In this example, a call is made to CEETDLI */
          ** to interface to IMS for an IMS service.    */
          **                                            */
          ***********************************************/
           IDENTIFICATION DIVISION.
           PROGRAM-ID. CBL2IMS.
           DATA DIVISION.
           WORKING-STORAGE SECTION.
           77  FUNC-GU              PIC X(4) VALUE "GU  ".
           01  MSG-SEG-IO-AREA      PIC X(32).
           LINKAGE SECTION.
           01  IO-PCB               PIC X(48).
          ** ENTRY POINT:                               */
           PROCEDURE DIVISION USING IO-PCB.
               CALL "CEETDLI" USING FUNC-GU,IO-PCB,
                                    MSG-SEG-IO-AREA.
               GOBACK.
  3. Following is an example of CEETDLI called by PL/I.
    *PROCESS MACRO SYSTEM(IMS);
     /*Module/File Name: IBMTDLI                         */
     /* ------------------------------------------- */
     /*                                             */
     /* Function: Use CEETDLI - interface to IMS    */
     /*                         from PL/I.          */
     /*                                             */
     /* In this example, a call is made to CEETDLI  */
     /* to interface to IMS for an IMS service.     */
     /*                                             */
     /* ------------------------------------------- */
     /*               ENTRY POINT                   */
     /* ------------------------------------------- */
     PLI2IMS: PROCEDURE(IO_PTR) OPTIONS(MAIN NOEXECOPS);
    
     %INCLUDE   CEEIBMAW;
    
     DCL   FUNC_GU         CHAR(4)   INIT('GU  ');
    
     DCL   IO_PTR          PTR;
     DCL 1 IO_PCB          CHAR(48) BASED (IO_PTR);
    
     DCL 1 MSG_SEG_IO_AREA CHAR(32);
    
     CALL CEETDLI (FUNC_GU, IO_PCB, MSG_SEG_IO_AREA);
    
     RETURN;
    
     END PLI2IMS;