The history of PL/I stretches back to the 1970s when IBM, at the prompting of the SHARE user group, delivered the first PL/I compiler so that users would have a language with the combined strengths of Fortran and COBOL. IBM then delivered three releases of OS PL/I Version 2 in the 1980s and PL/I for MVS and VM in the early 1990s. All of these releases were based on a common code base that gradually became old, plus both hard and expensive to enhance and maintain.
However, with the advent of the PC, IBM built a completely new PL/I compiler that was shipped first on IBM® Operating System/2® (OS/2) and then ported to Microsoft Windows, the IBM® AIX® operating system, and the mainframe. With this compiler and the 12 consecutive years with a new release of the IBM® z/OS® version, IBM has improved optimization of PL/I programs, enhanced their exploitation of IBM® System z® architecture, addressed many customer requirements, and introduced numerous application modernization features.
IBM continues to have a strong commitment to the PL/I language, particularly given its widespread use in many business-critical applications. The current family of IBM PL/I implementations consists of the Enterprise PL/I compiler for the mainframe and the PL/I for AIX compiler, both of which share a common, nearly identical front-end code base, which ensures portability between those platforms.
We are opening this forum to create more direct communication between users of our PL/I compilers and the IBM compiler development organization. We hope you'll find the content informative and interesting, and we look forward to your contributions through questions, comments, and ideas.
bbalk 1200006543 6,118 Views
Do you want to prove the depth of your PL/I knowledge to a prospective employer? Or do you want to verify the PL/I skills of a company to whom you might outsource your PL/I code?
The PL/I certification, developed jointly by IBM and representatives from PL/I companies from Europe and the US, can help with these and similar tasks.
At the IBM PL/I professional certification site you will find that there are two certification levels for PL/I: one for the general PL/I programmer in your team and a harder test for the leader of that PL/I team.
Check it out.
bbalk 1200006543 5,857 Views
If you use the TEST option and DebugTool, Enterprise PL/I will show you the source as you coded it.
So, for example, if you have code that contains an EXEC SQL statement, you will see in the debugger just that EXEC SQL statement as you coded it and not the many, many statements generated by the preprocessor and visible in the listing. This is a big plus since those generated statements will be largely meaningless to you and would certainly not be ones you should be debugging and fixing.
The same would be true if you were using the CICS or MACRO preprocessors.
However, since this is PL/I, you can have it both ways: if you do want to debug at the level of the generated code,
then you can do so by using the TEST(SEP) and LISTVIEW options.
This can be particularly useful if you are using the MACRO preprocessors to generate complex code. In that case,
the LISTVIEW(AFTERMACRO) option would let you debug at the level of the code generated by the MACRO preprocessor (with any EXEC CICS and EXEC SQL statements left unexpanded if the MACRO preprocessor preceded the CICS and SQL preprocessors).
bbalk 1200006543 5,115 Views
In PL/I conversions, BINARY rules over DECIMAL, and FLOAT, over FIXED.
This means, for example, that when an expression contains a BINARY and a DECIMAL operand, then the result will be BINARY.
Hence, for the assignment in this code
dcl a fixed bin;
dcl b float dec;
b = b + a;
there will be these conversions
a will be converted to FLOAT BIN
b will be converted to FLOAT BIN
the sum will be converted to FLOAT DEC
PL/I has always had a series of built-in functions (BINARY, DECIMAL, FIXED, and FLOAT) to help control such conversions.
But if you were to change the sample assignment above to
b = b + decimal(a);
then there will be these conversions
a will be converted to FIXED DEC
that result will be converted to FLOAT DEC
the sum will be simply assigned to FLOAT DEC
So one conversion has been eliminated, but there are still two conversions when one should suffice
The problem is that these functions allow you to specify only one attribute at a time when you would like to be able specify two
Enterprise PL/I 3.8 introduced 4 new built-in functions so you can do this:
FLOATDEC, FLOATBIN, FIXEDDEC, and FIXEDBIN
Now you can rewrite our assignment to
b = b + floatdec(a);
and not only will this code perform faster, it will be easier for someone to understand and maintain in the future.
bbalk 1200006543 5,505 Views
For many years, the only floating point representation on z/OS was hexadecimal float. This is a base 16 representation, but most of us have 10 fingers and most business applications want to perform decimal calculations.
The difference between these 2 bases leads to problems as exemplified by this code:
dcl f1 float dec(6);
dcl f2 fixed dec(5,3);
dcl f3 float dec(6);
f1 = 4;
f2 = f1 / 100e0;
put skip data( f2 );
f3 = 100 * f2;
put skip data( f3 );
This rather disconcerting result says that 100*(4/100) = 3.9 !
Similar problems exist with IEEE binary floating-point (which PL/I fully supports on z/OS).
However, IBM and Enterprise PL/I for z/OS also support the new IEEE decimal floating-point.
The accompanying hardware lets you perform float calculations as you would with your fingers: it is a true base 10 representation that exploits the speed of floating point computations as well as the availability (on z/OS) of 16 floating-point registers.
For more information about how to use decimal floating-point with PL/I, see the DFP suboption of the FLOAT compiler option.