Establish ownership type call

When CICS® loads any program, the CICS Program Control Program calls Language Environment to determine if Language Environment is managing the program. It then looks up the program name in its Processing Program Table (DFHPPT) to get its language type, determines whether it is in storage, and if it is, where its entry point is. If the program is not in storage, it is loaded into storage and its entry point address is placed in its PPT entry.

If the program is, for example, a COBOL program, CICS needs to know which language library (OS/VS COBOL, VS COBOL II, or Language Environment) to interface with. For Language Environment-enabled programs, the PPT's LANG parameter is not required (or LANG=NOTAPPLIC). Language Environment-enabled programs are identifiable through the Language Environment eye catcher at their entry point and through the information provided in Program Prolog Areas PPA1 and PPA2. For more information on requirements of being a Language Environment-enabled program, see Routine layout.

CICS discovers the language type and the run unit work area length (if desired to be preallocated) with "Establish Ownership Type Call" to the Language Environment-CICS interface routine the first time it loads a program. This call is made after partition initialization and prior to Thread and/or run unit initialization call and is subject to certain rules:

Syntax

Call CEECCICS (50, rsncode, syseib, preasa, ptoken, reserved1, reserved2, pgminfo1, pgminfo2) Retcode (rc)

rsncode (output)
A fullword integer in nnnffrr format to contain the member language-specific establish ownership reason code or one of the following Language Environment reason codes:
15000
Invalid parameter was passed
15020
Program ownership type and/or run unit work area length was not established
15030
Language-specific establish ownership failed
15060
The application provided a program object that cannot be supported with the current level of CICS.
syseib
The system EXEC interface block, as defined by CICS. Its address is above 16M.
preasa
A preallocated save area (above 16M) supplied by CICS. The size of this save area is 248 (DFHEISTG length) bytes.
ptoken
A doubleword value containing the Language Environment partition token passed back to CICS at partition initialization.
reserved1
A reserved argument; it is neither referred to, nor set by, Language Environment.
reserved2
A reserved argument; it is neither referred to, nor set by, Language Environment.
pgminfo1
The following structure of information supplied by CICS to Language Environment, as shown in Figure 1.
Figure 1. Structure of information supplied to CICS by Language Environment for PGMINFO1
DCL 1 PGMINFO1,                       /* Data from CICS to Lang Env    */
      2 STRUC_LENGTH   FIXED BIN(31), /*+00 pgminfo1 structure length  */
      2 RULANG,                       /*+04 Run unit's "main" program 
                                            language defined in PPT as */
        3 ASSEMBLER    BIT(1),        /*+04.0 LANG=ASSEMBLER           */
        3 C370         BIT(1),        /*+04.1 LANG=C/370               */
        3 COBOL        BIT(1),        /*+04.2 LANG=COBOL II            */
        3 PLI          BIT(1),        /*+04.3 LANG=PL/I                */
        3 RPG          BIT(1),        /*+04.4 LANG=RPG                 */
        3 NOTAPPLIC    BIT(1),        /*+04.5 LANG=NOTAPPLIC or blank  */
        3 *            BIT(2),        /*    Reserved                   */
      2 FLAGS,                        /*+05 Additional Flags           */
        3 OPEN_PROGRAM BIT(1),        /*+05.0 1 = Program runs only on
                                                  OTE TCB and can use 
                                                  Open C functions    
                                              0 = Program may run on  
                                                  OTE or QR TCB        */
        3 *            BIT(7),        /*    Reserved                   */
      2 RULOADMOD,                                                    
        3 RULOADA      POINTER,       /*+08 Run unit load module addr  */
        3 RULOADL      FIXED BIN(31), /*+0C Run unit load module length */
      2 ENTRY_STATIC,                                                 
        3 RUENTRY      POINTER,       /*+10 Run unit Entry Point Addr  */
        3 RUSTATIC     POINTER,       /*+14 Run unit Static Address    */
      2 PREARWA_31     POINTER,       /*+18 Preallocated run unit work */
                                      /*    area above 16Meg           */
      2 PREARWA_24     POINTER,       /*+1C Preallocated run unit work */
                                      /*    area below 16Meg           */
      2 APAL           POINTER,       /*+20 Application Pgm Arg List   */
      2 RTOPTS         POINTER,       /*+24 Runtime options string    */
                                      /*    specified during debugging */
      2 RTOPTSL        FIXED BIN(31), /*+28 Runtime opts string length */
      2 RULOAD_NAMEA   POINTER,       /*+2C Address of the run unit    */
                                      /*    load module name           */
      2 *              POINTER,       /*+30 Reserved                   */
      2 RUDEBUGA       POINTER,       /*+34 Address of the run unit    */
                                      /*    Debug Info Block           */
struc_length
A fullword integer value containing the pgminfo1 structure length.
rulang
A fullword binary value indicating the language type of the run unit (main program) as defined in PPT. In PPT, LANG=NOTAPPLIC can be used for Language Environment-enabled application programs. For bit definitions, see Figure 1.
ruloada
A fullword value containing the load module address of the run unit. This address in conjunction with the entry point address is used to access run unit prolog information (PPA1, PPA2) when necessary.
ruloadl
A fullword value containing the load module length of the run unit. This value is used to validate the addresses accessed through the run unit prolog information (PPA1, PPA2) when necessary.
ruentry
A fullword value containing the entry point address of the run unit. This address is given control at run unit begin invocation call for Language Environment-enabled programs. The run unit entry is established at link-edit time. The high-order bit indicates the AMODE of the run unit.
rustatic
A fullword. This is passed in R0 to the main program at run unit begin invocation call.
ruload_namea
A fullword address that points to the load module name. The load module name is 8-bytes long and is padded with blanks.
rudebuga
A fullword address that points to the run unit degug info block. The debug info block is 8-bytes long and is padded with blanks.
pgminfo2 (output)
The structure of information supplied to CICS by Language Environment, as shown in the code example below.
DCL 1 PGMINFO2,                         /* Pgm Info from Lang Env to   */
                                        /*    CICS                     */
      2 STRUC_LENGTH     FIXED BIN(31), /* pgminfo2 structure length   */
      2 RWALEN_31        FIXED BIN(31), /* Run unit workarea length    */
                                        /* above 16 megabyte           */
      2 RWALEN_24        FIXED BIN(31), /* Run unit workarea length    */
                                        /* below 16 megabyte           */
      2 PGMTYPE          BIT(32),       /* Program Type of the "Main"  */
        3 CEEENABLE      BIT(2),        /* Lang Env Enablement         */
                                        /* 11 - Fully Lang Env-        */
                                        /*      enabled                */
                                        /*      programs (w/ PPAs)     */
                                        /* 10 - Partially Lang Env-    */
                                        /*      enabled programs (old  */
                                        /*      or new w/o PPAs)       */
                                        /* 01 - Not Lang Env-enabled   */
                                        /*      programs               */
                                        /* 00 - Don't know: programs   */
                                        /*      which can't be identi- */
                                        /*      fied. eg. OS/VS COBOL  */
        3 MIXED          BIT(1),        /* Mixed or Single language    */
                                        /* load module                 */
                                        /*  1 - Mixed                  */
                                        /*  0 - Single                 */
        3 COMPAT         BIT(1),        /* Compatibility Requirement   */
                                        /*  1 - Required               */
                                        /*  0 - Not Required           */
        3 EXECUTE        BIT(1),        /* Program Execution           */
                                        /*  1 - Executable             */
                                        /*  0 - Not Executable         */
        3 ASSEMBLER      BIT(1),        /* "Main" Program Language     */
                                        /*  1 - Assembler              */
                                        /*  0 - Not Assembler          */
        3 C370           BIT(1),        /* "Main" Program Language     */
                                        /*  1 - C/370                  */
                                        /*  0 - Not C/370              */
        3 COBOLII        BIT(1),        /* "Main" Program Language     */
                                        /*  1 - VS COBOL II            */
                                        /*  0 - Not VS COBOL II        */
        3 OSCOBOL        BIT(1),        /* "Main" Program Language     */
                                        /*  1 - OS/VS COBOL            */
                                        /*  0 - Not OS/VS COBOL        */
        3 PLI            BIT(1),        /* "Main" Program Language     */
                                        /*  1 - OS PL/I                */
                                        /*  0 - Not OS PL/I            */
        3 UPDATE_PGMINFO2 BIT(1),       /* Output parameter on rununit */
                                        /* termination call. ON= tells */
                                        /* CICS to update its control  */
                                        /* blocks with the following   */
                                        /* fields in PGMINFO2:         */
                                        /* - RWALEN_31                 */
                                        /* - RWA;EM_24                 */
                                        /* - STG_TUNE_AREA             */
        3 *              BIT(21),       /* Reserved                    */
      2 * CHAR(4),                      /* additional CEL defined info */
        3 EPTYPE         FIXED(8),      /* type of module entry point: */
                                        /* 0 - old                     */ 
                                        /* 1 - ppa1                    */
                                        /* 2 - ceestart                */
                                        /* 3 - ppa1 w v1r2 ceestart    */
                                        /* 4 - v1r2 ceestart           */
        3 NEEDOPTP       BIT(1),        /* Member language of main     */
                                        /* needs to be called for      */ 
                                        /* option processing event     */
        3 PGM_ALL31_ON   BIT(1),        /* 31 bit                      */
        3 STX_LDMOD_ELIG BIT(1),        /* Load module is eligible for */
                                        /* the storage tuning user     */
                                        /* exit.                       */
                                        /* ON = enable the storage     */
                                        /*   tuning user exit for this */
                                        /*   load module.              */
                                        /* OFF = disable the storage   */
                                        /*   tuning user exit for this */
                                        /*   load module.              */
        3 *              BIT(13),       /*                             */
        3 MEMID          FIXED(8),      /* Member id of the language   */
                                        /* of the "main" program       */
      2 *                CHAR(8)        /* Est Ownership return fields */
        3 dopt_ptr       POINTER,       /* pointer to default OCB      */
        3 uopt_ptr       POINTER,       /* pointer to user OCB         */
      2 AUTOTUNE_AREA@   POINTER,       /* pointer to a 96 byte area   */
                                        /* for Lang Env to remember    */
                                        /* storage tuning values.      */
struc_length
A fullword integer value that contains the pgminfo2 structure length.
rwalen_31 (output)
A fullword value to contain the above 16M run unit work area length. This work area is preallocated by CICS and passed to Language Environment-CICS interface routine at run unit initialization call. The run unit work area length is the sum of the run unit work areas required by Language Environment and member languages.
rwalen_24 (output)
A fullword value to contain the below 16M run unit work area length. This work area is preallocated by CICS and passed to Language Environment-CICS interface routine at run unit initialization call. The run unit work area length is the sum of the run unit work areas required by Language Environment and member languages.
pgmtype (output)
A fullword value to contain information regarding the main program of the run unit:
  • If the main program is Language Environment enablement.
  • If the run unit is a single or mixed language load module.
  • If compatibility is required at invocation.
memid (output)
A fullword value to contain the member ID of the language of the main program of the run unit. CICS can provide this information back to the system programmer if desired.