Kednos PL/I for OpenVMS Systems
Reference Manual


Previous Contents Index


Appendix B
Digital Multinational Character Set

The Digital Multinational Character Set is a set of 8-bit numeric values representing the alphabet, numerals, punctuation, and other symbols. The first 128 characters of the set (with decimal values from 0 through 127) are the American Standard Code for Information Interchange (ASCII) characters. The remaining characters (with values from 128 through 255) are non-ASCII characters and can be used only in string constants and data with I/O statements.

The following table shows the first half of the Digital Multinational Character Set, which is the ASCII character set. The first half of each of the numbered columns identifies the character as you would enter it on a VT200 or VT100 series terminal or as you would see it on a printer (except for the nonprintable characters). The remaining half of each column identifies the character by the binary value of the byte; the value is stated in three radixes-octal, decimal, and hexadecimal. For example, the uppercase letter A has, under ASCII conventions, a storage value of hexadecimal 41 (a bit configuration of 01000001), equivalent to 101 in octal notation and 65 in decimal notation.


The following table shows the second half of the Digital Multinational Character Set (the non-ASCII characters, with decimal values 128 through 255). The first half of each of the numbered columns identifies the character as you would see it on a VT200 series terminal or printer; these characters cannot be output on a VT100 series terminal.



Appendix C
Compatibility with PL/I Standards

This appendix describes the relationship between Kednos PL/I for OpenVMS VAX and and Kednos PL/I for OpenVMS Alpha to each other and to the various PL/I language standards that are currently in force.

Kednos PL/I for OpenVMS VAX and Kednos PL/I for OpenVMS Alpha are strict supersets of the ANSI X3.74-1981 PL/I General Purpose Subset. Both contain many features from larger or more recent PL/I standards and implementations. Most of the features implemented in Kednos PL/I for OpenVMS VAX and Kednos PL/I for OpenVMS Alpha that go beyond the language defined by ANSI X3.74-1981 are contained in either the ANSI X3.53-1976 (full) PL/I language standard or the new ANSI X3.74-198x PL/I General Purpose Subset.

C.1 Differences and Similarities Between Kednos PL/I for OpenVMS VAX and Kednos PL/I for OpenVMS Alpha

C.2 Relation to the 1981 PL/I General-Purpose Subset

The 1981 PL/I General-Purpose Subset (ANSI X3.74-1981) was designed to be useful in scientific, commercial, and systems programming, especially on small and medium-size computer systems. Among the primary goals of the design of the subset were the following:

The essential elements of the subset are described below. These descriptions are extracted from the ANSI X3.74-1981 standard.

C.2.1 Program Structure

The General-Purpose Subset includes a complete character set, with comments, identifiers, decimal arithmetic constants, and simple string constants.

Begin blocks and DO-groups are included in the subset. Each block or group in the program must be terminated with an END statement.

C.2.2 Program Control

The following program control statements are included in the subset: CALL, RETURN, IF, DO, GOTO, null, STOP, ON, REVERT, and SIGNAL.

The DO statement options supported are TO, BY, WHILE, and REPEAT.

An IF statement can contain unlabeled THEN and ELSE clauses.

An ON statement can specify a single condition. The condition names supported are ERROR, ENDFILE, ENDPAGE, FIXEDOVERFLOW, KEY, OVERFLOW, UNDEFINEDFILE, UNDERFLOW, and ZERODIVIDE.

C.2.3 Storage Control

The subset includes the assignment statement and the assignment of array and structure variables whose dimensions and data types match. The subset also permits aggregate promotion, that is, the assignment of a scalar expression to every element or member of an aggregate variable.

In the subset, only static variables can be initialized.

The ALLOCATE statement with the SET option and the FREE statement are included in the subset.

C.2.4 Input/Output

The I/O statements are:

The file attributes, specified in DECLARE or OPEN, are DIRECT, ENVIRONMENT, INPUT, KEYED, OUTPUT, PRINT, RECORD, SEQUENTIAL, STREAM, and UPDATE.

The FORMAT statement is included. The format items are E, F, P, A, B, X, R, PAGE, SKIP, COLUMN, TAB, and LINE.

C.2.5 Attributes and Pictures

The DECLARE statement is included in the subset. All names must be declared, either by means of a DECLARE statement or by means of a label prefix.

The attributes supported are as follows: ALIGNED, AUTOMATIC, BASED, BINARY, BIT, BUILTIN, CHARACTER, DECIMAL, DEFINED, DIRECT, ENTRY, ENVIRONMENT, EXTERNAL, FILE, FIXED, FLOAT, INITIAL, INPUT, INTERNAL, KEYED, LABEL, OPTIONS, OUTPUT, PICTURE, POINTER, PRINT, RECORD, RETURNS, SEQUENTIAL, STATIC, STREAM, UPDATE, VARIABLE, and VARYING.

The picture characters included are CR, DB, S, V, Z, 9, -, +, $, and *. The picture insertion characters (. , / B) are also included.

C.2.6 Built-In Functions and Pseudovariables

The built-in functions in the subset are as follows: ABS, ACOS, ADDR, ASIN, ATAN, ATAND, ATANH, BINARY, BIT, BOOL, CEIL, CHARACTER, COLLATE, COPY, COS, COSD, COSH, DATE, DECIMAL, DIMENSION, DIVIDE, EXP, FIXED, FLOAT, FLOOR, HBOUND, INDEX, LBOUND, LENGTH, LINENO, LOG, LOG2, LOG10, MAX, MIN, MOD, NULL, ONCODE, ONFILE, ONKEY, PAGENO, ROUND, SIGN, SIN, SIND, SINH, SQRT, STRING, SUBSTR, TAN, TAND, TANH, TIME, TRANSLATE, TRUNC, UNSPEC, VALID, and VERIFY.

The pseudovariables are PAGENO, STRING, SUBSTR, and UNSPEC.

C.2.7 Expressions

The subset supports all infix and prefix operators, the locator qualifier, parenthesized expressions, subscripts, and function references. Implicit conversion from one data type to another is restricted to those contexts in which the conversion is likely to produce the desired results.

C.3 198x PL/I General-Purpose Subset Features Supported

The 198x PL/I General-Purpose Subset (ANSI X3.74-198x) was designed to extend the previous subset standard on the basis of experience with subset implementations and the desire for more capabilities in subset-conforming implementations.

The following sections describe features in this standard that have been implemented to date in Kednos PL/I for OpenVMS VAX and Kednos PL/I for OpenVMS Alpha.

C.3.1 Lexical Constructs

The character pair /* is permitted within comments.

Both uppercase and lowercase characters are permitted in source programs.

No space is required after the P for picture constants.

C.3.2 Program Control

RETURNS(CHAR(*)) is supported.

The statements following THEN and ELSE can be labeled.

The NONRECURSIVE procedure option is supported.

The SELECT statement is supported.

The LEAVE statement is supported.

The UNTIL clause for DO groups and clauses is supported.

C.3.3 Storage Control

The IN option can be used for the ALLOCATE and FREE statements, and language controlled allocation in areas is supported.

The SET option is optional for ALLOCATE if the based variable being allocated was declared with a base pointer.

The ALLOCATE and FREE statements can specify a comma list of items.

String assignment can have the source and target overlapped.

C.3.4 Input/Output

Expressions can be used in GET and PUT FORMAT lists.

You can use, as the source or target of a file I/O statement, a function reference that performs I/O on the same file and then returns to the original statement.

The OPEN and CLOSE statements can contain a list of file specifications.

The FROM option of the REWRITE statement can be omitted.

C.3.5 Attributes and Pictures

The INITIAL attribute is allowed with AUTOMATIC storage. The initial items can contain asterisks to denote uninitialized values. The initial values can be expressions. The NULL built-in function can be used in both STATIC and AUTOMATIC INITIAL attributes. The initial iteration factor can be an asterisk.

Restricted expressions can be used for static extents, parameter extents, and returns descriptor extents.

The AREA and OFFSET data types are supported.

The REFER attribute can be used at the end of a structure.

The DIMENSION, PARAMETER, and NONVARYING keywords can be specified.

The UNALIGNED attribute can be specified, but only for BIT and CHARACTER variables.

SYSIN and SYSPRINT can be contextually declared as files.

The CONDITION attribute is supported.

The UNION attribute is supported.

C.3.6 Program Control

The AREA, CONDITION, CONVERSION, FINISH, and STORAGE conditions are supported.

Multiple conditions can be specified for ON and REVERT.

The SNAP and SYSTEM options of the ON statement are supported.

C.3.7 Built-In Functions and Pseudovariables

The following built-in functions are supported: ADD, EMPTY, EVERY, HIGH, LOW, MULTIPLY, OFFSET, ONSOURCE, POINTER, PROD, REVERSE, SOME, SUBTRACT, and SUM.

The ONSOURCE pseudovariable is supported.

The DIMENSION, HBOUND, and LBOUND built-in functions have a default of one for the second parameter if it is not specified.

The INDEX and VERIFY built-in functions have an optional starting position parameter.

The UNSPEC built-in function and pseudovariable can be used on aggregates.

C.3.8 Expressions

The operators AND THEN (short-circuiting AND, specified as &:) and OR ELSE (short-circuiting OR, specified as |:) are supported.

EXCLUSIVE OR (infix or dyadic ^) is supported.

C.4 Full PL/I Features Supported

The items discussed in this section are features that are explicitly excluded from both the old subset standard (ANSI X3.74-1981) and the new subset standard (ANSI X3.74-198x) but that have been implemented in Kednos PL/I. These features all exist in full PL/I.

C.4.1 Program Structure

The STRINGRANGE and SUBSCRIPTRANGE conditions are supported.

Replication factors for string constants are supported.

A comma list can be specified on the left-hand side of an assignment statement.

C.4.2 Program Control

The ENTRY statement is supported.

C.4.3 Storage Control

CONTROLLED storage is supported.

C.4.4 Attributes and Pictures

The CONTROLLED, LIKE, MEMBER, POSITION, PRECISION, REFER, and STRUCTURE attributes are supported. (The REFER attribute is restricted to BASED and CONTROLLED variables.)

The picture characters Y, T, I, and R are supported, and pictures can include iteration factors.

Scaled fixed binary numbers are supported. They can have a scale factor within the range -31 through 31 on OpenVMS VAX systems or the range -63 through 63 on OpenVMS Alpha systems.

C.4.5 Built-In Functions and Pseudovariables

The OFFSET and POINTER built-in functions are not restricted to ADDR.

The ALLOCATION and ONCHAR built-in functions are supported.

The ONCHAR pseudovariable is supported.

C.4.6 Expressions

The expression in a WHILE or UNTIL clause or in an IF statement can be a bit string of any length. When evaluated, the expression results in a true value if any bit of the string expression is a 1 and in a false value if all bits in the string expression are 0s.

The control variable and the expressions in the TO, BY, and REPEAT options of the DO statement are not restricted to integers and pointers.

C.5 Nonstandard Features from Other Implementations

The features discussed in this section are not described in any ANSI PL/I standard. They are, however, provided by some other implementations.

C.5.1 Preprocessor

Both Kednos PL/I for OpenVMS VAX and Kednos PL/I for OpenVMS Alpha support an embedded lexical preprocessor for compilation control. The following preprocessor statements are included: %ACTIVATE, %DEACTIVATE, %DECLARE, %DICTIONARY %DO, %END, %ERROR, %FATAL, %GOTO, %INFORM, %IF, %LIST, %NOLIST, %PAGE, %PROCEDURE, %REPLACE, %RETURN, %SBTTL, %TITLE, and %WARN.

An %IF statement can contain unlabeled %THEN and %ELSE clauses.

The following preprocessor built-in functions are included: ABS, BYTE, COPY, DATE, DATETIME, DECODE, ENCODE, ERROR, INDEX, INFORM, LENGTH, LINE, LTRIM, MAX, MIN, MOD, RANK, REVERSE, RTRIM (Kednos PL/I for OpenVMS VAX only), SEARCH, SIGN, SUBSTR, TIME, TRANSLATE, TRIM, VARIANT, VERIFY, and WARN.

C.5.2 Built-In Functions

The following nonstandard built-in functions are included: ACTUALCOUNT, ADDREL, BYTE, BYTESIZE, DATETIME, DECODE, DESCRIPTOR, ENCODE, INT, LTRIM, MAXLENGTH, ONARGLIST, POSINT, PRESENT, RANK, REFERENCE, RTRIM, SEARCH, SIZE, TRIM, and VALUE.

C.5.3 LIKE Extension

Both Kednos PL/I for OpenVMS VAX and Kednos PL/I for OpenVMS Alpha allow you to use the LIKE attribute on a structure already containing LIKE.

C.5.4 Declarations

Variables can be declared outside procedures.

C.6 PL/I-Specific Extensions for OpenVMS VAX and OpenVMS Alpha Platforms

The extensions in the following sections are enhancements for PL/I programs executing on the OpenVMS VAX and OpenVMS Alpha platforms. These extensions are provided for procedure calling, condition handling, support of OpenVMS Record Management Services (RMS), compilation control, and miscellaneous purposes.

C.6.1 Procedure-Calling and Condition-Handling Extensions

The following extensions to PL/I were made to allow procedures to call procedures written in any other programming language that also supports the OpenVMS calling standard.

The following attributes provide storage classes for PL/I variables. These attributes permit PL/I programs to take advantage of features of the OpenVMS Linker and to combine PL/I procedures with other procedures that use these storage classes.

The following extensions to condition handling provide support for condition handling in the OpenVMS environment:

C.6.2 Support of OpenVMS Record Management Services

The options of the ENVIRONMENT attribute provide support for many of the features and control values of the OpenVMS Record Management Services (RMS). Additional extensions have been made to the PL/I language to augment this support, as follows:

C.6.3 Miscellaneous Extensions

PL/I supports the OpenVMS Common Data Dictionary (CDD). Data definitions are included in source programs with the %DICTIONARY statement.

The following built-in functions are supported for BYTE, DECODE, ENCODE, INT, POSINT, RANK, and SIZE.

C.7 Implementation-Defined Values and Features

The following values and features are implementation-defined:


Previous Next Contents Index