Preface

The VOS PL/I Language Manual (R009) documents the PL/I language as implemented under the Virtual Operating System (VOS). This manual is intended as a reference document, not as a tutorial.

This manual documents VOS PL/I for VOS Release 15.2.0.

This manual is intended for experienced application programmers working in a VOS PL/I environment.

Manual Version

This manual is a revision. Change bars, which appear in the margin, note the specific changes to text since the previous publication of this manual. Note, however, that change bars are not used in new chapters or appendixes.

This revision incorporates the following changes.

  • changes related to support for 64-bit integers
  • the removal of XA2000 and XA/R cross-compiler information
  • a new VOS-supplied function: returnptr

In addition, documentation errors from the previous version of this manual have been corrected, and customer suggestions have been incorporated.

Manual Organization

This manual has 15 chapters and 4 appendixes.

Chapter 1 briefly describes the history of the PL/I language.

Chapter 2 defines what a PL/I program is and introduces the essential components of the PL/I language.

Chapter 3 discusses the block structure of PL/I programs and addresses such issues as block activation and scope rules.

Chapter 4 explains the VOS PL/I data types and how they are used.

Chapter 5 documents the rules governing conversions between PL/I data types.

Chapter 6 describes the VOS PL/I storage classes. This chapter includes discussions of storage sharing and how based variables and pointers are used.

Chapter 7 explains how names are declared. This chapter also includes an attribute reference guide.

Chapter 8 describes how to refer to PL/I objects within a program, including the use of subscripts and other qualifiers. This chapter also explains the rules the compiler uses to resolve a reference to a specific object.

Chapter 9 documents PL/I operators and describes how operators and operands are combined to form expressions. This chapter also explains the rules for evaluating expressions.

Chapter 10 documents the VOS preprocessor statements.

Chapter 11 documents the PL/I preprocessor statements.

Chapter 12 describes the PL/I language statements.

Chapter 13 describes the VOS PL/I built-in functions, pseudovariables, and VOS-supplied functions.

Chapter 14 explains how to perform I/O using PL/I language statements.

Chapter 15 documents PL/I conditions and condition handlers.

Appendix A lists the abbreviations for certain VOS PL/I keywords.

Appendix B describes how data is stored internally in VOS PL/I.

Appendix C summarizes the nonstandard VOS PL/I features.

Appendix D provides the VOS internal character code set.

Related Manuals

See the following Stratus manuals for related documentation.

  • VOS PL/I Subroutines Manual 
  • VOS PL/I Transaction Processing Facility Reference Manual 
  • VOS PL/I Forms Management System 
  • VOS PL/I User's Guide 

Notation Conventions

This manual uses the following notation conventions.

  • Italics introduces or defines new terms. For example:

The master disk is the name of the member disk from which the module was booted.

  • Boldface emphasizes words in text. For example:

Every module must have a copy of the module_start_up.cm file.

  • Monospace represents text that would appear on your terminal's screen (such as commands, subroutines, code fragments, and names of files and directories). For example:
change_current_dir (master_disk)>system>doc 

  • Monospace italic represents terms that are to be replaced by literal values. In the following example, the user must replace the monospace-italic term with a literal value.
list_users -module module_name 

  • Monospace bold represents user input in examples and figures that contain both user input and system output (which appears in monospace). For example:
display_access_list system_default

%dev#m1>system>acl>system_default

w  *.*

Key Mappings for VOS Functions

VOS provides several command-line and display-form functions. Each function is mapped to a particular key or combination of keys on the terminal keyboard. To perform a function, you press the appropriate key(s) from the command-line or display form. For an explanation of the command-line and display-form functions, see the manual Introduction to VOS 

The keys that perform specific VOS functions vary depending on the terminal. For example, on a V105 ANSI terminal, you press the and keys simultaneously to perform the INTERRUPT function; on a V105/V109 EPC terminal, you press the key on the numeric keypad to perform the INTERRUPT function.

Note: Certain applications may define these keys differently. Refer to the documentation for the application for the specific key mappings.

The following table lists some VOS functions and the keys to which they are mapped on commonly used Stratus terminals. For information about the key mappings for a terminal that is not listed in this table, refer to the documentation for that terminal.

VOS Function
V105 PC/+ 106
V105 ANSI
V105/V109 EPC
CANCEL
or *
 
CYCLE
 
 
CYCLE BACK
 
-
 
DISPLAY FORM
  or - 
or -
  or
-
HELP
-
-
INSERT DEFAULT
-
-
INSERT SAVED
INTERRUPT
 
-
 
NO PAUSE
 
-
-
Numeric-keypad key

Syntax Notation

A language format shows the syntax of a VOS PL/I statement, portion of a statement, declaration, or definition. When VOS PL/I allows more than one format for a language construct, the documentation presents each format consecutively. For complex language constructs, the text may supply additional information about the syntax.

The following table explains the notation used in language formats.

The Notation Used in Language Formats

Notation
Meaning
element
Required element.
element...
Required element that can be repeated.
{element_1 element_2}
List of required elements.
{element_1 element_2}...
List of required elements that can be repeated.
 
 
Set of elements that are mutually exclusive; you must specify one of these elements.
[element]
Optional element.
[element]...
Optional element that can be repeated.
[element_1 element_2]
List of optional elements.
[element_1 element_2]...
List of optional elements that can be repeated.
 
 
Set of optional elements that are mutually exclusive; you can specify only one of these elements.
Note: Dots, brackets, and braces are not literal characters; you should not type them. Any list or set of elements can contain more than two elements. Brackets and braces are sometimes nested.

In the preceding table, element represents one of the following VOS PL/I language constructs.

  • keywords (which appear in monospace)
  • generic terms (which appear in monospace italic) that are to be replaced by items such as expressions, identifiers, literals, constants, or statements
  • statements or portions of statements

The elements in a list of elements must be entered in the order shown, unless the text specifies otherwise. An element or a list of elements followed by a set of three dots indicates that the element(s) can be repeated.

The following example shows a sample language format.

delete file(file_reference) [key(key_expression)] ; 

In examples, a set of three vertically aligned dots indicates that a portion of a language construct or program has been omitted. The following example illustrates this concept.

a:	procedure;
declare		b	entry;
	.
	.
	.
	call b;
	.
	.
	.
end a;

The manual uses a special character, , to represent a space character. For example, the following output line has three leading space characters.




cat

Online Documentation

The VOS StrataDOC Web site is an online-documentation service provided by Stratus. It enables Stratus customers to view, search, download, print, and comment on VOS technical manuals via a common Web browser. It also provides the latest updates and corrections available for the VOS document set.

You can access the VOS StrataDOC Web site at http://stratadoc.stratus.com. A copy of the VOS StrataDOC CD-ROM is included with this release. You can also order additional copies from Stratus.

This manual is available on the VOS StrataDOC Web site.

For information about ordering the VOS StrataDOC CD-ROM, see the next section, "Ordering Manuals."

Ordering Manuals

You can order manuals in the following ways.

  • If your system is connected to the Remote Service Network (RSN), issue the maint_request command at the system prompt. Complete the on-screen form with all of the information necessary to process your manual order.
  • Customers in North America can call the Stratus Customer Assistance Center (CAC) at (800) 221-6588 or (800) 828-8513, 24 hours a day, 7 days a week. All other customers can contact their nearest Stratus sales office, CAC office, or distributor; see http://www.stratus.com/support/cac/index.htm for CAC phone numbers outside the U.S.

Manual orders will be forwarded to Order Administration.

Commenting on This Manual

You can comment on this manual by using the command comment_on_manual. To use the comment_on_manual command, your system must be connected to the RSN. Alternatively, you can email comments on this manual to comments@stratus.com.

The comment_on_manual command is documented in the manual VOS System Administration: Administering and Customizing a System  and the VOS Commands Reference Manual  There are two ways you can use this command to send your comments.

  • If your comments are brief, type comment_on_manual, press or , and complete the data-entry form that appears on your screen. When you have completed the form, press .
  • If your comments are lengthy, save them in a file before you issue the command. Type comment_on_manual followed by -form, then press or . Enter this manual's part number, R009, then enter the name of your comments file in the -comments_path field. Press the key that performs the CYCLE function to change the value of -use_form to no and then press .

Note: If comment_on_manual does not accept the part number of this manual (which may occur if the manual is not yet registered in the manual_info.table file), you can use the mail request of the maint_request command to send your comments.

Your comments (along with your name) are sent to Stratus over the RSN.

Stratus welcomes any corrections and suggestions for improving this manual.