In many cases, potential portability problems can be avoided by using the macro facility because it has the capability of isolating platform-specific code. For example, you can include platform-specific code in a compilation for a given platform and exclude it from compilation for a different platform.
The PL/I for Windows macro facility COMPILETIME built-in function returns the date using the format 'DD.MMM.YY', while the PL/I for z/OS macro facility COMPILETIME built-in function returns the date using the format 'DD MMM YY'.
This allows you to write code that can contain conditional system-dependent code that compiles correctly under PL/I for Windows and all versions of the mainframe PL/I compiler, for example:
%dcl compiletime builtin;
%if substr(compiletime,3,1) = '.' %then
%do;
/* Windows PL/I code */
%end;
%else
%do;
/* z/OS PL/I code */
%end;
For information about the macro facility, see the PL/I Language Reference.