Importing CICS COBOL data structures

CICS® z/OS® Assets require specific considerations for COBOL data structures.

Restrictions

The following restrictions apply to CICS:
  • COMMAREAs are limited to 32 KB.
  • For channels, you can have any number of containers in a channel and each container can be up to 2 GB.

Supported data types

The following table describes which PL/I data description elements are supported. Unsupported PL/I data description elements are either omitted from the table, or marked "Not supported".

Composite and leaf REFER arrays with a fixed lower bound (LBOUND) are supported in fully UNALIGNED 01 structures. Multiple REFER arrays can be declared.
Note: REFER is not supported for structures that contain any ALIGNED fields or require padding.
Table 1. COBOL data description elements for z/OS Assets
COBOL type JSON type
USAGE DISPLAY:
PIC X(n)
PIC A(n)

USAGE DISPLAY-1:
PIC G(n) 

USAGE NATIONAL:
PIC N(n)
Supported
USAGE DISPLAY:
PIC S9(n) 

USAGE BINARY,COMP, COMP-4:
PIC S9(1<=n<=4) 
PIC S9(5<=n<=9)
  PIC S9(10<=n<=18) 
Supported
USAGE COMP-5:
PIC S9(n) 


PIC 9(n)
Supported
USAGE COMP-5:
PIC 9(n)
Supported
USAGE DISPLAY:
PIC 9(n) 

USAGE BINARY,COMP, COMP-4:
PIC 9(1<=n<=4)
PIC 9(5<=n<=9)   
PIC 9(10<=n<=18) 
Supported
USAGE COMP-3:
PIC S9(n)
Supported
USAGE DISPLAY:
PIC 9(m)V9(n)
Supported
USAGE COMP-5:
PIC S9(m)V9(n)
Supported
USAGE COMP-5:
PIC 9(m)V9(n)
Supported
USAGE DISPLAY:
PIC S9(m)V9(n)


USAGE BINARY,COMP, COMP-4:
PIC S9(m)V9(n)
Supported
USAGE COMP-3:
PIC 9(m)V9(n)




SAGE BINARY,COMP, COMP-4:
PIC 9(m)V9(n)  
Supported
USAGE COMP-1
Supported
USAGE COMP-2
Supported
OCCURS n 
Supported
OCCURS n TIMES PIC X 
OCCURS n TIMES PIC A 
OCCURS n TIMES PIC G DISPLAY-1 
OCCURS n TIMES PIC N 
Supported
OCCURS n TO m TIMES 
   DEPENDING ON t PIC X
OCCURS n TO m TIMES 
   DEPENDING ON t PIC A 
OCCURS n TO m TIMES 
   DEPENDING ON t PIC G DISPLAY-1 
OCCURS n TO m TIMES 
   DEPENDING ON t PIC N 
Supported
OCCURS n TO m TIMES 
   DEPENDING ON t PIC X(k)
OCCURS n TO m TIMES 
   DEPENDING ON t PIC A(k) 
OCCURS n TO m TIMES 
   DEPENDING ON t PIC G(k) DISPLAY-1 
OCCURS n TO m TIMES 
   DEPENDING ON t PIC N(k) 
Supported
OCCURS n TO m TIMES 
   DEPENDING ON t
Supported
The following additional restrictions also apply:
  • The maximum length for WIDECHAR and CHAR strings supported by PL/I is 32,767. Elements that are longer than 32,767 characters result in an IBM1299IE message, and the PL/I data structure cannot be loaded into the z/OS Connect Designer.
  • Composite and leaf REFER arrays with a fixed lower bound (LBOUND) are supported in fully UNALIGNED 01 structures. Multiple REFER arrays can be declared.
  • If the COMPLEX attribute is specified for a data item, it is ignored.
  • If the PRECISION attribute is specified for a data item, it is ignored.
  • Enterprise PL/I FLOAT IEEE is not supported.
  • Enterprise PL/I algorithms that pad data items in order to align them on byte, fullword, or doubleword boundaries are not implemented. One of the following two techniques can be used to address this restriction:
    1. Modify the Enterprise PL/I application and specify the UNALIGNED keyword on each 01-level structure that represents the interface to the application. Ensure that you remove any ALIGNED keywords from members of the 01-level structures. Recompile and link the application.
    2. Insert padding items into structure in order to cause data items that require byte, fullword, or doubleword alignment to be aligned correctly. Refer to the Enterprise PL/I for z/OS documentation for more information on PL/I data item alignment characteristics.

Compiler options

PROCESS statements placed at the start of COBOL and PL/I programs specify compiler options and limits, allowing source data to be interpreted differently.

The AGGREGATE compiler option can be used to help indicate where padding is expected in a data structure.

Use the following option to have the compiler flag structures with padding.
*PROCESS RULES(NOPADDING);

Preprocessors

Several preprocessors that are included with the z/OS Connect Designer are used when importing PL/I. These preprocessors are included at the minimal supported versions may be configured and invoked to provide alternative syntax, conditional compilation, and tolerating syntax for CICS and Db2 syntax.

The following preprocessors can be invoked:

For CICS z/OS Asset types, PP(MACRO CICS SQL) is the default preprocessor configuration.

The following example demonstrates use of all preprocessors in a specified order. This PROCESS statement must be included at the top of PL/I source to override z/OS Connect Designer preprocessor defaults.
*PROCESS PP(INCLUDE(‘ID(-INC)’) MACRO(‘CASE(ASIS)’) CICS SQL);