HOME

TheInfoList



OR:

PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
initially developed by
IBM International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
. It is designed for scientific, engineering, business and system programming. It has been in continuous use by academic, commercial and industrial organizations since it was introduced in the 1960s. A PL/I
American National Standards Institute The American National Standards Institute (ANSI ) is a private nonprofit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organiz ...
(ANSI)
technical standard A technical standard is an established Social norm, norm or requirement for a repeatable technical task which is applied to a common and repeated use of rules, conditions, guidelines or characteristics for products or related processes and producti ...
, X3.53-1976, was published in 1976. PL/I's main domains are
data processing Data processing is the collection and manipulation of digital data to produce meaningful information. Data processing is a form of ''information processing'', which is the modification (processing) of information in any manner detectable by an o ...
,
numerical computation Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of numerical methods t ...
,
scientific computing Computational science, also known as scientific computing, technical computing or scientific computation (SC), is a division of science, and more specifically the Computer Sciences, which uses advanced computing capabilities to understand and s ...
, and system programming. It supports
recursion Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
,
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making specific disciplined use of the structured control flow constructs of selection ( if/then/else) and repet ...
, linked data structure handling, fixed-point,
floating-point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
,
complex Complex commonly refers to: * Complexity, the behaviour of a system whose components interact in multiple ways so possible interactions are difficult to describe ** Complex system, a system composed of many components which may interact with each ...
,
character string In computer programming, a string is traditionally a sequence of characters, either as a literal constant or as some kind of variable. The latter may allow its elements to be mutated and the length changed, or it may be fixed (after creation). ...
handling, and bit string handling. The language syntax is English-like and suited for describing complex data formats with a wide set of functions available to verify and manipulate them.


Early history

In the 1950s and early 1960s, business and scientific users programmed for different computer hardware using different programming languages. Business users were moving from Autocoders via COMTRAN to
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
, while scientific users programmed in Fortran,
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
, GEORGE, and others. The
IBM System/360 The IBM System/360 (S/360) is a family of mainframe computer systems announced by IBM on April 7, 1964, and delivered between 1965 and 1978. System/360 was the first family of computers designed to cover both commercial and scientific applicati ...
(announced in 1964 and delivered in 1966) was designed as a common machine architecture for both groups of users, superseding all existing IBM architectures. Similarly, IBM wanted a single programming language for all users. It hoped that Fortran could be extended to include the features needed by commercial programmers. In October 1963 a committee was formed composed originally of three IBMers from New York and three members of SHARE, the IBM scientific users group, to propose these extensions to Fortran. Given the constraints of Fortran, they were unable to do this and embarked on the design of a new programming language based loosely on
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
labeled NPL. This acronym conflicted with that of the UK's National Physical Laboratory and was replaced briefly by MPPL (MultiPurpose Programming Language) and, in 1965, with PL/I (with a
Roman numeral Roman numerals are a numeral system that originated in ancient Rome and remained the usual way of writing numbers throughout Europe well into the Late Middle Ages. Numbers are written with combinations of letters from the Latin alphabet, ea ...
"I"). The first definition appeared in April 1964. IBM took NPL as a starting point and completed the design to a level that the first compiler could be written: the NPL definition was incomplete in scope and in detail. Control of the PL/I language was vested initially in the New York Programming Center and later at the IBM UK Laboratory at
Hursley Hursley is a village and civil parishes in England, civil parish in Hampshire, England with a population of around 900 in 2011. It is located roughly midway between Romsey and Winchester on the A3090. Besides the village the parish includes th ...
. The SHARE and
GUIDE A guide is a person who leads travelers, sportspeople, or tourists through unknown or unfamiliar locations. The term can also be applied to a person who leads others to more abstract goals such as knowledge or wisdom. Travel and recreation Exp ...
user groups were involved in extending the language and had a role in IBM's process for controlling the language through their PL/I Projects. The experience of defining such a large language showed the need for a formal definition of PL/I. A project was set up in 1967 in IBM Laboratory Vienna to make an unambiguous and complete specification. This led in turn to one of the first large scale
Formal Methods In computer science, formal methods are mathematics, mathematically rigorous techniques for the formal specification, specification, development, Program analysis, analysis, and formal verification, verification of software and computer hardware, ...
for development, VDM.
Fred Brooks Frederick Phillips Brooks Jr. (April 19, 1931 – November 17, 2022) was an American computer architect, software engineer, and computer scientist, best known for managing development of IBM's System/360 family of mainframe computers and the ...
is credited with ensuring PL/I had the CHARACTER data type. Christopher J. Date and a colleague added
relational database A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970. A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
extensions based on Edgar Codd's work. The language was first specified in detail in the manual "PL/I Language Specifications. C28-6571", written in New York in 1965, and superseded by "PL/I Language Specifications. GY33-6003", written by Hursley in 1967. IBM continued to develop PL/I in the late sixties and early seventies, publishing it in the GY33-6003 manual. These manuals were used by the
Multics Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
group and other early implementers. The first compiler was delivered in 1966. The Standard for PL/I was approved in 1976.


Goals and principles

The goals for PL/I evolved during the early development of the language. Competitiveness with COBOL's record handling and report writing was required. The language's scope of usefulness grew to include system programming and
event-driven programming In computer programming, event-driven programming is a programming paradigm in which the Control flow, flow of the program is determined by external Event (computing), events. User interface, UI events from computer mouse, mice, computer keyboard, ...
. Additional goals for PL/I were: * Performance of compiled code competitive with that of Fortran (but this was not achieved) *
Extensibility Extensibility is a software engineering and systems design principle that provides for future growth. Extensibility is a measure of the ability to extend a system and the level of effort required to implement the extension. Extensions can be t ...
for new hardware and new application areas * Improved productivity of the programming process, transferring effort from the programmer to the compiler * Machine independence to operate effectively on the main computer hardware and operating systems To achieve these goals, PL/I borrowed ideas from contemporary languages while adding substantial new capabilities and casting it with a distinctive concise and readable syntax. Many principles and capabilities combined to give the language its character and were important in meeting the language's goals: * Block structure, with underlying semantics (including
recursion Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
), similar to
Algol 60 ALGOL 60 (short for ''Algorithmic Language 1960'') is a member of the ALGOL family of computer programming languages. It followed on from ALGOL 58 which had introduced code blocks and the begin and end pairs for delimiting them, representing a ...
. Arguments are passed using
call by reference In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the ...
, using dummy variables for values where needed (
call by value In a programming language, an evaluation strategy is a set of rules for evaluating expressions. The term is often used to refer to the more specific notion of a ''parameter-passing strategy'' that defines the kind of value that is passed to the ...
). * A wide range of computational data types, program control data types, and forms of data structure (
strong typing In computer programming, one of the many ways that programming languages are colloquially classified is whether the language's type system makes it strongly typed or weakly typed (loosely typed). However, there is no precise technical definition o ...
). * Dynamic extents for arrays and strings with inheritance of extents by procedure parameters. * Concise syntax for expressions, declarations, and statements with permitted abbreviations. Suitable for a character set of 60
glyphs A glyph ( ) is any kind of purposeful mark. In typography, a glyph is "the specific shape, design, or representation of a character". It is a particular graphical representation, in a particular typeface, of an element of written language. A ...
and sub-settable to 48. * An extensive structure of defaults in statements, options, and declarations to hide some complexities and facilitate extending the language while minimizing keystrokes. * Powerful iterative processing with good support for
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making specific disciplined use of the structured control flow constructs of selection ( if/then/else) and repet ...
. * There were to be no reserved words (although the function names DATE and TIME initially proved to be impossible to meet this goal). New attributes, statements and statement options could be added to PL/I without invalidating existing programs. Not even IF, THEN, ELSE, and DO were reserved. *
Orthogonality In mathematics, orthogonality is the generalization of the geometric notion of '' perpendicularity''. Although many authors use the two terms ''perpendicular'' and ''orthogonal'' interchangeably, the term ''perpendicular'' is more specifically ...
: each capability to be independent of other capabilities and freely combined with other capabilities wherever meaningful. Each capability to be available in all contexts where meaningful, to exploit it as widely as possible and to avoid "arbitrary restrictions". Orthogonality helps make the language "large". *
Exception handling In computing and computer programming, exception handling is the process of responding to the occurrence of ''exceptions'' – anomalous or exceptional conditions requiring special processing – during the execution of a program. In general, an ...
capabilities for controlling and intercepting exceptional conditions at run time. * Programs divided into separately compilable sections, with extensive compile-time facilities (a.k.a. macros), not part of the standard, for tailoring and combining sections of source code into complete programs. External names to bind separately compiled procedures into a single program. * Debugging facilities integrated into the language.


Language summary

The language is designed to provide sufficient facilities to be able to satisfy the needs of all programmers, regardless of what problems the language is being applied to. The summary is extracted from the ANSI PL/I StandardANS Programming Language PL/I. X3.53-1976 and the ANSI PL/I General-Purpose Subset Standard. A PL/I program consists of a set of procedures, each of which is written as a sequence of statements. The %INCLUDE construct is used to include text from other sources during program translation. All of the statement types are summarized here in groupings which give an overview of the language (the Standard uses this organization). (Features such as multi-tasking and the PL/I preprocessor are not in the Standard but are supported in the PL/I F compiler and some other implementations are discussed in the Language evolution section.) Names may be declared to represent data of the following types, either as single values, or as aggregates in the form of arrays, with a lower-bound and upper-bound per dimension, or structures (comprising nested structure, array and scalar variables): The arithmetic type comprises these attributes: The base, scale, precision and scale factor of the Picture-for-arithmetic type is encoded within the picture-specification. The mode is specified separately, with the picture specification applied to both the real and the imaginary parts. Values are computed by expressions written using a specific set of operations and builtin functions, most of which may be applied to aggregates as well as to single values, together with user-defined procedures which, likewise, may operate on and return aggregate as well as single values. The assignment statement assigns values to one or more variables. There are no reserved words in PL/I. A statement is terminated by a semi-colon. The maximum length of a statement is implementation defined. A comment may appear anywhere in a program where a space is permitted and is preceded by the characters forward slash, asterisk and is terminated by the characters asterisk, forward slash (i.e. ). Statements may have a label-prefix introducing an entry name (ENTRY and PROCEDURE statements) or label name, and a condition prefix enabling or disabling a computational condition e.g., (NOSIZE)). Entry and label names may be single identifiers or identifiers followed by a subscript list of constants (as in L(12,2):A=0;). A sequence of statements becomes a ''group'' when preceded by a DO statement and followed by an END statement. Groups may include nested groups and begin blocks. The IF statement specifies a group or a single statement as the THEN part and the ELSE part (see the sample program). The group is the unit of iteration. The begin ''block'' (BEGIN; stmt-list END;) may contain declarations for names and internal procedures local to the block. A ''procedure'' starts with a PROCEDURE statement and is terminated syntactically by an END statement. The body of a procedure is a sequence of blocks, groups, and statements and contains declarations for names and procedures local to the procedure or EXTERNAL to the procedure. An ''ON-unit'' is a single statement or block of statements written to be executed when one or more of these ''conditions'' occur: a ''computational condition'', or an ''Input/Output'' condition, or one of the conditions: *AREA, CONDITION (identifier), ERROR, FINISH A declaration of an identifier may contain one or more of the following attributes (but they need to be mutually consistent): Current compilers from
Micro Focus Micro Focus International plc was a British multinational software and information technology business based in Newbury, Berkshire, England. The firm provided software and consultancy. The company was listed on the London Stock Exchange and t ...
, and particularly that from IBM implement many extensions over the standardized version of the language. The IBM extensions are summarised in the Implementation sub-section for the compiler later. Although there are some extensions common to these compilers the lack of a current standard means that compatibility is not guaranteed.


Standardization

Language standardization began in April 1966 in Europe with ECMA TC10. In 1969
ANSI The American National Standards Institute (ANSI ) is a private nonprofit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organiz ...
established a "Composite Language Development Committee", nicknamed "Kludge", later renamed X3J1 PL/I. Standardization became a joint effort of ECMA TC/10 and ANSI X3J1. A subset of the GY33-6003 document was offered to the joint effort by IBM and became the base document for standardization. The major features omitted from the base document were multitasking and the attributes for
program optimization In computer science, program optimization, code optimization, or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources. In general, a computer program may be op ...
(e.g., NORMAL and ABNORMAL). Proposals to change the base document were voted upon by both committees. In the event that the committees disagreed, the chairs, initially Michael Marcotty of
General Motors General Motors Company (GM) is an American Multinational corporation, multinational Automotive industry, automotive manufacturing company headquartered in Detroit, Michigan, United States. The company is most known for owning and manufacturing f ...
and C.A.R. Hoare representing ICL had to resolve the disagreement. In addition to IBM,
Honeywell Honeywell International Inc. is an American publicly traded, multinational conglomerate corporation headquartered in Charlotte, North Carolina. It primarily operates in four areas of business: aerospace, building automation, industrial automa ...
,
CDC The Centers for Disease Control and Prevention (CDC) is the national public health agency of the United States. It is a United States federal agency under the Department of Health and Human Services (HHS), and is headquartered in Atlanta, ...
,
Data General Data General Corporation was an early minicomputer firm formed in 1968. Three of the four founders were former employees of Digital Equipment Corporation (DEC). Their first product, 1969's Data General Nova, was a 16-bit minicomputer intended to ...
,
Digital Equipment Corporation Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president until ...
,
Prime Computer Prime Computer, Inc. was a Natick, Massachusetts-based producer of minicomputers from 1972 until 1992. With the advent of Personal computer, PCs and the decline of the minicomputer industry, Prime was forced out of the market in the early 1990s, ...
, Burroughs, RCA, and
Univac UNIVAC (Universal Automatic Computer) was a line of electronic digital stored-program computers starting with the products of the Eckert–Mauchly Computer Corporation. Later the name was applied to a division of the Remington Rand company and ...
served on X3J1 along with major users
Eastman Kodak The Eastman Kodak Company, referred to simply as Kodak (), is an American public company that produces various products related to its historic basis in film photography. The company is headquartered in Rochester, New York, and is incorporated i ...
,
MITRE The mitre (Commonwealth English) or miter (American English; American and British English spelling differences#-re, -er, see spelling differences; both pronounced ; ) is a type of headgear now known as the traditional, ceremonial headdress of ...
, Union Carbide, Bell Laboratories, and various government and university representatives. Further development of the language occurred in the standards bodies, with continuing improvements in structured programming and internal consistency, and with the omission of the more obscure or contentious features. As language development neared an end, X3J1/TC10 realized that there were a number of problems with a document written in English text. Discussion of a single item might appear in multiple places which might or might not agree. It was difficult to determine if there were omissions as well as inconsistencies. Consequently, David Beech (IBM), Robert Freiburghouse (Honeywell), Milton Barber (CDC), M. Donald MacLaren (
Argonne National Laboratory Argonne National Laboratory is a Federally funded research and development centers, federally funded research and development center in Lemont, Illinois, Lemont, Illinois, United States. Founded in 1946, the laboratory is owned by the United Sta ...
), Craig Franklin (Data General), Lois Frampton (Digital Equipment Corporation), and editor, D.J. Andrews of IBM undertook to rewrite the entire document, each producing one or more complete chapters. The standard is couched as a formal definition using a "PL/I Machine" to specify the semantics. It was the first programming language standard to be written as a semi-formal definition. A "PL/I General-Purpose Subset" ("Subset-G") standard was issued by ANSI in 1981ANSI X3.74-1981 (R1998) ''Information Systems - Programming Language - PL/I General-Purpose Subset'' and a revision published in 1987. The General Purpose subset was widely adopted as the kernel for PL/I implementations.


Implementations


IBM PL/I F and D compilers

PL/I was first implemented by IBM, at its Hursley Laboratories in the United Kingdom, as part of the development of
System/360 The IBM System/360 (S/360) is a family of mainframe computer systems announced by IBM on April 7, 1964, and delivered between 1965 and 1978. System/360 was the first family of computers designed to cover both commercial and scientific applicati ...
. The first production PL/I
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
was the PL/I F compiler for the OS/360 Operating System, built by John Nash's team at Hursley in the UK: the runtime library team was managed by I.M. (Nobby) Clarke. The PL/I F compiler was written entirely in System/360 assembly language. Release 1 shipped in 1966. OS/360 is a real-memory environment and the compiler was designed for systems with as little as 64 kilobytes of real storage – F being 64 kB in S/360 parlance. To fit a large compiler into the 44 kilobytes of memory available on a 64-kilobyte machine, the compiler consists of a control phase and a large number of compiler phases (approaching 100). The phases are brought into memory from disk, one at a time, to handle particular language features and aspects of compilation. Each phase makes a single pass over the partially-compiled program, usually held in memory. Aspects of the language were still being designed as PL/I F was implemented, so some were omitted until later releases. PL/I RECORD I/O was shipped with PL/I F Release 2. The list processing functions Based Variables, Pointers, Areas and Offsets and LOCATE-mode I/O were first shipped in Release 4. In a major attempt to speed up PL/I code to compete with Fortran object code, PL/I F Release 5 does substantial
program optimization In computer science, program optimization, code optimization, or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources. In general, a computer program may be op ...
of DO-loops facilitated by the REORDER option on procedures. A version of PL/I F was released on the TSS/360 timesharing operating system for the System/360 Model 67, adapted at the IBM Mohansic Lab. The IBM La Gaude Lab in France developed "Language Conversion Programs" to convert Fortran, Cobol, and Algol programs to the PL/I F level of PL/I. The PL/I D compiler, using 16 kilobytes of memory, was developed by IBM Germany for the DOS/360 low end operating system. It implements a subset of the PL/I language requiring all strings and arrays to have fixed extents, thus simplifying the run-time environment. Reflecting the underlying operating system, it lacks dynamic storage allocation and the ''controlled'' storage class. It was shipped within a year of PL/I F.


Multics PL/I and derivatives

Compilers were implemented by several groups in the early 1960s. The
Multics Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
project at
MIT The Massachusetts Institute of Technology (MIT) is a private research university in Cambridge, Massachusetts, United States. Established in 1861, MIT has played a significant role in the development of many areas of modern technology and sc ...
, one of the first to develop an operating system in a
high-level language A high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ''elements'', be easier to use, or may automate (or ...
, used Early PL/I (EPL), a subset dialect of PL/I, as their implementation language in 1964. EPL was developed at
Bell Labs Nokia Bell Labs, commonly referred to as ''Bell Labs'', is an American industrial research and development company owned by Finnish technology company Nokia. With headquarters located in Murray Hill, New Jersey, Murray Hill, New Jersey, the compa ...
and MIT by
Douglas McIlroy Malcolm Douglas McIlroy (born 1932) is an American mathematician, engineer, and programmer. As of 2019 he is an Adjunct Professor of Computer Science at Dartmouth College. McIlroy is best known for having originally proposed Unix pipelines and de ...
, Robert Morris, and others. Initially, it was developed using the TMG compiler-compiler. The influential Multics PL/I compiler ic "PL/1"was the source of compiler technology used by a number of manufacturers and software groups. EPL was a system programming language and a dialect of PL/I that had some capabilities absent in the original PL/I. The Honeywell PL/I compiler (for Series 60) is an implementation of the full ANSI X3J1 standard.


IBM PL/I optimizing and checkout compilers

The PL/I Optimizer and Checkout compilers produced in Hursley support a common level of PL/I language and aimed to replace the PL/I F compiler. The checkout compiler is a rewrite of PL/I F in BSL, IBM's PL/I-like proprietary implementation language (later PL/S). The performance objectives set for the compilers are shown in an IBM presentation to the BCS. The compilers had to produce identical results the Checkout Compiler is used to debug programs that would then be submitted to the Optimizer. Given that the compilers had entirely different designs and were handling the full PL/I language this goal was challenging: it was achieved. IBM introduced new attributes and syntax including , case statements (//), loop controls ( and ) and null argument lists to disambiguate, e.g., DATE(). The PL/I optimizing compiler took over from the PL/I F compiler and was IBM's workhorse compiler from the 1970s to the 1990s. Like PL/I F, it is a multiple pass compiler with a 44 kilobyte design point, but it is an entirely new design. Unlike the F compiler, it has to perform compile time evaluation of constant expressions using the run-time library, reducing the maximum memory for a compiler phase to 28 kilobytes. A second-time around design, it succeeded in eliminating the annoyances of PL/I F such as cascading diagnostics. It was written in S/360 Macro Assembler by a team, led by Tony Burbridge, most of whom had worked on PL/I F. Macros were defined to automate common compiler services and to shield the compiler writers from the task of managing real-mode storage, allowing the compiler to be moved easily to other memory models. The gamut of program optimization techniques developed for the contemporary IBM Fortran H compiler were deployed: the Optimizer equaled Fortran execution speeds in the hands of good programmers. Announced with IBM S/370 in 1970, it shipped first for the DOS/360 operating system in August 1971, and shortly afterward for OS/360, and the first virtual memory IBM operating systems OS/VS1, MVS, and VM/CMS. (The developers were unaware that while they were shoehorning the code into 28 kb sections, IBM Poughkeepsie was finally ready to ship virtual memory support in OS/360). It supported the batch programming environments and, under TSO and CMS, it could be run interactively. This compiler went through many versions covering all mainframe operating systems including the operating systems of the Japanese plug-compatible machines (PCMs). The compiler has been superseded by "IBM PL/I for OS/2, AIX, Linux, z/OS" below. The PL/I checkout compiler, (colloquially "The Checker") announced in August 1970 was designed to speed and improve the debugging of PL/I programs. The team was led by Brian Marks. The three-pass design cut the time to compile a program to 25% of that taken by the F Compiler. It can be run from an interactive terminal, converting PL/I programs into an internal format, "H-text". This format is interpreted by the Checkout compiler at run-time, detecting virtually all types of errors. Pointers are represented in 16 bytes, containing the target address and a description of the referenced item, thus permitting "bad" pointer use to be diagnosed. In a conversational environment when an error is detected, control is passed to the user who can inspect any variables, introduce debugging statements and edit the source program. Over time the debugging capability of mainframe programming environments developed most of the functions offered by this compiler and it was withdrawn (in the 1990s?)


DEC PL/I

Perhaps the most commercially successful implementation aside from IBM's was Digital Equipment Corporation's VAX-11 PL/I, later known as VAX PL/I, then DEC PL/I. The implementation is "a strict superset of the ANSI X3.4-1981 PL/I General Purpose Subset and provides most of the features of the new ANSI X3.74-1987 PL/I General Purpose Subset", and was first released in 1980. It originally used a compiler backend named the VAX Code Generator (VCG) created by a team led by Dave Cutler. The front end was designed by Robert Freiburghouse, and was ported to VAX/VMS from
Multics Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
. It runs on VMS on VAX and
Alpha Alpha (uppercase , lowercase ) is the first letter of the Greek alphabet. In the system of Greek numerals, it has a value of one. Alpha is derived from the Phoenician letter ''aleph'' , whose name comes from the West Semitic word for ' ...
, and on
Tru64 Tru64 UNIX is a discontinued 64-bit UNIX operating system for the Alpha instruction set architecture (ISA), currently owned by Hewlett-Packard (HP). Previously, Tru64 UNIX was a product of Compaq, and before that, Digital Equipment Corporation (DE ...
. During the 1990s, Digital sold the compiler to UniPrise Systems, who later sold it to a company named Kednos. Kednos marketed the compiler as Kednos PL/I until October 2016 when the company ceased trading.


Teaching subset compilers

In the late 1960s and early 1970s, many US and Canadian universities were establishing time-sharing services on campus and needed conversational compiler/interpreters for use in teaching science, mathematics, engineering, and computer science. Dartmouth was developing
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
, but PL/I was a popular choice, as it was concise and easy to teach. As the IBM offerings were unsuitable, a number of schools built their own subsets of PL/I and their own interactive support. Examples are: In the 1960s and early 1970s, Allen-Babcock implemented the Remote Users of Shared Hardware (RUSH) time sharing system for an IBM System/360 Model 50 with custom
microcode In processor design, microcode serves as an intermediary layer situated between the central processing unit (CPU) hardware and the programmer-visible instruction set architecture of a computer. It consists of a set of hardware-level instructions ...
and subsequently implemented IBM's CPS, an interactive time-sharing system for OS/360 aimed at teaching computer science basics, offered a limited subset of the PL/I language in addition to BASIC and a remote job entry facility. PL/C, a dialect for teaching, a compiler developed at
Cornell University Cornell University is a Private university, private Ivy League research university based in Ithaca, New York, United States. The university was co-founded by American philanthropist Ezra Cornell and historian and educator Andrew Dickson W ...
, had the unusual capability of never failing to compile any program through the use of extensive automatic correction of many syntax errors and by converting any remaining syntax errors to output statements. The language was almost all of PL/I as implemented by IBM. PL/C was a very fast compiler. (Student Language/1, Student Language/One or Subset Language/1) was a PL/I subset, initially available late 1960s, that ran interpretively on the IBM 1130; instructional use was its strong point. PLAGO, created at the Polytechnic Institute of Brooklyn, used a simplified subset of the PL/I language and focused on good diagnostic error messages and fast compilation times. The Computer Systems Research Group of the University of Toronto produced the SP/k compilers which supported a sequence of subsets of PL/I called SP/1, SP/2, SP/3, ..., SP/8 for teaching programming. Programs that ran without errors under the SP/k compilers produced the same results under other contemporary PL/I compilers such as IBM's PL/I F compiler, IBM's checkout compiler or Cornell University's PL/C compiler. Other examples are PL0 by P. Grouse at the University of New South Wales, PLUM by
Marvin Victor Zelkowitz Marvin Victor Zelkowitz (born 7 August 1945) is an American computer scientist and engineer. Zelkowitz earned a degree in mathematics from Rensselaer Polytechnic Institute in 1967 and a master's degree and doctorate in computer science at Cornel ...
at the University of Maryland., and PLUTO from the University of Toronto.


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. Subsequent releases provided additional platforms ( MVS, VM, OS/390, AIX and
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
), but as of 2021, the only supported platforms are
z/OS z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest: ...
and AIX. 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 DEFINE ALIAS, ORDINAL, and DEFINE STRUCTURE statement to introduce user-defined types, the HANDLE locator data type, the TYPE data type itself, the UNION data type, and built-in functions for manipulating the new types. * Additional data types and attributes corresponding to common PC data types (e.g., UNSIGNED, VARYINGZ). * Improvements in readability of programs – often rendering implied usages explicit (e.g., BYVALUE 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

is a new computational data type. The ordinal facilities are like those in Pascal, e.g., 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 -statement (see below) allows additional s to be declared composed from PL/I's built-in attributes. The HANDLE(data structure) locator data type is similar to the data type, but strongly typed to bind only to a particular data structure. The => operator is used to select a data structure using a handle. The attribute (equivalent to 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 VARYINGZ (for zero-terminated character strings), HEXADEC, WIDECHAR, and GRAPHIC. * The optional arithmetic attributes UNSIGNED and SIGNED, BIGENDIAN and LITTLEENDIAN. UNSIGNED necessitated the UPTHRU and DOWNTHRU option on iterative groups enabling a counter-controlled loop to be executed without exceeding the limit value (also essential for ORDINALs and good for documenting loops). * The DATE(pattern) attribute for controlling date representations and additions to bring time and date to best current practice. New functions for manipulating dates include DAYS and DAYSTODATE for converting between dates and number of days, and a general DATETIME function for changing date formats. New string-handling functions were added to centre text, to edit using a picture format, and to trim blanks or selected characters from the head or tail of text, VERIFYR to VERIFY from the right. and SEARCH and TALLY functions. Compound assignment operators a la C e.g., +=, &=, -=, , , = were added. A+=1 is equivalent to A=A+1. Additional parameter descriptors and attributes were added for omitted arguments and variable length argument lists.


Program readability – making intentions explicit

The attribute declares an identifier as a constant (derived from a specific literal value or restricted expression). Parameters can have the (pass by address) or (pass by value) attributes. The and attributes prevent unintended assignments. DO FOREVER; obviates the need for the contrived construct . The -statement introduces user-specified names (e.g., ) for combinations of built-in attributes (e.g., FIXED BINARY(31,0)). Thus DEFINE ALIAS INTEGER FIXED BINARY(31.0) creates the name as an alias for the set of built-in attributes FIXED BINARY(31.0). DEFINE STRUCTURE applies to structures and their members; it provides a name for a set of structure attributes and corresponding substructure member declarations for use in a structure declaration (a generalisation of the attribute).


Structured programming additions

A statement to exit a loop, and an to continue with the next iteration of a loop. and 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 , or storage. Procedure names used in the package also are local, but can be made external by means of the option of the -statement.


Interrupt handling

The -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 condition handles invalid operation codes detected by the PC processor, as well as illegal arithmetic operations such as subtraction of two infinite values. The condition is provided to intercept conditions for which no specific ON-unit has been provided in the current procedure. The condition is raised when an statement is unable to obtain sufficient storage.


Other mainframe and minicomputer compilers

A number of vendors produced compilers to compete with IBM PL/I F or Optimizing compiler on mainframes and minicomputers in the 1970s. In the 1980s the target was usually the emerging ANSI-G subset. * In 1974
Burroughs Corporation The Burroughs Corporation was a major American manufacturer of business equipment. The company was founded in 1886 as the American Arithmometer Company by William Seward Burroughs I, William Seward Burroughs. The company's history paralleled many ...
announced PL/I for the B6700 and B7700. *
UNIVAC UNIVAC (Universal Automatic Computer) was a line of electronic digital stored-program computers starting with the products of the Eckert–Mauchly Computer Corporation. Later the name was applied to a division of the Remington Rand company and ...
released a UNIVAC PL/I, and in the 1970s also used a variant of PL/I, PL/I PLUS, for system programming. * From 1978
Data General Data General Corporation was an early minicomputer firm formed in 1968. Three of the four founders were former employees of Digital Equipment Corporation (DEC). Their first product, 1969's Data General Nova, was a 16-bit minicomputer intended to ...
provided PL/I on its
Eclipse An eclipse is an astronomical event which occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three ...
and Eclipse MV platforms running the AOS, AOS/VS & AOS/VS II operating systems. A number of operating system utility programs were written in the language. * Paul Abrahams of NYU's Courant Institute of Mathematical Sciences wrote CIMS PL/I in 1972 in PL/I, bootstrapping via PL/I F. It supported "about 70%" of PL/I compiling to the CDC 6600 *
CDC The Centers for Disease Control and Prevention (CDC) is the national public health agency of the United States. It is a United States federal agency under the Department of Health and Human Services (HHS), and is headquartered in Atlanta, ...
delivered an optimizing subset PL/I compiler for Cyber 70, 170 and 6000 series. * Fujitsu delivered a PL/I compiler equivalent to the PL/I Optimizer. * Stratus Technologies PL/I is an ANSI G implementation for the VOS operating system. *
IBM Series/1 The IBM Series/1 is a 16-bit minicomputer, introduced in 1976, that in many respects competed with other minicomputers of the time, such as the PDP-11 from Digital Equipment Corporation and similar offerings from Data General and HP. The Ser ...
PL/I is an extended subset of ANSI Programming Language PL/I (ANSI X3.53-1976) for the IBM Series/1 Realtime Programming System.


PL/I compilers for Microsoft .NET

* In 2011, Raincode designed a full legacy compiler for the Microsoft .NET and .NET Core platforms, named The Raincode PL/I compiler.


PL/I compilers for personal computers and Unix

* In the 1970s and 1980s
Digital Research Digital Research, Inc. (DR or DRI) was a privately held American software company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser ...
sold a PL/I compiler for
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
(PL/I-80), CP/M-86 (PL/I-86) and Personal Computers with DOS. It was based on Subset G of PL/I and was written in PL/M. *
Micro Focus Micro Focus International plc was a British multinational software and information technology business based in Newbury, Berkshire, England. The firm provided software and consultancy. The company was listed on the London Stock Exchange and t ...
implemented Open PL/I for Windows and UNIX/Linux systems, which they acquired from Liant. * IBM delivered PL/I for
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
in 1994, and PL/I for AIX in 1995. * Iron Spring PL/I for
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
and later
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
was introduced in 2007. * GCC (pl1gcc) front end; the project's last release was in September 2007.


PL/I dialects

* PL/S, a dialect of PL/I, initially called BSL was developed in the late 1960s and became the system programming language for IBM mainframes. Almost all IBM mainframe system software in the 1970s and 1980s was written in PL/S. It differed from PL/I in that there were no data type conversions, no run-time environment, structures were mapped differently, and assignment was a byte by byte copy. All strings and arrays had fixed extents, or used the REFER option. PL/S was succeeded by PL/AS, and then by PL/X, which is the language currently used for internal work on current operating systems, OS/390 and now
z/OS z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest: ...
. It is also used for some z/VSE and z/VM components. IBM Db2 for z/OS is also written in PL/X. * PL/C, is an instructional dialect of the PL/I computer programming language, developed at Cornell University in the 1970s. * Two dialects of PL/I named PL/MP (Machine Product) and PL/MI (Machine Interface) were used by IBM in the system software of the
System/38 The System/38 is a discontinued minicomputer and midrange computer manufactured and sold by IBM. The system was announced in 1978. The System/38 has 48-bit computing, 48-bit addressing, which was unique for the time, and a novel database#Integrat ...
and AS/400 platforms. PL/MP was used to implement the so-called Vertical Microcode of these platforms, and targeted the IMPI instruction set. PL/MI targets the Machine Interface of those platforms, and is used in the System/38 Control Program Facility, and the XPF layer of OS/400. The PL/MP code was mostly replaced with C++ when OS/400 was ported to the IBM RS64 processor family, although some was retained and retargeted for the
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
/
Power ISA Power ISA is a reduced instruction set computer (RISC) instruction set architecture (ISA) currently developed by the OpenPOWER Foundation, led by IBM. It was originally developed by IBM and the now-defunct Power.org industry group. Power IS ...
architecture. The PL/MI code was not replaced, and remains in use in IBM i. * PL.8, so-called because it was about 80% of PL/I, was originally developed by IBM Research in the 1970s for the IBM 801 architecture. It later gained support for the
Motorola 68000 The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Sector ...
and System/370 architectures. It continues to be used for several IBM internal systems development tasks (e.g., millicode and
firmware In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, h ...
for
z/Architecture z/Architecture, initially and briefly called ESA Modal Extensions (ESAME), is IBM's 64-bit complex instruction set computer (CISC) instruction set architecture, implemented by its mainframe computers. IBM introduced its first z/Architecture ...
systems) and has been re-engineered to use a
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit central processing units (CPU) and arithmetic logic units (ALU) are those that are based on processor registers, a ...
gcc-based backend. * Honeywell, Inc. developed PL-6 for use in creating the CP-6 operating system. *
Prime Computer Prime Computer, Inc. was a Natick, Massachusetts-based producer of minicomputers from 1972 until 1992. With the advent of Personal computer, PCs and the decline of the minicomputer industry, Prime was forced out of the market in the early 1990s, ...
used two different PL/I dialects as
system programming language A system programming language is a programming language used for system programming; such languages are designed for writing system software, which usually requires different development approaches when compared with application software. Eds ...
s for the PRIMOS
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
: PL/P, starting from version 18, and then SP/L, starting from version 19. * XPL is a dialect of PL/I used to write other compilers using the XPL compiler techniques. XPL added a heap string datatype to its small subset of PL/I. * HAL/S is a real-time aerospace programming language, best known for its use in the Space Shuttle program. It was designed by Intermetrics in the 1970s for NASA. HAL/S was implemented in XPL. * IBM and various subcontractors also developed another PL/I variant in the early 1970s to support signal processing for the Navy called SPL/I. * SabreTalk, a real-time dialect of PL/I used to program the
Sabre A sabre or saber ( ) is a type of backsword with a curved blade associated with the light cavalry of the Early Modern warfare, early modern and Napoleonic period, Napoleonic periods. Originally associated with Central European cavalry such a ...
airline reservation system. *
Apple An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
, a PL/I dialect developed by General Motors Research Laboratories for their
Control Data Corporation Control Data Corporation (CDC) was a mainframe and supercomputer company that in the 1960s was one of the nine major U.S. computer companies, which group included IBM, the Burroughs Corporation, and the Digital Equipment Corporation (DEC), the N ...
STAR-100 supercomputer, used extensively for graphic design.


Usage

PL/I implementations were developed for mainframes from the late 1960s, mini computers in the 1970s, and personal computers in the 1980s and 1990s. Although its main use has been on mainframes, there are PL/I versions for DOS,
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
, AIX,
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Op ...
, and
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
. It has been widely used in business data processing and for system use for writing operating systems on certain platforms. Very complex and powerful systems have been built with PL/I: * The
SAS System SAS (previously "Statistical Analysis System") is a statistical software suite developed by SAS Institute for data management, advanced analytics, multivariate analysis, business intelligence, and predictive analytics. SAS was developed at No ...
was initially written in PL/I; the SAS data step is still modeled on PL/I syntax. * The pioneering online airline reservation system
Sabre A sabre or saber ( ) is a type of backsword with a curved blade associated with the light cavalry of the Early Modern warfare, early modern and Napoleonic period, Napoleonic periods. Originally associated with Central European cavalry such a ...
was originally written for the IBM 7090 in assembler. The S/360 version was largely written using SabreTalk, a purpose-built subset PL/I compiler for a dedicated control program. * The
Multics Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
operating system was largely written in PL/I. * PL/I was used to write an executable formal definition to interpret IBM's System Network Architecture. * Some components of the
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Op ...
operating system were originally written in PL/I, but were later rewritten in C during the port of VMS to the
IA-64 IA-64 (Intel Itanium architecture) is the instruction set architecture (ISA) of the discontinued Itanium family of 64-bit Intel microprocessors. The basic ISA specification originated at Hewlett-Packard (HP), and was subsequently implemented by ...
architecture. PL/I did not fulfill its supporters' hopes that it would displace Fortran and COBOL and become the major player on mainframes. It remained a minority but significant player. There cannot be a definitive explanation for this, but some trends in the 1970s and 1980s militated against its success by progressively reducing the territory on which PL/I enjoyed a competitive advantage. First, the nature of the mainframe software environment changed. Application subsystems for
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
and
transaction processing In computer science, transaction processing is information processing that is divided into individual, indivisible operations called ''transactions''. Each transaction must succeed or fail as a complete unit; it can never be only partially c ...
(
CICS IBM CICS (Customer Information Control System) is a family of mixed-language application servers that provide online business transaction management, transaction management and connectivity for applications on IBM mainframe systems under z/OS ...
and IMS and
Oracle An oracle is a person or thing considered to provide insight, wise counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. If done through occultic means, it is a form of divination. Descript ...
on System 370) and application generators became the focus of mainframe users' application development. Significant parts of the language became irrelevant because of the need to use the corresponding native features of the subsystems (such as tasking and much of input/output). Fortran was not used in these application areas, confining PL/I to COBOL's territory; most users stayed with COBOL. But as the PC became the dominant environment for program development, Fortran, COBOL and PL/I all became minority languages overtaken by C++,
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and the like. Second, PL/I was overtaken in the system programming field. The IBM system programming community was not ready to use PL/I; instead, IBM developed and adopted a proprietary dialect of PL/I for system programming. – PL/S. With the success of PL/S inside IBM, and of C outside IBM, the unique PL/I strengths for system programming became less valuable. Third, the development environments grew capabilities for interactive software development that, again, made the unique PL/I interactive and debugging strengths less valuable. Fourth, features such as structured programming, character string operations, and object orientation were added to COBOL and Fortran, which further reduced PL/I's relative advantages. On mainframes there were substantial business issues at stake too. IBM's hardware competitors had little to gain and much to lose from success of PL/I. Compiler development was expensive, and the IBM compiler groups had an in-built competitive advantage. Many IBM users wished to avoid being locked into proprietary solutions. With no early support for PL/I by other vendors it was best to avoid PL/I.


Evolution of the PL/I language

This article uses the PL/I standard as the reference point for language features. But a number of features of significance in the early implementations were not in the Standard; and some were offered by non-IBM compilers. And the de facto language continued to grow after the standard, ultimately driven by developments on the Personal Computer.


Significant features omitted from the standard


Multithreading

Multithreading, under the name "multitasking", was implemented by PL/I F, the PL/I Checkout and Optimizing compilers, and the newer AIX and Z/OS compilers. It comprised the data types and , the -option on the -statement ( Fork), the -statement ( Join), the DELAY(delay-time), -options on the record I/O statements and the statement to unlock locked records on files. Event data identify a particular event and indicate whether it is complete ('1'B) or incomplete ('0'B): task data items identify a particular task (or
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management * Business process, activities that produce a specific s ...
) and indicate its priority relative to other tasks.


Preprocessor

The first IBM ''Compile time
preprocessor In computer science, a preprocessor (or precompiler) is a Computer program, program that processes its input data to produce output that is used as input in another program. The output is said to be a preprocessed form of the input data, which i ...
'' was built by the IBM Boston Advanced Programming Center located in Cambridge, Mass, and shipped with the PL/I F compiler. The %INCLUDE statement was in the Standard, but the rest of the features were not. The DEC and Kednos PL/I compilers implemented much the same set of features as IBM, with some additions of their own. IBM has continued to add preprocessor features to its compilers. The preprocessor treats the written source program as a sequence of tokens, copying them to an output source file or acting on them. When a % token is encountered the following compile time statement is executed: when an identifier token is encountered and the identifier has been d, d, and assigned a compile time value, the identifier is replaced by this value. Tokens are added to the output stream if they do not require action (e.g., +), as are the values of ACTIVATEd compile time expressions. Thus a compile time variable could be declared, activated, and assigned using %PI='3.14159265'. Subsequent occurrences of would be replaced by 3.14159265. The data type supported are FIXED DECIMAL integers and strings of varying length with no maximum length. The structure statements are: * * %procedure_name: PROCEDURE (parameter list) RETURNS (type); statements...; % abel_list:ND; * and the simple statements, which also may have a * and * ''assignment'' statement * %DECLARE identifier_attribute_list * %GO TO label * %INCLUDE * ''null'' statement The feature allowed programmers to use identifiers for constants e.g., product part numbers or mathematical constants and was superseded in the standard by named constants for computational data. Conditional compiling and iterative generation of source code, possible with compile-time facilities, was not supported by the standard. Several manufacturers implemented these facilities.


Structured programming additions

Structured programming additions were made to PL/I during standardization but were not accepted into the standard. These features were the -statement to exit from an iterative , the -option and -option added to , and a case statement of the general form: These features were all included in IBM's PL/I Checkout and Optimizing compilers and in DEC PL/I.


Debug facilities

PL/I F had offered some debug facilities that were not put forward for the standard but were implemented by others notably the CHECK(variable-list) condition prefix, CHECK on-condition and the SNAP option. The IBM Optimizing and Checkout compilers added additional features appropriate to the conversational mainframe programming environment (e.g., an ATTENTION condition).


Significant features developed since the standard

Several attempts had been made to design a structure member type that could have one of several datatypes (CELL in early IBM). With the growth of classes in programming theory, approaches to this became possible on a PL/I base UNION, TYPE etc. have been added by several compilers. PL/I had been conceived in a single-byte character world. With support for Japanese and Chinese language becoming essential, and the developments on International Code Pages, the character string concept was expanded to accommodate wide non-ASCII/EBCDIC strings. Time and date handling were overhauled to deal with the millennium problem, with the introduction of the DATETIME function that returned the date and time in one of about 35 different formats. Several other date functions deal with conversions to and from days and seconds.


Criticisms


Implementation issues

Though the language is easy to learn and use, implementing a PL/I compiler is difficult and time-consuming. A language as large as PL/I needed subsets that most vendors could produce and most users master. This was not resolved until "ANSI G" was published. The compile time facilities, unique to PL/I, took added implementation effort and additional compiler passes. A PL/I compiler was two to four times as large as comparable Fortran or COBOL compilers, and also that much slower—supposedly offset by gains in programmer productivity. This was anticipated in IBM before the first compilers were written. Some argue that PL/I is unusually hard to parse. The PL/I ''keywords'' are not reserved so programmers can use them as variable or procedure names in programs. Because the original PL/I(F) compiler attempts ''auto-correction'' when it encounters a keyword used in an incorrect context, it often assumes it is a variable name. This leads to "cascading diagnostics", a problem solved by later compilers. The effort needed to produce good object code was perhaps underestimated during the initial design of the language.
Program optimization In computer science, program optimization, code optimization, or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources. In general, a computer program may be op ...
(needed to compete with the excellent program optimization carried out by available Fortran compilers) is unusually complex owing to
side effects In medicine, a side effect is an effect of the use of a medicinal drug or other treatment, usually adverse but sometimes beneficial, that is unintended. Herbal and traditional medicines also have side effects. A drug or procedure usually used ...
and pervasive problems with
aliasing In signal processing and related disciplines, aliasing is a phenomenon that a reconstructed signal from samples of the original signal contains low frequency components that are not present in the original one. This is caused when, in the ori ...
of variables. Unpredictable modification can occur asynchronously in exception handlers, which may be provided by " statements" in (unseen) callers. Together, these make it difficult to reliably predict when a program's variables might be modified at runtime. In typical use, however, user-written error handlers (the -unit) often do not make assignments to variables. In spite of the aforementioned difficulties, IBM produced the PL/I Optimizing Compiler in 1971. PL/I contains many rarely used features, such as multitasking support (an IBM extension to the language) which add cost and complexity to the compiler, and its co-processing facilities require a multi-programming environment with support for non-blocking multiple threads for processes by the
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
. Compiler writers were free to select whether to implement these features. An undeclared variable is, by default, declared by first occurrence—thus misspelling might lead to unpredictable results. This "implicit declaration" is no different from FORTRAN programs. For PL/I(F), however, an attribute listing enables the programmer to detect any misspelled or undeclared variable.


Programmer issues

Many programmers were slow to move from
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
or Fortran due to a perceived complexity of the language and immaturity of the PL/I F compiler. Programmers were sharply divided into scientific programmers (who used Fortran) and business programmers (who used COBOL), with significant tension and even dislike between the groups. PL/I syntax borrowed from both COBOL and Fortran
syntax In linguistics, syntax ( ) is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure (constituenc ...
. So instead of noticing features that would make their job easier, Fortran programmers of the time noticed COBOL syntax and had the opinion that it was a business language, while COBOL programmers noticed Fortran syntax and looked upon it as a scientific language. Both COBOL and Fortran programmers viewed it as a "bigger" version of their own language, and both were somewhat intimidated by the language and disinclined to adopt it. Another factor was ''pseudo''-similarities to COBOL, Fortran, and ALGOL. These were PL/I elements that looked similar to one of those languages, but worked differently in PL/I. Such frustrations left many experienced programmers with a jaundiced view of PL/I, and often an active dislike for the language. An early UNIX fortune file contained the following tongue-in-cheek description of the language:
Speaking as someone who has delved into the intricacies of PL/I, I am sure that only Real Men could have written such a machine-hogging, cycle-grabbing, all-encompassing monster. Allocate an array and free the middle third? Sure! Why not? Multiply a character string times a bit string and assign the result to a float decimal? Go ahead! Free a controlled variable procedure parameter and reallocate it before passing it back? Overlay three different types of variable on the same memory location? Anything you say! Write a recursive macro? Well, no, but Real Men use rescan. How could a language so obviously designed and written by Real Men not be intended for Real Man use?
On the positive side, full support for pointers to all data types (including pointers to structures),
recursion Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
, multitasking, string handling, and extensive built-in functions meant PL/I was indeed quite a leap forward compared to the programming languages of its time. However, these were not enough to persuade a majority of programmers or shops to switch to PL/I. The PL/I F compiler's compile time
preprocessor In computer science, a preprocessor (or precompiler) is a Computer program, program that processes its input data to produce output that is used as input in another program. The output is said to be a preprocessed form of the input data, which i ...
was unusual (outside the
Lisp Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation. Originally specified in the late 1950s, ...
world) in using its target language's syntax and semantics (''e.g.'' as compared to the C preprocessor's "#" directives).


Special topics in PL/I


Storage classes

PL/I provides several 'storage classes' to indicate how the lifetime of variables' storage is to be managed STATIC, AUTOMATIC, CONTROLLED, and BASED, and AREA. STATIC data is allocated and initialized at load-time, as is done in
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural, and, since 2002, object-oriented language. COBOL is primarily ...
"working-storage" and early Fortran. This is the default for EXTERNAL variables (similar to C “extern” or Fortran “named common"), AUTOMATIC is PL/I's default storage class for INTERNAL variables, similar to that of other block-structured languages influenced by
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
, like the "auto" storage class in the C language, the default storage allocation in Pascal, and "local-storage" in IBM COBOL. Storage for AUTOMATIC variables is allocated upon entry into the procedure, BEGIN-block, or ON-unit in which they are declared. The compiler and runtime system allocate memory for a stack frame to contain them and other housekeeping information. If a variable is declared with an INITIAL-attribute, code to set it to an initial value is executed at this time. Care is required to manage the use of initialization properly. Large amounts of code can be executed to initialize variables every time a scope is entered, especially if the variable is an array or structure. Storage for AUTOMATIC variables is freed at block exit. STATIC, CONTROLLED, or BASED variables are used to retain variables' contents between invocations of a procedure or block. CONTROLLED storage is managed using a stack, but the pushing and popping of allocations on the stack is managed by the programmer, using ALLOCATE and FREE statements. Storage for BASED variables is also managed using ALLOCATE/FREE, but instead of a stack these allocations have independent lifetimes and are addressed through OFFSET or POINTER variables. BASED variables can also be used to address arbitrary storage areas by setting the associated POINTER variable, for example following a
linked list In computer science, a linked list is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes whi ...
. The AREA attribute is used to declare programmer-defined heaps. Data can be allocated and freed within a specific area, and the area can be deleted, read, and written as a unit.


Storage type sharing

There are several ways of accessing allocated storage through different data declarations. Some of these are well defined and safe, some can be used safely with careful programming, and some are inherently unsafe or machine dependent. Passing a variable as an argument to a parameter by reference allows the argument's allocated storage to be referenced using the parameter. The attribute (e.g., DCL A(10,10), B(2:9,2:9) DEFINED A) allows part or all of a variable's storage to be used with a different, but consistent, declaration. The language definition includes a attribute (later renamed ) to allow different definitions of data to share the same storage. This was not supported by many early IBM compilers. These usages are safe and machine independent. Record I/O and list processing produce situations where the programmer needs to fit a declaration to the storage of the next record or item, before knowing what type of data structure it has. Based variables and pointers are key to such programs. The data structures must be designed appropriately, typically using fields in a data structure to encode information about its type and size. The fields can be held in the preceding structure or, with some constraints, in the current one. Where the encoding is in the preceding structure, the program needs to allocate a based variable with a declaration that matches the current item (using expressions for extents where needed). Where the type and size information are to be kept in the current structure ("self defining structures") the type-defining fields must be ahead of the type dependent items and in the same place in every version of the data structure. The -option is used for self-defining extents (e.g., string lengths as in DCL 1 A BASED, 2 N BINARY, 2 B CHAR(LENGTH REFER A.N.), etc where is used to allocate instances of the data structure. For self-defining structures, any typing and ed fields are placed ahead of the "real" data. If the records in a data set, or the items in a list of data structures, are organised this way they can be handled safely in a machine independent way. PL/I implementations do not (except for the PL/I Checkout compiler) keep track of the data structure used when storage is first allocated. Any declaration can be used with a pointer into the storage to access the storage inherently unsafe and machine dependent. However, this usage has become important for "pointer arithmetic" (typically adding a certain amount to a known address). This has been a contentious subject in computer science. In addition to the problem of wild references and buffer overruns, issues arise due to the alignment and length for data types used with particular machines and compilers. Many cases where pointer arithmetic might be needed involve finding a pointer to an element inside a larger data structure. The function computes such pointers, safely and machine independently. Pointer arithmetic may be accomplished by aliasing a binary variable with a pointer as in
DCL P POINTER, N FIXED BINARY(31) BASED(ADDR(P));
N=N+255;
It relies on pointers being the same length as FIXED BINARY(31) integers and aligned on the same boundaries. With the prevalence of C and its free and easy attitude to pointer arithmetic, recent IBM PL/I compilers allow pointers to be used with the addition and subtraction operators to giving the simplest syntax (but compiler options can disallow these practices where safety and machine independence are paramount).


ON-units and exception handling

When PL/I was designed, programs only ran in batch mode, with no possible intervention from the programmer at a terminal. An exceptional condition such as division by zero would abort the program yielding only a hexadecimal core dump. PL/I exception handling, via -units, allowed the program to stay in control in the face of hardware or operating system exceptions and to recover debugging information before closing down more gracefully. As a program became properly debugged, most of the exception handling could be removed or disabled: this level of control became less important when conversational execution became commonplace. Computational exception handling is enabled and disabled by condition prefixes on statements, blocks (including -units) and procedures. – e.g., (SIZE, NOSUBSCRIPTRANGE): A(I)=B(I)*C; . Operating system exceptions for Input/Output and storage management are always enabled. The -unit is a single statement or -block introduced by an -statement. Executing the statement enables the condition specified, e.g., ON ZERODIVIDE ON-unit. When the exception for this condition occurs and the condition is enabled, the -unit for the condition is executed. -units are inherited down the call chain. When a block, procedure or -unit is activated, the -units established by the invoking activation are inherited by the new activation. They may be over-ridden by another -statement and can be reestablished by the -statement. The exception can be simulated using the -statement – e.g., to help debug the exception handlers. The dynamic inheritance principle for -units allows a routine to handle the exceptions occurring within the subroutines it uses. If no -unit is in effect when a condition is raised a standard system action is taken (often this is to raise the condition). The system action can be reestablished using the option of the -statement. With some conditions it is possible to complete executing an ON-unit and return to the point of interrupt (e.g., the , , , , , and conditions) and resume normal execution. With other conditions such as (SUBSCRIPTRANGE), the condition is raised when this is attempted. An ON-unit may be terminated with a GO TO preventing a return to the point of interrupt, but permitting the program to continue execution elsewhere as determined by the programmer. An -unit needs to be designed to deal with exceptions that occur in the -unit itself. The ON ERROR SYSTEM; statement allows a nested error trap; if an error occurs within an -unit, control might pass to the operating system where a system dump might be produced, or, for some computational conditions, continue execution (as mentioned above). The PL/I I/O statements have relatively simple syntax as they do not offer options for the many situations from end-of-file to record transmission errors that can occur when a record is read or written. Instead, these complexities are handled in the -units for the various file conditions. The same approach was adopted for sub-allocation and the condition. The existence of exception handling -units can have an effect on optimization, because variables can be inspected or altered in -units. Values of variables that might otherwise be kept in registers between statements, may need to be returned to storage between statements. This is discussed in the section on Implementation Issues above.


GO TO with a non-fixed target

PL/I has counterparts for COBOL and FORTRAN's specialized GO TO statements. Syntax for both COBOL and FORTRAN exist for coding two special two types of , each of which has a target that is not always the same. * (COBOL), (FORTRAN): ** (“altered go to”). **: There are other/helpful restrictions on these, especially "in programs ... attribute, in methods, or .. option." ** (“assigned go to”)
**: One enhancement, which adds built-in documentation, is **:: (which restricts the variable's value to "one of the labels in the list.") * ... based on a variable's subscript-like value. ** (“computed go to”) ** (“go to depending on”). PL/I has statement label variables (with the attribute), which can store the value of a statement label, and later be used in a statement.
LABL1: ....
.
.
LABL2: ...
.
.
.
MY_DEST = LABL1;
.
GO TO MY_DEST;
The programmer can also create an array of static label constants by subscripting the statement labels. GO TO HERE(LUCKY_NUMBER); /* minus 1, zero, or ... */ HERE(-1): PUT LIST ("I O U"); GO TO Lottery; HERE(0): PUT LIST ("No Cash"); GO TO Lottery; HERE(1): PUT LIST ("Dollar Bill"); GO TO Lottery; HERE(2): PUT LIST ("TWO DOLLARS"); GO TO Lottery; Statement label variables can be passed to called procedures, and used to return to a different statement in the calling routine.


Sample programs


Hello world program

Hello2: proc options(main); put list ('Hello, World!'); end Hello2;


Search for a string

/* Read in a line, which contains a string, /* and then print every subsequent line that contains that string. */ find_strings: procedure options (main); declare pattern character (100) varying; declare line character (100) varying; declare line_no fixed binary; on endfile (sysin) stop; get edit (pattern) (L); line_no = 1; do forever; get edit (line) (L); if index(line, pattern) > 0 then put skip list (line_no, line); line_no = line_no + 1; end; end find_strings;


See also

* List of programming languages * Timeline of programming languages


Notes


References


Textbooks

* * * * * * * * * * *


Standards

*
ANSI The American National Standards Institute (ANSI ) is a private nonprofit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organiz ...
X3.53-1976 (R1998) ''Information Systems - Programming Language - PL/I'' * ANSI ANSI X3.74-1981 (R1998) ''Information Systems - Programming Language - PL/I General-Purpose Subset'' * ANSI ANSI X3.74-1987 (R1998) ''Information Systems - Programming Language - PL/I General-Purpose Subset'' * ECMA 50 ''Programming Language PL/I'', 1st edition, December 1976 *
ISO The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries. Me ...
6160:1979 ''Programming languages—PL/I'' * ISO/IEC 6522:1992 ''Information technology: Programming languages: PL/I general purpose subset''


Reference manuals

* Burroughs Corporation, "B 6700 / B 7700 PL/I Language Reference", 5001530. Detroit, 1977. * CDC. R. A. Vowels, "PL/I for CDC Cyber". Optimizing compiler for the CDC Cyber 70 series. * Digital Equipment Corporation
"decsystem10 Conversational Programming Language User's Manual"
DEC-10-LCPUA-A-D. Maynard, 1975. * Fujitsu Ltd, "Facom OS IV PL/I Reference Manual", 70SP5402E-1,1974. 579 pages. PL/I F subset. * Honeywell, Inc.
"Multics PL/I Language Specification"
AG94-02. 1981. * IBM
IBM Operating System/360 PL/I: Language Specifications
C28-6571. 1965. * IBM
OS PL/I Checkout and Optimizing Compilers: Language Reference Manual
GC33-0009. 1976. * IBM
IBM, "NPL Technical Report"
December 1964. * IBM
Enterprise PL/I for z/OS Version 4 Release 1 Language Reference Manual
, SC14-7285-00. 2010. * IBM, OS/2 PL/I Version 2: Programming: Language Reference, 3rd Ed., Form SC26-4308, San Jose. 1994.

, AA-H952E-TM. Nov 2003. * Liant Software Corporation (1994), Open PL/I Language Reference Manual, Rev. Ed., Framingham (Mass.). * Nixdorf Computer, "Terminalsystem 8820 Systemtechnischer Teil PL/I-Subset",05001.17.8.93-01, 1976. * Ing. C. Olivetti, "Mini PL/I Reference Manual", 1975, No. 3970530 V * Q1 Corporation, "The Q1/LMC Systems Software Manual", Farmingdale, 1978.


External links


IBM PL/I Compilers
for
z/OS z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest: ...
, AIX, MVS, VM and VSE
Iron Spring Software
PL/I for
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
and
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...

Micro Focus' Mainframe PL/I Migration Solution

OS PL/I V2R3 grammar Version 0.1

Pliedit
PL/I editor for Eclipse

a side-by-side comparison of PL/I and C.
Softpanorama PL/1
page] ic "PL/1"
The PL/I Language

PL1GCC project in SourceForge

PL/I software to print signs
source code in book form, by David Sligar (1977), for IBM PL/I F compiler. * , Open-source Windows NT PL/I compiler {{DEFAULTSORT:Pl I Procedural programming languages PL/I programming language family Structured programming languages Concurrent programming languages Systems programming languages IBM software Programming languages created in 1964 Programming languages with an ISO standard