Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PL/I
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===IBM PL/I for OS/2, AIX, Linux, z/OS=== In a major revamp of PL/I, IBM Santa Teresa in California launched an entirely new compiler in 1992. The initial shipment was for OS/2 and included most ANSI-G features and many new PL/I features.<ref name="pli-for-os2-acm">{{cite journal|title=PL/I for OS/2|author=Robin A. Vowels|journal=ACM SIGPLAN Notices|volume=31|issue=3|date=March 1996|pages=22β27|doi=10.1145/227717.227724|publisher=[[Association for Computing Machinery]]|s2cid=24441291|doi-access=free}}</ref> Subsequent releases provided additional platforms ([[MVS]], [[VM (operating system)|VM]], [[OS/390]], [[IBM AIX|AIX]] and [[Microsoft Windows|Windows]]), but as of 2021, the only supported platforms are [[z/OS]] and AIX.<ref>{{cite web |title=IBM PL/I Compiler Family |website=[[IBM]] |url=https://www.ibm.com/products/pli-compiler-family |access-date=5 July 2021}}</ref> IBM continued to add functions to make PL/I fully competitive with other languages (particularly C and C++) in areas where it had been overtaken. The corresponding "IBM Language Environment" supports inter-operation of PL/I programs with Database and Transaction systems, and with programs written in C, C++, and COBOL, the compiler supports all the data types needed for intercommunication with these languages. The PL/I design principles were retained and withstood this major extension, comprising several new data types, new statements and statement options, new exception conditions, and new organisations of program source. The resulting language is a compatible super-set of the PL/I Standard and of the earlier IBM compilers. Major topics added to PL/I were: * New attributes for better support of user-defined data types β the <code>DEFINE ALIAS</code>, <code>ORDINAL</code>, and <code>DEFINE STRUCTURE</code> statement to introduce user-defined types, the <code>HANDLE</code> locator data type, the <code>TYPE</code> data type itself, the <code>UNION</code> data type, and built-in functions for manipulating the new types. * Additional data types and attributes corresponding to common PC data types (e.g., <code>UNSIGNED</code>, <code>VARYINGZ</code>). * Improvements in readability of programs β often rendering implied usages explicit (e.g., <code>BYVALUE</code> attribute for parameters) * Additional structured programming constructs. * Interrupt handling additions. * Compile time preprocessor extended to offer almost all PL/I string handling features and to interface with the Application Development Environment The latest series of PL/I compilers for z/OS, called Enterprise PL/I for z/OS, leverage code generation for the latest z/Architecture processors (z14, z13, zEC12, zBC12, z196, z114) via the use of ARCHLVL parm control passed during compilation, and was the second High level language supported by z/OS Language Environment to do so (XL C/C++ being the first, and Enterprise COBOL v5 the last.) ====Data types==== {{tt|ORDINAL}} is a new computational data type. The ordinal facilities are like those in [[Pascal (programming language)|Pascal]], e.g., {{code|DEFINE ORDINAL Colour (red, yellow, green, blue, violet);}} but in addition the name and internal values are accessible via built-in functions. Built-in functions provide access to an ordinal value's predecessor and successor. The {{tt|DEFINE}}-statement (see below) allows additional {{tt|TYPE}}s to be declared composed from PL/I's built-in attributes. The <code>HANDLE(data structure)</code> locator data type is similar to the {{tt|POINTER}} data type, but strongly typed to bind only to a particular data structure. The <code>=></code> operator is used to select a data structure using a handle. The {{tt|UNION}} attribute (equivalent to {{tt|CELL}} in early PL/I specifications) permits several scalar variables, arrays, or structures to share the same storage in a unit that occupies the amount of storage needed for the largest alternative. ====Competitiveness on PC and with C==== These attributes were added: * The string attributes <code>VARYINGZ</code> (for zero-terminated character strings), <code>HEXADEC</code>, <code>WIDECHAR</code>, and <code>GRAPHIC</code>. * The optional arithmetic attributes <code>UNSIGNED</code> and <code>SIGNED</code>, <code>BIGENDIAN</code> and <code>LITTLEENDIAN</code>. <code>UNSIGNED</code> necessitated the <code>UPTHRU</code> and <code>DOWNTHRU</code> option on iterative groups enabling a counter-controlled loop to be executed without exceeding the limit value (also essential for <code>ORDINAL</code>s and good for documenting loops). * The <code>DATE(pattern)</code> attribute for controlling date representations and additions to bring time and date to best current practice. New functions for manipulating dates include{{snd}} <code>DAYS</code> and <code>DAYSTODATE</code> for converting between dates and number of days, and a general <code>DATETIME</code> function for changing date formats. New string-handling functions were added{{snd}} to centre text, to edit using a picture format, and to trim blanks or selected characters from the head or tail of text, <code>VERIFYR</code> to <code>VERIFY</code> from the right. and <code>SEARCH</code> and <code>TALLY</code> functions. Compound assignment operators a la C e.g., <code>+=</code>, <code>&=</code>, <code>-=</code>, <code>||=</code> were added. <code>A+=1</code> is equivalent to <code>A=A+1</code>. Additional parameter [[Data descriptor|descriptors]] and attributes were added for omitted arguments and variable length argument lists. ====Program readability β making intentions explicit==== The {{tt|VALUE}} attribute declares an identifier as a constant (derived from a specific literal value or restricted expression). Parameters can have the {{tt|BYADDR}} (pass by address) or {{tt|BYVALUE}} (pass by value) attributes. The {{tt|ASSIGNABLE}} and {{tt|NONASSIGNABLE}} attributes prevent unintended assignments. <code>DO FOREVER;</code> obviates the need for the contrived construct {{code|DO WHILE ( '1'B );|rexx}}. The {{tt|DEFINE}}-statement introduces user-specified names (e.g., {{tt|INTEGER}}) for combinations of built-in attributes (e.g., <code>FIXED BINARY(31,0)</code>). Thus <code>DEFINE ALIAS INTEGER FIXED BINARY(31.0)</code> creates the {{tt|TYPE}} name {{tt|INTEGER}} as an alias for the set of built-in attributes FIXED BINARY(31.0). <code>DEFINE STRUCTURE</code> applies to structures and their members; it provides a {{tt|TYPE}} name for a set of structure attributes and corresponding substructure member declarations for use in a structure declaration (a generalisation of the {{tt|LIKE}} attribute). ====Structured programming additions==== A {{tt|LEAVE}} statement to exit a loop, and an {{tt|ITERATE}} to continue with the next iteration of a loop. {{tt|UPTHRU}} and {{tt|DOWNTHRU}} options on iterative groups. The package construct consisting of a set of procedures and declarations for use as a unit. Variables declared outside of the procedures are local to the package, and can use {{tt|STATIC}}, {{tt|BASED}} or {{tt|CONTROLLED}} storage. Procedure names used in the package also are local, but can be made external by means of the {{tt|EXPORTS}} option of the {{tt|PACKAGE}}-statement. ====Interrupt handling==== The {{tt|RESIGNAL}}-statement executed in an ON-unit terminates execution of the ON-unit, and raises the condition again in the procedure that called the current one (thus passing control to the corresponding ON-unit for that procedure). The {{tt|INVALIDOP}} condition handles invalid operation codes detected by the PC processor, as well as illegal arithmetic operations such as subtraction of two infinite values. The {{tt|ANYCONDITION}} condition is provided to intercept conditions for which no specific ON-unit has been provided in the current procedure. The {{tt|STORAGE}} condition is raised when an {{tt|ALLOCATE}} statement is unable to obtain sufficient storage.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PL/I
(section)
Add topic