PL/I to COBOL Data Item Type Mapping

Attention: This topic applies to a feature that is in Early Adopter Program (EAP) release status. We intend to provide the finalized feature in a future release. Please contact Micro Focus SupportLine if you require further clarification.

PL/I data item types are mapped to COBOL data item types for use within the Data File Editor and IMS Database Editor.

Open PL/I data item type COBOL data item type Comments
char(n)
pic x

Treated as a character string

pic '(n)9'
pic 9  <= 18 digits
pic x   > 18 digits

9 and V symbols are supported

Treated as a character string

 pic '(n)Z9'
pic x

When containing symbols other than 9 and V, treated as a character string

fixed bin(1) - fixed bin(31)

  native1
  non-native


comp-5
comp

PL/I treats length 1 to 6 as length 7

fixed dec(1) - fixed dec(31)

  native
  non-native


comp-3 <= 18 digits
        > 18 digits

Formatted editing allowed

Formatted editing indicates data item contains an illegal value

float bin(1)- float bin(24)
comp-1

Editing disabled for Floating Point

float bin(25) - float bin(52)
comp-2

Editing disabled for Floating Point

float dec(1) - float dec(6)
comp-1

Editing disabled for Floating Point

float dec(7) - float dec(16)
comp-2

Editing disabled for Floating Point

char(n)var


  native1
  non-native
pic x


comp-5 length
comp   length

Treated as a character string plus two bytes for the length preceding the string

widechar(n)
pic x

Treated as a character string of two bytes times n

widechar(n) var	


  native1
  non-native
pic x


comp-5 length
comp   length

Treated as a character string of two bytes times n plus two bytes for the length preceding the string

bit(n)
pic x

Bits mapped to the byte(s) that contain them with an indication shown for the bit positions occupied, e.g., (--bbb---)

Note: PL/I bit storage format is either bit swapped or left to right.
pointer
pointer
structure
group item
union
group item
1The native option could present problems for data files that contain comp-5 binary fields. Data File Tools cannot interpret files created on a byte swapped platform that are subsequently moved to a non-byte swapped platform. In this case, where files are used on different byte order platforms, specify the non-native option instead.

Mapping Restrictions

The following Open PL/I data item types are not supported in their original form, but are mapped to a form of COBOL pic x as indicated:

Open PL/I data type item COBOL pic x
char varying
pic x(n +2 for length bytes) 
bit
pic x(len/8)
widechar
pic x(n*2)
widechar varying
pic x(n*2 + 2 for length bytes)

The following Open PL/I data item types are not supported:

  • PL/I unique features such as BIT and OFFSET not present in COBOL
  • BASED data items with the REFER option; however, data items up to the first REFER are included in the structure description
  • Arrays of more than three dimensions
  • Arrays with lower bounds of zero or a negative value