PL/I to Java mapping

When you generate a XOM from a PL/I include file, the PL/I types are mapped to default Java™ types.

Not all PL/I types map to a Java type.

Numeric data mapping

The following table shows the base, scale, and precision of the PL/I coded arithmetic data type, and shows the corresponding PL/I usage and the Java type to which the PL/I data type maps.

Table 1. Coded arithmetic data type in PL/I and mapped Java type
Base Scale Precision (p,q) Example Java type
Decimal Fixed 1<=p<=4 fixed dec(4) short
5<=p<=9 fixed dec(9) int
10<=p<=18 fixed dec(18) long
19<=p<=31 fixed dec(20) BigInteger
q != 0 fixed dec(5,4) BigDecimal
Float 1<=p<=6 float dec(6) float
7<=p<=16 float dec(8) double
17<=p float dec(20) double (extended floating-point)
Binary Fixed

1<=p<=7 (signed)

1<=p<=8 (unsigned)

fixed bin(6)

fixed bin(8) unsigned

byte

8<=p<=15 (signed)

9<=p<=16 (unsigned)

  short

16<=p<=31 (signed)

17<=p<=32 (unsigned)

  int

32<=p<=63 (singed)

33<=p<=64 (unsigned)

  long
q != 0 fixed bin(8,2) BigDecimal
Float 1<=p<=21 float bin(16) float
22<=p<=53 float bin(32) double
54<=p float bin(64) double (extended floating-point)

The following table shows picture strings of the PL/I numeric picture data type and the corresponding PL/I usage, and shows the Java type to which the PL/I data type maps. The PL/I management supports the picture format only with 'S', '9', and 'V.'

Table 2. Numeric picture data type in PL/I and mapped Java type
Picture string Example Java type
s9 - s(4)9 picture s(4)9 short
s(5)9 - s(9)9 picture s(8)9 int
s(10)9 - s(18)9 picture s(10)9 long
s(19)9 - s(31)9 picture s(20)9 BigInteger
v picture s9v9 BigDecimal

String data mapping

The following PL/I string data attributes are supported:

For the character pictured data, the PL/I management supports the picture format only with 'X', 'A', and '9.'

The following example shows the picture format using 'X', 'A', and '9':

declare 05 PartID picture 'AAA99X';
Note:
Variable-length strings are not supported. For example:
char(m)

Variable-length strings with REFER options can support only simple REFER usage. For more information about limitations on using the REFER option, see PL/I Limitations.