Preface

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

This manual is intended for experienced application programmers working in an OpenVOS 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.

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 OpenVOS 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 OpenVOS 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 OpenVOS preprocessor statements.

Chapter 11 documents the PL/I preprocessor statements.

Chapter 12 describes the PL/I language statements.

Chapter 13 describes the OpenVOS PL/I built-in functions, pseudovariables, and OpenVOS-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 OpenVOS PL/I keywords.

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

Appendix C summarizes the nonstandard OpenVOS PL/I features.

Appendix D provides the OpenVOS internal character code set.

Related Manuals

See the following Stratus manuals for related documentation.

  • OpenVOS PL/I Subroutines Manual 
  • OpenVOS 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  *.*

Syntax Notation

A language format shows the syntax of an OpenVOS PL/I statement, portion of a statement, declaration, or definition. When OpenVOS 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 OpenVOS 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 OpenVOS StrataDOC Web site is an online-documentation service provided by Stratus. It enables Stratus customers to view, search, download, print, and comment on OpenVOS technical manuals via a common Web browser. It also provides the latest updates and corrections available for the OpenVOS document set.

You can access the OpenVOS StrataDOC Web site at http://stratadoc.stratus.com. A copy of OpenVOS StrataDOC on supported media is included with this release. You can also order additional copies from Stratus.

This manual is available on the OpenVOS StrataDOC Web site.

For information about ordering OpenVOS StrataDOC on supported media, 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 OpenVOS System Administration: Administering and Customizing a System  and the OpenVOS 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.