User's Manual for Digital UNIX
This manual gives an overview of the PL/I language and an explanation
of PL/I program development. It describes the operation of the
Kednos PL/I for UNIX compiler and the features of the Digital UNIX
operating system environment that are important to the PL/I
programmer.
Operating System and Version: Digital UNIX Version 3.2 and
higher
Kednos Systems, Inc., makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description.
Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Kednos or an authorized sublicensor.
No responsibility is assumed for the use or reliability of software on equipment that is not listed as supported in the Product Description.
Restricted Rights: Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013.
© Kednos Corporation, 1995, 1996, All Rights Reserved.
Kednos Corporation, Kednos PL/I, and Kednos VPO are trademarks of Kednos Corporation.
Alpha AXP, AXP, CDD, DEC,DEC 4000, DECwindows, Digital, OpenVMS AXP, ULTRIX, VAX, OpenVMS, VT102, VT220, VT240, VT320, VT330, VT340, and the DIGITAL logo are trademarks of Digital Equipment Corporation.
SAA and IBM are trademarks of International Business Machine Inc.
Stratus is a trademark of Stratus Computer Inc.
Kednos PL/I for UNIX includes the GNU readline and assembler software. See See for the entire text of the Free Software Foundation's GNU Copyleft.
Portions Copyright 1984-1990 FairCom Corporation. All Rights Reserved.
Kednos requests your critical evaluation to assist in preparing future documentation. Please send any comments to comments@Kednos.com or by physical mail to:
Compiling and Linking a PL/I Program 2-1
Compiling Multi-Language Programs 2-4
Linking Objects using the pl1 Command 2-8
Preprocessor Compilation Control 2-11
Passing Command Line Parameters to a PL/I Program 2-20
Accessing Automatic and Parameter Data 3-7
Qualifying Structure References 3-7
Referring to Arrays and Structures 3-8
Preparing to Use the Debugger 3-8
Compiling for the dbg Debugger 3-8
Debugging Optimized Programs 3-9
Starting and Ending a Debugging Session 3-10
Ending the Debugging Session 3-11
Using the dbg Command Line Editing Features 3-11
Getting Started with Command Line Editing 3-12
Using the UNIX File System for I/O 4-2
PL/I Files and UNIX File Specifications 4-2
Using Environment Variables 4-4
Environment Variables in TITLE Values 4-4
Process Standard System File Names 4-5
Expanding File Specifications 4-6
Values Returned by PL/I Built-In Functions for Error Handling 4-8
Access Modes for Record I/O 5-3
Direct and Sequential Access 5-4
Access by Record Identification 5-4
IBM Dialect Fixed Length Environment Options 5-5
IBM Dialect Variable Length Environment Options 5-6
Appending Records to an Existing File 5-8
Superseding an Existing File 5-8
Relative File Organization 5-8
Populating a Relative File 5-11
Specifying and Using Environment Options 6-1
Arguments for Environment Options 6-1
Interpretation of ENVIRONMENT Options for Existing Files 6-3
Conflicting and Invalid ENVIRONMENT Options 6-3
Summary of ENVIRONMENT Options 6-4
FIXED_LENGTH_RECORDS Option 6-16
MAXIMUM_RECORD_SIZE Option 6-17
ENVIRONMENT Options for File Protection and File Sharing 6-26
FLUSH Built-In Subroutine (DEC Dialect Only) 8-1
REWIND Built-In Subroutine (DEC Dialect Only) 8-2
How the Sort Program Interface Works 9-2
Determining Which Entry Point to Use 9-3
Calling the Sort Subroutines 9-4
General Format of the Sort Interface Call 9-4
Specifying the Sort Fields 9-5
Specifying Record Information 9-7
Specifying Input and Output Routines 9-10
Input and Output Routines 9-11
Using the PLIRETC Built-In Subroutine 9-11
RESIGNAL Built-In Subroutine 10-1
Resignaling the Condition 10-5
Executing a Nonlocal GOTO 10-6
Relationship of UNIX Signals to PL/I ON-Units 10-8
Accessing the Signal Values 10-10
Modifying the ONCODE Values 10-11
Search Path for ON-Units 10-13
Default Handling for Main Procedures 10-14
Default Handling for Non-Main Procedures 10-15
Condition-Handling Built-In Functions 10-22
ONCODE Built-In Function 10-22
The UNIX Procedure Calling and Condition Handling Standard 11-2
Parameter-Passing Mechanisms 11-2
Passing Parameters by Reference 11-3
Dummy Arguments for Arguments Passed by Reference 11-4
Using Pointer Values for Arguments Passed by Reference 11-5
Passing Arrays to a FORTRAN Routine by Reference 11-5
Passing Parameters by Value 11-5
Dummy Arguments for Arguments Passed by Value 11-7
Special Parameter Attributes 11-7
Determining the Type of Call 11-10
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION A-2
How to Apply These Terms to Your New Programs A-8
Figure 3-1. Specifying Environments 3-5
Figure 10-1. Resignaling a Condition 10-6
Figure 10-2. Unwinding the Call Stack 10-7
Figure 10-3. Execution of an ON-Unit 10-14
Table P-1. Documentation Conventions Table xi
Table 2-1. Alphabetic List of PL/I Driver Options 2-4
Table 3-1. dbg Command Line Options 3-10
Table 3-2. Debugger Command Summary 3-17
Table 4-1. Default Process Stream Names 4-5
Table 4-2. System File Names for Get and Put Statements 4-5
Table 6-1. Description of Columns in Table 6-2 6-4
Table 6-2. Summary of DEC and ANSI Dialect ENVIRONMENT Options 6-5
Table 6-3. Summary of IBM Dialect ENVIRONMENT Options 6-6
Table 6-4. ENVIRONMENT Options That Are Ignored 6-7
Table 6-5. Default Record Sizes 6-18
Table 6-6. Default Record Sizes 6-20
Table 7-1. Summary of Input/Output Statement Options 7-2
Table 9-1. Entry Points for the Sort Program 9-3
Table 10-1. Corresponding Values 10-10
Table 10-2. ONCODE Values for PL/I ON Conditions 10-23
Table 11-1. Converted Data Types of Arguments Passed by Reference 11-4
Figure 3-1. Specifying Environments 3-5
Figure 10-1. Resignaling a Condition 10-6
Figure 10-2. Unwinding the Call Stack 10-7
Figure 10-3. Execution of an ON-Unit 10-14
Table P-1. Documentation Conventions Table xv
Table 2-1. Alphabetic List of PL/I Driver Options 2-4
Table 3-1. dbg Command Line Options 3-10
Table 3-2. Debugger Command Summary 3-17
Table 4-1. Default Process Stream Names 4-5
Table 4-2. System File Names for Get and Put Statements 4-5
Table 6-1. Description of Columns in Table 6-2 6-4
Table 6-2. Summary of DEC and ANSI Dialect ENVIRONMENT Options 6-5
Table 6-3. Summary of IBM Dialect ENVIRONMENT Options 6-6
Table 6-4. ENVIRONMENT Options That Are Ignored 6-7
Table 6-5. Default Record Sizes 6-18
Table 6-6. Default Record Sizes 6-20
Table 7-1. Summary of Input/Output Statement Options 7-2
Table 9-1. Entry Points for the Sort Program 9-3
Table 10-1. Corresponding Values 10-10
Table 10-2. ONCODE Values for PL/I ON Conditions 10-23
Table 11-1. Converted Data Types of Arguments Passed by Reference 11-4
This manual describes how to use theKednos PL/I for UNIX compiler on the Digital UNIX operating system, and contains detailed explanations of the extensions made to the standard PL/I language for this implementation. To aid in program development, it includes information on some UNIX commands and utilities. It also includes information to assist in writing PL/I programs that use features of the file system and the operating system.