The Enterprise PL/I compiler still supports the CHAR built-in function although it now views CHAR as an abbreviation for CHARACTER. The results of the CHAR built-in function are the same as in the old PL/I for MVS compiler except when the first argument has the GRAPHIC type:
For example, if X is GRAPHIC(3) and holds the byte .A.B.C, the results are as follows:
The following examples show how to change your code to obtain the results produced by the old compiler:
add
dcl so char(1) value ('0e'x), si char(1) value('0f'x);
then replace
A = CHAR(X);
by
UNSPEC(A) = UNSPEC(SO) || UNSPEC(X) || UNSPEC(SI);replace
CHAR(X)
by
OLDCHAR(X)
where OLDCHAR is defined by
oldchar: proc(x) returns( char(32767) var );
dcl x graphic(*);
dcl a char(32767) var;
dcl d char(2*length(x));
a = '0e'x;
unspec(d) = unspec(x);
a = a || d;
a = a || '0f'x;
return( a );
end; For more information about the CHARACTER and CHARGRAPHIC built-in functions, see CHARACTER and CHARGRAPHIC under the chapter Built-in functions, pseudovariables, and subroutines in Enterprise PL/I for z/OS Compiler and Run-Time Migration Guide.