Previous | Contents | Index |
Table B-1 lists the PL/I ENVIRONMENT options and gives the OpenVMS Record Management Services (RMS) macro, field, or bit setting, as appropriate, that corresponds to each.
For detailed descriptions of the RMS fields, see the OpenVMS Record Management Services Reference Manual.
Option | RMS Macro Field |
---|---|
APPEND |
$RAB ROP=EOF
$FAB FOP=CIF,- ^MXV,^NEF,^SUP |
BATCH | $FAB FOP=SCF |
BLOCK_BOUNDARY_FORMAT | $FAB RAT=BLK |
BLOCK_IO | $FAB FAC=BIO |
BLOCK_SIZE | $FAB BLS |
BUCKET_SIZE | $FAB BKS |
CARRIAGE_RETURN_FORMAT | $FAB RAT=CR |
CONTIGUOUS | $FAB FOP=CTG |
CONTIGUOUS_BEST_TRY | $FAB FOP=CBT |
CREATION_DATE | $XABDAT CDT |
CURRENT_POSITION | $FAB FOP=POS |
DEFAULT_FILE_NAME | $FAB DNM |
DEFERRED_WRITE | $FAB FOP=DFW |
DELETE | $FAB FOP=DLT |
EXPIRATION_DATE | $XABDAT EDT |
EXTENSION_SIZE | $FAB DEQ |
FILE_ID | n/a |
FILE_ID_TO | n/a |
FILE_SIZE | $FAB ALQ |
FIXED_CONTROL_SIZE | $FAB FSZ |
FIXED_CONTROL_SIZE_TO | $FAB RFM=VFC |
FIXED_LENGTH_RECORDS | $FAB RFM=FIX |
GROUP_PROTECTION | $XABPRO |
IGNORE_LINE_MARKS | n/a |
INDEX_NUMBER | $RAB KRF |
INDEXED | $FAB ORG=IDX |
INITIAL_FILL | $RAB ROP=LOA |
MAXIMUM_RECORD_NUMBER | $FAB MRN |
MAXIMUM_RECORD_SIZE | $FAB MRS |
MULTIBLOCK_COUNT | $RAB MBC |
MULTIBUFFER_COUNT | $RAB MBF |
NO_SHARE | $FAB SHR=NIL |
OWNER_GROUP | $XABPRO UIC |
OWNER_MEMBER | $XABPRO UIC |
OWNER_PROTECTION | $XABPRO PRO |
PRINTER_FORMAT | $FAB RAT=PRN |
READ_AHEAD | $RAB ROP=RAH |
READ_CHECK | $FAB FOP=RCK |
RECORD_ID_ACCESS | $RAB FAC=RFA |
RETRIEVAL_POINTERS | $FAB RTV |
REWIND_ON_CLOSE | $FAB FOP=RWC |
REWIND_ON_OPEN | $FAB FOP=RWO |
SCALARVARYING | n/a |
SHARED_READ | $FAB SHR=GET |
SHARED_WRITE |
$FAB SHR=PUT,-
GET,UPD,DEL |
SPOOL | $FAB FOP=SPL |
SUPERSEDE |
$FAB FOP=SUP,-
NEF,^MXV,^CIF $RAB ROP=^EOF |
SYSTEM_PROTECTION | $XABPRO PRO |
TEMPORARY | $FAB FOP=TMP |
TRUNCATE | $FAB FOP=TEF |
WORLD_PROTECTION | $XABPRO PRO |
WRITE_BEHIND | $RAB ROP=WBH |
WRITE_CHECK | $FAB FOP=WCK |
This appendix provides an overview of optional programming productivity
tools. As these tools are not included with the PL/I software,
they must be purchased separately. Using these tools can increase your
productivity as a PL/I programmer. For information on how to purchase
these tools, contact your Hewlett Packard sales representative.
C.1 Using LSE with PL/I
The DEC Language-Sensitive Editor (LSE) is a powerful and flexible text editor designed for software development. LSE's features help you to produce syntactically correct code in PL/I.
To invoke LSE, specify the LSEDIT command followed by a file name with a PLI file type at the DCL prompt. For example:
$ LSEDIT USER.PLI |
The following sections describe some of the key features of LSE. Section C.1.1 discusses how to enter source code using LSE, and Section C.1.2 describes LSE's compiler interface features. Section C.1.3 gives examples of how to generate PL/I source code with LSE. Section C.2 describes the Source Code Analyzer, which you can use only with Kednos PL/I for OpenVMS VAX.
For more information on LSE and the Source Code Analyzer (SCA), see the
Guide to Language-Sensitive Editor for VMS Systems and the Guide to Source Code Analyzer for VMS Systems.
C.1.1 Entering Source Code Using Tokens and Placeholders
LSE's language-sensitive features simplify the tasks of developing and maintaining software systems. These features include language-specific placeholders and tokens, aliases, comment and indentation control, and templates for subroutine libraries. The following sections describe these features in detail.
LSE can be used as a traditional text editor. In addition, you can have the power of using LSE's tokens and placeholders to step through each program construct and supply text for those constructs needing it.
Placeholders are markers in the source code that indicate locations where you can provide program text. These placeholders help you to supply the appropriate syntax in a given context. Generally, you do not need to enter placeholders; rather, they are inserted for you by LSE. Placeholders are surrounded by brackets or braces.
The types of LSE placeholders are as follows:
Type | Description |
---|---|
Terminal placeholders | Provide text strings that describe valid replacements for the placeholder |
Nonterminal placeholders | Expand into additional language constructs |
Menu placeholders | Provide a list of options corresponding to the placeholder |
Placeholders are either optional or required. Required placeholders, indicated by braces, represent places in the source code where you must provide program text. Optional placeholders, indicated by brackets, represent places in the source code where you can either provide additional constructs or erase the placeholder.
You can move forward or backward from placeholder to placeholder. In addition, you can delete or expand placeholders as needed.
Tokens typically represent keywords in PL/I. Tokens are provided for all PL/I statements, built-in functions, and built-in subroutines. When expanded, tokens provide additional language constructs. You can enter tokens directly into the buffer.
Generally, you use tokens in situations, such as modifying an existing program, where you want to add additional language constructs and there are no placeholders. For example, typing IF and issuing the EXPAND command causes a template for an IF construct to appear on your screen.
You can use tokens to insert text when editing an existing file by typing the name for a function or keyword and issuing the EXPAND command. You can also use tokens to bypass long menus in situations where expanding a placeholder, such as [statement], would result in a lengthy menu.
LSE provides commands that allow you to manipulate tokens and placeholders. These commands and their default key bindings are as follows:
Command | Key Binding | Function |
---|---|---|
EXPAND | Ctrl/e | Expands a placeholder |
UNEXPAND | PF1-Ctrl/e | Reverses the effect of the most recent placeholder expansion |
GOTO PLACEHOLDER/FORWARD | Ctrl/n | Moves the cursor forward to the next placeholder |
GOTO PLACEHOLDER/REVERSE | Ctrl/p | Moves the cursor backward to the previous placeholder |
ERASE PLACEHOLDER/FORWARD | Ctrl/k | Erases a placeholder |
UNERASE PLACEHOLDER | PF1-Ctrl/k | Restores the most recently erased placeholder |
None | Down arrow | Moves the indicator through a screen menu toward the bottom |
None | Up arrow | Moves the indicator through a screen menu toward the top |
None |
ENTER
RETURN |
Selects a menu option |
To display a list of all the defined tokens provided by PL/I, enter the SHOW TOKEN command as follows:
LSE> SHOW TOKEN |
LSE> SHOW PLACEHOLDER |
LSE> GOTO BUFFER $SHOW LSE> WRITE filename |
To obtain information about a particular token or placeholder, you can
also specify a token name or placeholder name after the SHOW TOKEN or
SHOW PLACEHOLDER command.
C.1.2 Compiling Source Code
To compile your code and to review compilation errors without leaving the editing session, you can use the LSE commands COMPILE and REVIEW. The COMPILE command issues a DCL command in a subprocess to invoke the PL/I compiler. The compiler then generates a file of compile-time diagnostic information that LSE can use to review compilation errors. The diagnostic information is generated with the /DIAGNOSTICS qualifier that LSE appends onto the compilation command.
For example, if you issue the COMPILE command while in the buffer USER.PLI, the resulting DCL command is as follows:
$ PLI USER.PLI/DIAGNOSTICS=USER.DIA |
LSE> COMPILE $/ANALYSIS_DATA |
The REVIEW command displays any diagnostic messages that result from a compilation. LSE displays the compilation errors in one window and the corresponding source code in a second window. This multiwindow capability allows you to review your errors while examining the associated source code. This capability eliminates tedious steps in the error correction process, and helps ensure that all the errors are fixed before you compile your program again.
LSE provides several commands to help you review errors and examine your source code. The following table lists these commands and their default key bindings where applicable.
Command | Key Binding | Function |
---|---|---|
COMPILE | None | Compiles the contents of the source buffer |
COMPILE/REVIEW | None | Compiles the contents of the source buffer, puts LSE into REVIEW mode, and displays any errors resulting from the compilation |
REVIEW | None | Performs the same function as the /REVIEW qualifier on the COMPILE command: puts LSE into REVIEW mode, and displays any errors resulting from the last compilation |
END REVIEW | None | Removes the buffer $REVIEW from the screen; returns the cursor to a single window containing the source buffer |
GOTO SOURCE | Ctrl/g | Moves the cursor to the source buffer that contains the error |
NEXT STEP | Ctrl/f | Moves the cursor to the next error in the buffer $REVIEW |
PREVIOUS STEP | Ctrl/b | Moves the cursor to the previous error in the buffer$REVIEW |
None |
Down arrow
Up arrow |
Moves the cursor within a buffer |
This section describes the special features of PL/I available through LSE and provides examples of PL/I code written with LSE.
The following examples show expansions of the more frequently used PL/I tokens and placeholders. The examples are expanded to show the formats and guidelines LSE provides; however, not all of the examples are fully expanded.
The examples show expansions of the following PL/I features:
Instructions and explanations precede each example, and an arrow (->) indicates the line in the code where an action has occurred.
To reproduce the examples, invoke LSE and the PL/I language by using the following syntax:
LSEDIT [/qualifier...] filename.PLI |
See Section C.1.1 for the commands that manipulate tokens and placeholders.
When you use LSE to create a new PL/I program, the initial string appears at the top of the screen as follows:
[program] |
/* [module_header_comments] **/ [preprocessor_statement]... [declare_statement]... {procedure}... |
Erase the first five lines of this expansion and expand the placeholder {procedure}.
/* [procedure_header_comments] **/ -> {entry_name}: procedure [parameters] [options] [returns] [recursive]; [declare_statement]... [statement]... end {entry_name}; [procedure]... |
Erase the first three lines. Enter test over the placeholder {entry_name}. (Once the cursor is moved from that text, LSE automatically fills in the next occurrence of {entry_name}.) Erase the placeholder [parameters].
-> test: procedure [options] [returns] [recursive]; [declare_statement]... [statement]... end test; [procedure]... |
Expand the placeholder [options].
-> test: procedure options({option}...) [returns] [recursive]; [declare_statement]... [statement]... end test; [procedure]... |
Expand the list placeholder {option} to produce a menu and select the option MAIN.
-> test: procedure options(main, [option]...) [returns] [recursive]; [declare_statement]... [statement]... end test; [procedure]... |
Erase the duplicated placeholder [option], and the placeholders [returns], [recursive], and [declare_statement].
test: procedure options(main); [statement]... end test; [procedure]... |
Each of the following examples starts from this expansion.
C.1.4 DO Statement
Begin at the following expansion developed in Section C.1.3.
test: procedure options(main); [statement]... end test; [procedure]... |
Expand the list placeholder [statement] to display a menu and select the option DO.
test: procedure options(main); -> do [do_specification]; [statement]... end; [statement]... end test; [procedure]... |
Expand the placeholder [do_specification] to display a menu and select the option while ({boolean_expression}).
test: procedure options(main); -> do while({boolean_expression}); [statement]... end; [statement]... end test; [procedure]... |
Enter '1'b over the placeholder {boolean_expression}.
test: procedure options(main); -> do while('1'b); [statement]... end; [statement]... end test; [procedure]... |
Begin at the following expansion developed in Section C.1.3.
test: procedure options(main); [statement]... end test; [procedure]... |
Expand the list placeholder [statement] to display a menu and select the option IF.
test: procedure options(main); -> if {boolean_expression} then [if_action] [else_clause] [statement]... end test; [procedure]... |
Enter not_control over the placeholder {boolean_expression}.
test: procedure options(main); -> if not_control then [if_action] [else_clause] [statement]... end test; [procedure]... |
Enter string='missile'; over the placeholder [if_action].
test: procedure options(main); if not_control then -> string='missile'; [else_clause] [statement]... end test; [procedure]... |
Expand the placeholder [else_clause].
test: procedure options(main); if not_control then string='missile'; -> else {if_action} [statement]... end test; [procedure]... |
Enter string='control'; over the placeholder {if_action}.
test: procedure options(main); if not_control then string='missile'; else -> string='control'; [statement]... end test; [procedure]... |
Previous | Next | Contents | Index |