You are currently offline, waiting for your internet to reconnect

Using PL/I Programs with COM Transaction Integrator

This article was previously published under Q183179
SUMMARY
PL/I is not supported by Component Builder. Nevertheless, you can use COMTransaction Integrator for CICS and IMS (COMTI) with PL/I programsoperating in CICS or IMS. To do so, code the programs with datadeclarations that define memory the same way that the equivalent COBOLdeclarations do.

For example, a CICS program can perform an EXEC CICS LINK to either a PL/Iprogram or a COBOL program if the structure defining DFHCOMMAREA in the twoprograms is equivalent. Similarly, a COMTI component could be used equallywell with either program using a CICS LINK Remote Environment (RE). Thesame mechanisms hold true by extrapolation for CICS and IMS REs.

All you need to know is how to achieve the same memory mapping in PL/I andCOBOL. This article presents data type comparisons for the two languages.
MORE INFORMATION
Note that the developer who is responsible for creating components for PL/Itransaction programs (TP) should be familiar with both languages.

Data alignment is an important issue. PL/I structures are ALIGNED bydefault; for example, a fullword integer (4 bytes) within a structure isALIGNED on a mainframe fullword boundary. This can cause a discrepancy withsimilar COBOL statements and the PL/I structure should probably be declaredas UNALIGNED. This is particularly important for the DFHCOMMAREAdeclaration. This data structure must be unaligned. You must, therefore,specify the UNALIGNED keyword on the structure declaration.

You should use care when dealing with the COBOL "OCCURS DEPENDING ON"clause. The following samples show a comparison of a COBOL constructionwith a similar PL/I construction.

COBOL Sample

   01   STRUCT1.   02   X   PIC S9(4) COMP.   02   Y OCCURS 1 TO 100 TIMES DEPENDING ON X PIC X(10).				

PL/I Sample

   DCL   1   STRUCT1,         2   X   FIXED BIN(15),         2   Y (1:100 REFER(X)) CHAR(10);				

COMTI Data Conversion Language Mapping Lists

      VB type          COBOL type                      PL/I type      -------     --------------------              ---------------      Integer        PIC S9(n) COMP                   FIXED BIN(15)                     (n <= 4)                     (see NOTE)                     PIC S9(n) COMP-3                 FIXED DEC(n)                     (n <= 4)                         (n <= 4)                     PIC S9(n)                        PIC '9(n-1)T'                     (n <= 4)                         (n <= 4)                     PIC S9(n) LEADING                PIC 'T9(n-1)'                     (n <= 4)                         (n <= 4)                     PIC S9(n) SIGN SEPARATE           PIC '9(n)S'                     (n <= 4)                          (n <= 4)                     PIC S9(n)                         PIC 'S9(n)'                     SIGN SEPARATE LEADING             (n <= 4)                     (n <= 4)      Long           PIC S9(n) COMP (n <= 9)           FIXED BIN(31)                     PIC S9(n) COMP-3                  FIXED DEC(n)                     (n <= 9)                          (n <= 9)                     PIC S9(n)                         PIC '9(n-1)T'                     (n <= 9)                          (n <= 9)                     PIC S9(n) LEADING                 PIC 'T9(n-1)'                     (n <= 9)                          (n <= 9)                     PIC S9(n) SIGN SEPARATE           PIC '9(n)S'                     (n <= 9)                          (n <= 9)                     PIC S9(n)                         PIC 'S9(n)'                     SIGN SEPARATE LEADING             (n <= 9)                     (n <= 9)      Single         COMP-1                            FLOAT BIN(21)                     PIC S9(m)V9(n) COMP-3             FIXED DEC(m+n,n)                     PIC S9(m)V9(n) COMP               FIXED BIN(15,n)                     (m+n <= 4) (See NOTE)                     PIC S9(m)V9(n) COMP               FIXED BIN(31,n)                     (m+n <= 9)                     PIC S9(m)V9(n)                    PIC '9(m)V9(n-1)T'                     PIC S9(m)V9(n) LEADING            PIC 'T9(m-1)V9(n)'                     PIC S9(m)V9(n)                    PIC '9(m)V9(n)S'                     SIGN SEPARATE                     PIC S9(m)V9(n)                    PIC 'S9(m)V9(n)'                     SIGN SEPARATE LEADING      Double         COMP-2                            FLOAT BIN(53)                     PIC S9(m)V9(n) COMP-3             FIXED DEC(m+n,n)                     PIC S9(m)V9(n) COMP               FIXED BIN(15,n)                     (m+n <= 4) (Footnote.)                     PIC S9(m)V9(n) COMP               FIXED BIN(31,n)                     (m+n <= 9)                     PIC S9(m)V9(n)                    PIC '9(m)V9(n-1)T'                     PIC S9(m)V9(n) LEADING            PIC 'T9(m-1)V9(n)'                     PIC S9(m)V9(n)                    PIC '9(m)V9(n)S'                     SIGN SEPARATE                     PIC S9(m)V9(n)                    PIC 'S9(m)V9(n)'                     SIGN SEPARATE LEADING      Currency       PIC S9(13)V99 COMP-3              FIXED DEC(15,2)                     PIC S9(m)V9(n) COMP-3             FIXED DEC(m+n,n)                     (n <= 4)                          (m+n < 16)                     PIC S9(m)V9(n) COMP               FIXED BIN(15,n)                     (m+n <= 4 and n <= 4)                     (See NOTE)                     PIC S9(m)V9(n) COMP               FIXED BIN(31,n)                     (m+n <= 9, n <= 4)                     PIC S9(m)V9(n)                    PIC '9(m)V9(n-1)T'                     (n <= 4)                     PIC S9(m)V9(n) LEADING            PIC 'T9(m-1)V9(n)'                     (n <= 4)                     PIC S9(m)V9(n)                    PIC '9(m)V9(n)S'                     SIGN SEPARATE                     (n <= 4)                     PIC S9(m)V9(n)                    PIC 'S9(m)V9(n)'                     SIGN SEPARATE LEADING                     (n <= 4)      Decimal        PIC S9(m)V9(n) COMP-3             FIXED DEC(m+n,n)                                                       (m+n < 16)                     PIC S9(m)V9(n) COMP               FIXED BIN(15,n)                     (m+n <= 5)                     (See NOTE)                     PIC S9(m)V9(n) COMP               FIXED BIN(31,n)                     (m+n <= 9)                     PIC S9(m)V9(n) COMP               Not Supported                     (m+n <= 18)                     PIC S9(m)V9(n)                    PIC '9(m)V9(n-1)T'                     PIC S9(m)V9(n) LEADING            PIC 'T9(m-1)V9(n)'                     PIC S9(m)V9(n)                    PIC '9(m)V9(n)S'                     SIGN SEPARATE                     PIC S9(m)V9(n)                    PIC 'S9(m)V9(n)'                     SIGN SEPARATE LEADING      Date           PIC S9(7) COMP-3                  FIXED DEC(7)                     date in YYYYDDD format                     PIC S9(7) COMP-3                  FIXED DEC(7)                     time in HHMMSST format                     PIC S9(7) COMP-3                  FIXED DEC(7)                     date in YYYYDDD format                     PIC S9(7) COMP-3                  FIXED DEC(7)                     time in HHMMSST format      String         PIC X(n)                          CHAR(n)                     padded with spaces to n bytes                     PIC X(n)                          CHAR(n)                     padded with LOW-VALUE to n bytes      Boolean        PIC S9(4) COMP                    FIXED BIN(15)                     (1 = true, 0 = false)                     PIC S9(9) COMP                    FIXED BIN(31)                     (1 = true, 0 = false)                     PIC  S9(n) COMP-3                 FIXED DEC(n)                     (1 = true, 0 = false)      Byte           PIC X                             CHAR(1)                     (no translation performed)                     PIC 999 COMP                      FIXED BIN(15)                     (value between 0 and 255)                     PIC 999 COMP-3                    FIXED DEC(3)                     (value between 0 and 255)				
NOTE: An appropriate COBOL compiler option must be set to allow numbersbetween 9,999 and 32,768 to fit in a PIC 9(4) COMP number.
COBOL PL/1 PL/I PL1 PLI
Properties

Article ID: 183179 - Last Review: 11/24/2004 19:20:00 - Revision: 3.1

  • Microsoft COM Transaction Integrator for CICS and IMS 1.0
  • kbinfo KB183179
Feedback