Tandem ENFORM 058057, ENFORM Reference Manual

Data Management Library
ENFORM Reference Manual
Abstract This manual provides detailed information about the syntax of the ENFORM language.
Part Number 058057
Tandem Computers Incorporated
First Edition 82348 A00 GUARDIAN A04/E05 October 1982 Second Edition 82348 B00 GUARDIAN A05/E06 April 1983 Update 1 82194 GUARDIAN A06/E07 December 1983 Update 2 82205 GUARDIAN B00/E08 March 1985 Third Edition 058057 GUARDIAN B00/E08 July 1991
The second edition of this manual, including updates 1 and 2, was reformatted in July 1991; no changes were made to the manual’s content at that time. The reformatted manual became the third edition.
Copyright All rights reserved. No part of this document may be reproduced in any form, including photocopying or
translation to another language, without the prior written consent of Tandem Computers Incorporated. Copyright 1991 Tandem Computers Incorporated.
Document History Edition Part Number Operating System Version Date
First Edition 82348 A00 GUARDIAN A04/E05 October 1982 Second Edition 82348 B00 GUARDIAN A05/E06 April 1983 Update 1 82194 GUARDIAN A06/E07 December 1983 Update 2 82205 GUARDIAN B00/E08 March 1985 Third Edition 058057 GUARDIAN B00/E08 July 1991
The second edition of this manual, including updates 1 and 2, was reformatted in July 1991; no changes were made to the manual’s content at that time. The reformatted manual became the third edition.
Ordering Information For manual ordering information: domestic U.S. customers, call 1-800-243-6886; international customers, contact your
local sales representative.
Document Disclaimer Information contained in a manual is subject to change without notice. Please check with your authorized Tandem
representative to make sure you have the most recent information.
Export Statement Export of the information contained in this manual may require authorization from the U.S. Department of Commerce.
Examples Examples and sample programs are for illustration only and may not be suited for your particular purpose. Tandem does
not warrant, guarantee, or make any representations regarding the use or the results of the use of any examples or sample programs in any documentation. You should verify the applicability of any example or sample program before placing the software into productive use.
U.S. Government
Customers
FOR U.S. GOVERNMENT CUSTOMERS REGARDING THIS DOCUMENTATION AND THE ASSOCIATED SOFTWARE: These notices shall be marked on any reproduction of this data, in whole or in part. NOTICE: Notwithstanding any other lease or license that may pertain to, or accompany the delivery of, this computer
software, the rights of the Government regarding its use, reproduction and disclosure are as set forth in Section 52.227-19 of the FARS Computer Software-Restricted Rights clause.
RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the Government is subject to the restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 52.227-7013.
RESTRICTED RIGHTS LEGEND: Use, duplication or disclosure by the Government is subject to restrictions as set forth in paragraph (b)(3)(B) of the rights in Technical Data and Computer Software clause in DAR 7-104.9(a). This computer software is submitted with “restricted rights.” Use, duplication or disclosure is subject to the restrictions as set forth in NASA FAR SUP 18-52 227-79 (April 1985) “Commercial Computer Software — Restricted Rights (April 1985).” If the contract contains the Clause at 18-52 227-74 “Rights in Data General” then the “Alternate III” clause applies.
U.S. Government Users Restricted Rights — Use, duplication or disclosure restricted by GSA ADP Schedule Contract. Unpublished — All rights reserved under the Copyright Laws of the United States.
New and Changed Information
This update to the ENFORM Reference Manual describes the following principal changes:
The @ CENTER-PAGE Option Variable clause now centers the entire report body on the page. The CENTER clause centers items on the page independently of @ CENTER-PAGE.
ENFORM now issues error message 123 when the file type given in the DDL record description does not match the physical file type read by the query processor.
The following areas have been clarified, and examples have been added:
Reserved words Subscript ranges Qualification aggregates and target records BEGINS WITH and CONTAINS Aggregates and scale Display format and scale Default display format Default time display format Conversion of a WHERE clause to conjunctive normal form Examples of summary reports (with LIST statement)
Other minor technical and editorial changes have been made.
All changes from the last edition are marked with a revision bar in the margin. Each page containing a change carries the message “March 1985” at the bottom of the page.
It is assumed that the user has already integrated the December, 1983 update package into the manual.
058057 Tandem Computers Incorporated iii
New and Changed Information
(This page left intentionally blank)
iv 058057 Tandem Computers Incorporated
New and Changed Information
058057 Tandem Computers Incorporated v
Contents
Preface xv Notation Conventions xvii
Section 1 Introduction
ENFORM Terminology 1-1
Section 2 Running ENFORM
Interactive Mode 2-2 Noninteractive Mode 2-2 The Current Output Listing File 2-3 Pressing the Terminal BREAK Key 2-3 Logical File Assignments 2-5 Passing Parameters to Compiled Query Files 2-6 A Server Query Processor 2-6
The Command Interpreter ASSIGN Command 2-8 The Command Interpreter PARAM Command 2-8 The Command Interpreter QP Command 2-9 Example of Server Query Processor Creation 2-9
Generic Files 2-10
Generic Files and a Dedicated Query Processor 2-12 Generic Files and a Server Query Processor 2-13 Generic Files and the Current Output Listing File 2-13
Section 3 ENFORM Language Elements
Reserved Words 3-3 Special Characters 3-4 Comments 3-4 Statements 3-5 Clauses 3-5 Commands 3-5 Rules for Naming User-Defined Elements 3-6 Rules for Referencing Data Base Elements 3-6
Record Name References 3-6 Field Name References 3-6 Primary Key References 3-7
058057 Tandem Computers Incorporated v
Contents
Subscripts 3-9 Aggregates 3-12
Predefined Aggregates 3-14 User Aggregates 3-15 Target Aggregates 3-16
Target Aggregate with OVER ALL Syntax 3-16 Target Aggregate with OVER Syntax 3-17
Qualification Aggregates 3-18
Qualification Aggregate with OVER ALL Syntax 3-18 Qualification Aggregate with OVER Syntax 3-18 Qualification Aggregates and Target Records 3-19 Qualification Aggregate with Embedded WHERE Clause 3-21
Aggregates and Scale 3-21
Literals 3-22
Numeric Literals 3-22 String Literals 3-22
Arithmetic Expressions 3-23
Evaluation Order of Arithmetic Expressions 3-23 Scale Factor of the Result 3-24
Logical Expressions 3-24
Effect of Parentheses on Compound Logical Expressions 3-26 BEGINS WITH and CONTAINS 3-27 Range of Values in Logical Expressions 3-27
Pattern-Match in Logical Expressions 3-28 IF/THEN/ELSE Expressions 3-28 Parameters 3-29 User Variables 3-29
User Variable as a Target-item 3-30
A User Variable in Request-Qualification 3-32
User Tables 3-32 Arithmetic Overflow Conditions 3-32
vi 058057 Tandem Computers Incorporated
Section 4 Statements
AT END Statement 4-3
Specifying a Field Name in an AT END Statement 4-3
Spacing Considerations 4-3
AT END Information for Current Report or All Reports 4-4
Cancelling Session-Wide AT END Information 4-4 AT START Statement 4-5
Specifying a Field Name in an AT START Statement 4-5
Spacing Considerations 4-5
AT START Information for Current Report or All Reports 4-6
Cancelling Session-Wide AT START Information 4-6 CLOSE Statement 4-7
The Effect of a CLOSE Statement on the Internal Table 4-7
Contents
DECLARE Statement 4-8
Declaring a User Aggregate 4-9
Declaring a User Variable or User Table 4-10 DELINK Statement 4-11 DICTIONARY Statement 4-12
Identifying the Location of the Dictionary 4-12
Clearing the Internal Table 4-13 EXIT Statement 4-14 FIND Statement 4-15
Output Record Dictionary Description 4-16
Group Definition and Sorting 4-17
Output Fields 4-17
Input Elements 4-19
Request-Qualification 4-20
Summary Records 4-20
Statements and Clauses that Do Not Apply to the FIND Statement 4-22 FOOTING Statement 4-23
Specifying a Field Name within a FOOTING Statement 4-23
Spacing Considerations 4-23
Footing for Current Report or All Reports 4-24
Cancelling Session-Wide Footing 4-24 LINK Statement 4-25
Duration of Link Established by LINK or LINK OPTIONAL
Statement 4-26
LINK Statement Considerations 4-26
058057 Tandem Computers Incorporated vii
Contents
LINK OPTIONAL Statement Considerations 4-27
Rules for Using LINK OPTIONAL Statements 4-27 How ENFORM Handles “Non-Contributing” Record
Descriptions 4-28
LIST Statement 4-31
Input Record Description 4-33
Group Definition and Sorting 4-33
How Values Are Displayed in Report Columns 4-33
Request-Qualification 4-35
Conditional Printing 4-35
Summary Reports 4-35
Optional Clauses 4-37 OPEN Statement 4-39
Using OPEN AS A COPY OF 4-39 PARAM Statement 4-40
How ENFORM Treats Parameters 4-41 SET Statement 4-42
Initializing User-Defined Elements 4-43
Redefining Option Variables 4-43 SUBFOOTING Statement 4-44
Specifying Field Names within a SUBFOOTING Statement 4-44
Spacing Considerations 4-44
Subfooting for Current Report or All Reports 4-45
Cancelling Session-Wide Subfooting 4-45 SUBTITLE Statement 4-46
Specifying a Field Name within a SUBTITLE Statement 4-46
Spacing Considerations 4-46
Subtitle for Current Report or All Reports 4-47
Cancelling Session-Wide Subtitle 4-47 TITLE Statement 4-48
Specifying a Field Name within a TITLE Statement 4-48
Spacing Considerations 4-48
Title for Current Report or All Reports 4-49
Cancelling Session-Wide Title 4-49
viii 058057 Tandem Computers Incorporated
Section 5 Clauses
AFTER CHANGE Clause 5-4
Specifying a Field Name within an AFTER CHANGE Clause 5-4
Spacing Considerations 5-4 ASCD and DESC Clauses 5-6 AS Clause 5-7
Repeatable Edit Descriptors 5-9
Nonrepeatable Edit Descriptors 5-14
Modifiers 5-15
Decorations 5-19
Contents
Alphanumeric Edit Descriptor 5-10 Integer Edit Descriptor 5-10 Fixed Format Edit Descriptor 5-11 Mask Edit Descriptor 5-12
Scale Factor Edit Descriptor 5-14 Optional Plus Edit Descriptor 5-15
Field Blanking Modifiers 5-16 Fill Character Modifier 5-16 Overflow Character Modifier 5-17 Justification Modifiers 5-17 Symbol Substitution Modifier 5-18
Conditions 5-20 Location 5-20 Processing Order 5-20 Default Decorations 5-21
AS DATE Clause 5-23
Default Display Format 5-23
Examples of Date Display Formats 5-24 AS TIME Clause 5-25
Default Display Format 5-25
Examples of Time Display Formats 5-26 AT END PRINT Clause 5-27
Specifying a Field Name within an AT END PRINT Clause 5-27
Spacing Considerations 5-27
AT END Information for Current Report or All Reports 5-28
Overriding Session-Wide AT END Information 5-28
058057 Tandem Computers Incorporated ix
Contents
AT START PRINT Clause 5-29
Specifying a Field Name in an AT START PRINT Clause 5-29
Spacing Considerations 5-29
AT START Information for Current Report or All Reports 5-30
Overriding Session-Wide AT START Information 5-30 BEFORE CHANGE Clause 5-31
Specifying a Field Name within a BEFORE CHANGE Clause 5-31
Spacing Considerations 5-32 BY and BY DESC Clauses 5-33 CENTER Clause 5-34
Centering Single Report Items 5-34
Centering All Report Items 5-34
Centering a Print List 5-34 CUM Clause 5-35
CUM with OVER ALL 5-35
CUM with OVER 5-35
CUM Clause Used with User Variable 5-36
Restrictions 5-36 FOOTING Clause 5-37
Specifying a Field Name within a FOOTING Clause 5-37
Spacing Considerations 5-37
Footing for Current Report or All Reports 5-38 FORM Clause 5-39
FORM Clause with a By-item 5-39
FORM Clause with a Target-item 5-39
FORM Clause within a Print List 5-39 HEADING Clause 5-40
Default Headings 5-40
Multiple Line Headings 5-40
Printing / in a Column Heading 5-41
Heading for Subscripted Elements 5-41 INTERNAL Clause 5-43 JULIAN-DATE Conversion Clause 5-44
Conversion to Internal Format 5-44
Display Format 5-45 NOHEAD Clause 5-46
No Headings for Single Report Items 5-46
No Headings for All Report Items 5-46
x 058057 Tandem Computers Incorporated
NOPRINT Clause 5-47
Suppress Single Report Items 5-47
Suppress All Report Items 5-47 Option Variable Clauses 5-48 PCT Clause 5-55
Using PCT OVER ALL 5-55
Using PCT OVER By-item 5-55
Combining Percentages and Subtotals 5-56
PCT Clause Used with User Variable 5-56
Restrictions 5-56 SKIP Clause 5-57
SKIP Clause with a LIST Target-item or By-item 5-57
SKIP Clause with a Print List 5-57
Contents
SPACE Clause 5-58
SPACE Clause with a LIST Target-item or By-item 5-58
SPACE Clause with a Print List 5-58 SUBFOOTING Clause 5-59
Specifying Field Names in a SUBFOOTING Clause 5-59
Spacing Considerations 5-59
Subfooting for Current Report or All Reports 5-60 SUBTITLE Clause 5-61
Specifying a Field Name in a SUBTITLE Clause 5-61
Spacing Considerations 5-61
Subtitle for Current Report or All Reports 5-62 SUBTOTAL Clause 5-63 SUPPRESS Clause 5-64 System Variable Clauses 5-65
Printing the Current Date or Time 5-65
Printing Line Numbers 5-65
Printing Page Numbers 5-65 TAB Clause 5-66
TAB Clause with a LIST Target-item or By-item 5-66
TAB Clause with a Print List 5-66 TIMESTAMP-DATE Clause 5-67 TIMESTAMP-TIME Clause 5-68
058057 Tandem Computers Incorporated xi
Contents
TITLE Clause 5-69
Specifying Field Names in a TITLE Clause 5-69
Spacing Considerations 5-69
Title for Current Report or All Reports 5-70
Overriding Session-Wide Title 5-70 TOTAL Clause 5-71 WHERE Clause 5-72
Using the WHERE Clause to Establish a LINK 5-72
Section 6 Commands
?ASSIGN Command 6-2 ?ATTACH Command 6-5 ?COMPILE Command 6-6 ?DICTIONARY Command 6-7
Identifying the Dictionary 6-7
Clearing Internal Tables 6-7 ?EDIT Command 6-8 ?EXECUTE Command 6-9 ?EXIT Command 6-10 ?HELP Command 6-11 ?OUT Command 6-13 ?RUN Command 6-14 ?SECTION Command 6-15 ?SHOW Command 6-16 ?SOURCE Command 6-18
Appendix A ENFORM Syntax Summary
Language Elements A-1 Statements A-3 Clauses A-7 Commands A-13 ENFORM Procedures A-14
xii 058057 Tandem Computers Incorporated
Appendix B Error Messages
ENFORM Initialization Messages B-2 !!! Error and ***Warning Type Messages B-3 *** File Error Type Messages B-19 ENFORM Trap Messages B-23 BUILDMK Messages B-23
Appendix C LINKS and the LINK OPTIONAL Statement Rules
How ENFORM Defines a LINK C-1
Links Initiated by a LINK Statement C-1
Links Initiated by a LINK OPTIONAL Statement C-1
Links Initiated by a WHERE Clause C-2
How ENFORM Handles a WHERE Clause C-2 When a WHERE Clause Establishes a Link C-3 Comparison of the WHERE Clause and the LINK Statement C-4
Links Due to the Transitive Property of Links C-5
Contents
Review of Rules for the LINK OPTIONAL Statement C-6
Examples of Illegal Links C-7
Examples of Legal Links C-10 Comparison of the LINK Statement, the LINK OPTIONAL Statement, and the
WHERE Clause C-12
Glossary Glossary–1
Index Index–1
058057 Tandem Computers Incorporated xiii
Contents
Figures Figure 1-1. Typical ENFORM Session 1-2
Figure 2-1. Server Query Processor with Several Compiler/Report Writer
Processes 2-7 Figure 3-1. ENFORM Language Elements 3-2 Figure 3-2. Records with Duplicate Field Names 3-7 Figure 3-3. Query Outline of Target-Aggregate with OVER ALL Syntax 3-16 Figure 3-4. Query Outline of Target-Aggregate with OVER Syntax 3-17 Figure 3-5. Query Outline of Qualification Aggregate with OVER Over-item
Syntax 3-20 Figure 3-6. Qualification Aggregate with Embedded WHERE Clause 3-21
Tables Table 2-1. ENFORM Generic Files and Their Uses 2-11
Table 2-2. ENFORM Output Files 2-14 Table 3-1. ENFORM Reserved Words 3-3 Table 3-2. Special Characters 3-4 Table 3-3. Arithmetic Operators 3-23 Table 3-4. Conditional Operators 3-24 Table 4-1. Summary of Statements 4-1 Table 5-1. ENFORM Clauses and Their Functions 5-1 Table 5-2. Permissible Modifiers and Edit Descriptors 5-15 Table 6-1. Summary of Commands 6-1 Table 6-2. Environment Information Displayed by ?SHOW Command 6-16 Table C-1. Truth Table C-12
xiv 058057 Tandem Computers Incorporated
Preface
This manual is one of three volumes that describe the ENFORM language. It concerns syntax only and should be used as a reference by experienced ENFORM users. For other information about ENFORM and related products, refer to the publications listed below.
Data Definition Language (DDL) Reference Manual EDIT Manual ENFORM User’s Guide ENSCRIBE Programming Manual GUARDIAN Operating System Utilities Reference Manual GUARDIAN Operating System User’s Guide GUARDIAN Operating System Programmer’s Guide System Procedure Calls Reference Manual Introduction to ENFORM
058057 Tandem Computers Incorporated xv
Preface
(This page left intentionally blank)
xvi 058057 Tandem Computers Incorporated
Preface
058057 Tandem Computers Incorporated xvii
Notation Conventions
This table describes the characters and symbols used in this manual’s syntax notation. For distinction, syntactical elements appear in a typeface different from that of ordinary text.
Notation Meaning UPPERCASE LETTERS All keywords and reserved words appear in capital letters. If a keyword
can be abbreviated, the part that can be omitted is enclosed in brackets. lowercase italic letters Lowercase italic letters represent variable items that you supply. Brackets Square brackets ([ ]) enclose all optional syntax elements. A vertically-
aligned group of elements enclosed in brackets represents a list of
selections from which to choose one or none. Braces A vertically-aligned group of syntax elements enclosed in braces ({ })
represents a list of selections from which exactly one must be chosen. Ellipsis When an ellipsis (...) immediately follows a pair of brackets or a pair of
braces, the enclosed syntax can be repeated any number of times. Punctuation Parentheses, commas, and other punctuation or symbols not described
above must be entered precisely as shown. If any of the punctuation
above appears enclosed in quotation marks, that character is not a
syntax descriptor but a required character, and must actually be entered.
058057 Tandem Computers Incorporated xvii
Notation Conventions
(This page left intentionally blank)
xviii 058057 Tandem Computers Incorporated
1 Introduction
This publication documents:
The syntax of the Command Interpreter ENFORM command needed to call the ENFORM process, the Command Interpreter commands needed to create a server query processor, and the names of generic files that can be assigned using either the Command Interpreter ASSIGN command or the ENFORM ?ASSIGN command.
The syntax of the ENFORM language elements including statements, clauses, commands, aggregates, expressions, literals, and variables. These elements are alphabetized wherever appropriate.
The error messages generated by ENFORM.
The special features of ENFORM, such as using the host language interface, writing an ENFORM server, or redefining ENFORM reserved words and message text are not discussed. For this information and for information about using the ENFORM language elements, refer to Introduction to ENFORM or to the ENFORM User's Guide.
The examples in this manual use the data base described in the ENFORM User's Guide.
ENFORM Terminology This manual uses special terms to describe the various components and features of the
ENFORM language. Figure 1-1 illustrates these terms by showing a typical ENFORM session (the period of time that begins when you enter the ENFORM command and ends when you exit ENFORM). The following paragraphs describe some of the terms illustrated in Figure 1-1. Become familiar with these terms, because they are used throughout the manual.
058057 Tandem Computers Incorporated 1–1
Introduction
ENFORM Terminology
Figure 1-1. Typical ENFORM Session
Begin Session :ENFORM
Enter Query Specifications >?DICTIONARY $mkt.sample >OPEN employee; >LIST BY empnum,
empname,salary,
WHERE salary GT 2000;
Report
Report Writer
Compiler/
Query
Processor
Command Statement
By-item Clause
Target-items
Clause Request-Qualification
Target-
Records
Target-
list
Statement
Query
Dictionary
Data Base
The important terms are: Query specifications. The language elements (statements, clauses, commands, ...) that
you specify to provide ENFORM with the information it needs to retrieve data and to establish the query environment.
Query. One complete LIST or FIND statement. Both statements specify the information to be retrieved.
Target-list. A part of the query; a target-list consists of target-items and a special type of target-item called a by-item.
Target-items. Any record names, field names, variable names, aggregate names, literals, or expressions, excluding by-items, whose values you want to appear as output from your query.
1–2 058057 Tandem Computers Incorporated
Introduction
ENFORM Terminology
By-items. Field names modified by the BY or BY DESC clauses described in Section 5. The values of the fields are used to sort and group the query output.
Request-qualification. A condition or conditions that a data base element must meet before it is selected to contribute to your query output. A request-qualification begins with a WHERE keyword followed by a logical expression.
Compiler/report writer. The ENFORM process that compiles your query and writes a report (if one is requested). The compiler/report writer issues error messages for syntax errors. If no errors exist, the compiler/report writer passes your compiled query specifications along with information obtained from the dictionary to the query processor. After the query processor returns the retrieved data (in the form of the target-records described later in this section), the compiler/report writer formats and writes the report.
Dictionary. Physical files that contain information called record descriptions. A record description provides ENFORM with information about the name of the record being accessed, the name and data type of any fields within the record, the record and field length, the name of any primary or alternate key fields, and the name of the physical file associated with the record description. The dictionary is created by the Data Definition Language (DDL) compiler from record descriptions written in DDL. The dictionary must exist before your query specifications are processed. Refer to the Data Definition Language (DDL) Programming Manual and the ENFORM User’s Guide for more information about the dictionary.
Query processor. The ENFORM process that uses the information provided by the compiler/report writer to retrieve information from the data base. The query processor also performs other functions such as creating a new physical file and transmitting records to a host language program. Creating a new physical file is described with the FIND statement in Section 5 of this manual. The host language interface is described in the ENFORM User’s Guide.
Target-records. The records built by the query processor from which your ENFORM output is produced. The query processor returns the target-records to the compiler/report writer if the ENFORM output is to be formatted and written as a report.
Data base. The collection of physical files from which the query processor retrieves data. Any physical file from which data is retrieved must be associated with the record description obtained from the dictionary.
058057 Tandem Computers Incorporated 1–3
Introduction
ENFORM Terminology
(This page left intentionally blank)
1–4 058057 Tandem Computers Incorporated
2 Running ENFORM
The ENFORM command issued from the Command Interpreter calls the ENFORM subsystem. If no parameters are specified, the ENFORM command appears as:
:ENFORM
The terminal from which the ENFORM command is entered is called the home terminal. The syntax for the ENFORM command is:
ENFORM [ / [ IN [ , [ OUT [
dict-subvol-name
IN
input-filename
specifies either the name of an EDIT file containing ENFORM source code or the name of a compiled query file.
If this option is specified, ENFORM executes the code in the specified file and returns you to the Command Interpreter prompt at the end of execution.
If this option is omitted, the ENFORM prompt (>) appears and you can enter commands and statements either directly by typing them or indirectly by specifying either the ?RUN or ?SOURCE commands. When this option is omitted, the home terminal becomes the default input file.
OUT
output-filename
specifies the name of the physical file to which output is directed. If this option is omitted, ENFORM directs the output to the current output listing file (explained later in this section.)
dict-subvol-name
is the name of the volume and subvolume upon which the dictionary resides. If this parameter is omitted, ENFORM assumes the dictionary resides on the current volume and subvolume. Either the DICTIONARY statement or the ?DICTIONARY command can be used to supply or change the dictionary name.
input-filename
output-filename
] [ ,
message-table-filename
]
] ] / ]
]
message-table-filename
is the name of the key-sequenced file containing a user-defined ENFORM message table. ENFORM retrieves error and informational message text, help message text, and/or the list of any redefined reserved words, system variables, option variables, or command names from this file when this parameter is specified. If this parameter is omitted, ENFORM retrieves message text from a message table supplied by Tandem. Refer to the ENFORM User’s Guide for information about creating a user-defined message table.
The Command Interpreter ASSIGN command (described later in this section) can be used to make up to 32 logical file assignments before the ENFORM subsystem is called.
058057 Tandem Computers Incorporated 2–1
Running ENFORM
Interactive Mode
Interactive Mode ENFORM functions in interactive mode when the ENFORM source code is entered
from a terminal keyboard. ENFORM prompts for input by printing the right angle bracket (>). When a carriage return is entered, ENFORM issues another prompt. For example:
:ENFORM ENFORM - T9102C09 - (02APR82) DATE - TIME: 6/16/81 ­ 10:14:52 >
ENFORM commands and statements can be entered either directly or indirectly. Commands and statements are entered directly when you type them in response to the ENFORM prompt. Commands and statements are entered indirectly when you use either the ?RUN or ?SOURCE commands to supply the ENFORM source code.
When you enter commands and statements directly, the Command Interpreter FC command allows you to edit or repeat a line. Refer to the GUARDIAN Operating System Utilities Reference Manual, for more information about this command.
When you specify the ?EDIT command, the Edit prompt (*) appears and all the functions of the Edit process are available for your use. Either the ?RUN or the ?SOURCE command can be used to execute the source code created in the Edit process. These commands are described in Section 6.
Exit interactive mode by entering the EXIT statement, the ?EXIT command, or by pressing the CTRL and Y terminal keys simultaneously.
Noninteractive Mode ENFORM functions in noninteractive mode when commands and statements are
entered through an input file other than a terminal. The input file can be an edit file or a compiled query file. For example:
:ENFORM /IN
In this example, ENFORM reads the commands and statements from the input file. When ENFORM functions in noninteractive mode, all commands, statements, and
clauses must be part of the input file. When the file specified in the IN option is a compiled query file, values for parameters can be specified by using the PARAM command of the Command Interpreter prior to the ENFORM command. More information about passing parameters to compiled ENFORM queries appears later in this section.
ENFORM terminates when an end-of-file, EXIT statement, or ?EXIT command is encountered on the input file.
input-filename
, OUT
output-filename
/
2–2 058057 Tandem Computers Incorporated
Running ENFORM
Pressing the Terminal Break Key
The Current Output
Listing File
The current output listing file is the file to which ENFORM directs output. During the course of an ENFORM session, the current output listing file can change.
At the beginning of an ENFORM session, the current output listing file is the default output file. ENFORM determines the default output file by the following process:
If the OUT option is included in the ENFORM command, the default output file is the file specified in the OUT option.
If the OUT option is omitted from the ENFORM command, the default output file is the file specified in the IN option of the ENFORM command if that file is a terminal.
If the file specified for the IN option is not a terminal, the default output file is the home terminal.
If both the IN option and the OUT option are omitted from the ENFORM command, the default output file is the home terminal.
As the session progresses, the current output listing file might change as follows:
If a QUERY-COMPILER-LISTING file is specified, that file becomes the current output listing file whenever ENFORM commands and statements are being processed.
If either a QUERY-REPORT-LISTING file or an ?OUT command file is specified, that file becomes the current output listing file whenever a report (the output from a LIST statement) is being processed.
Pressing the Terminal
Break Key
The QUERY-COMPILER-LISTING file and the QUERY-REPORT-LISTING file are discussed later in this section. The ?OUT command file is discussed in Section 6.
ENFORM acknowledges the terminal BREAK key whenever the input file is a terminal. The input file is a terminal under the following conditions:
the IN option is omitted from the ENFORM command making the home terminal the default input file.
the terminal (whether the home terminal or another terminal) is the file specified in the IN option of the ENFORM command.
Pressing the terminal BREAK key on any terminal, including the home terminal, has no effect unless the terminal is the input file.
058057 Tandem Computers Incorporated 2–3
Running ENFORM
Pressing the Terminal Break Key
The current activity determines the action taken as follows:
Pressing the terminal BREAK key when ENFORM is processing a query, producing a report, or producing output from the ?SHOW command, returns the terminal to the ENFORM prompt (>). Query execution and any output (the report or the output produced by the ?SHOW command) terminates. If you press the BREAK key while ENFORM is performing a sort operation, ENFORM does not respond to the BREAK key until the sort operation finishes.
Pressing the terminal BREAK key when commands or statements are being entered (either directly or indirectly), returns the terminal to the Command Interpreter prompt (:).
Pressing the terminal BREAK key when you have entered the EDIT process from the ENFORM prompt has the same effect as when the EDIT process is entered from the Command Interpreter prompt with one exception: pressing the terminal BREAK key at the EDIT prompt (*) has no effect.
If the @BREAK-KEY option variable (described in Section 5) is set to OFF, pressing the BREAK key returns the terminal to the Command Interpreter prompt. It neither terminates output nor query execution. In this case, ENFORM continues to run and any output directed to the terminal is temporarily interrupted. The PAUSE command of the Command Interpreter can be issued to resume output.
2–4 058057 Tandem Computers Incorporated
Running ENFORM
Logical File Assignments
Logical File
Assignments
ENFORM allows logical file assignments to be made either before or after the Command Interpreter ENFORM command is entered. When the logical file assignment is made from within the ENFORM subsystem, use the ENFORM ?ASSIGN command described in Section 6. When the logical file assignment is made before the ENFORM command is entered, use the Command Interpreter ASSIGN command to either associate a physical file with a dictionary record description or to assign some form of ENFORM output to a generic file.
When ENFORM is used in noninteractive mode, the Command Interpreter ASSIGN command overrides an ENFORM ?ASSIGN command that is part of the input file. When ENFORM is used in interactive mode, the ENFORM ?ASSIGN command overrides any Command Interpreter ASSIGN commands.
The syntax of the Command Interpreter ASSIGN command is:
ASSIGN
 
record-name
{}
generic-file-name
record-name
is the name of a dictionary record description.
generic-file-name
is the name of one of the following generic files: QUERY-WORK-AREA, QUERY­SORT-AREA, QUERY-QPSTATISTICS, and QUERY-QPSTATUS-MESSAGES. All other names are ignored.
physical-filename
[‚
exclusion-mode
 
]
physical-filename
is a fully qualified Tandem file name. Refer to the GUARDIAN Operating User’s Guide for the exact form of a Tandem file name.
exclusion-mode
is either SHARED, PROTECTED, or EXCLUSIVE. The default is SHARED for an input file. Valid values for generic files are described later in this section.
Refer to the GUARDIAN Operating System Utilities Reference Manual for more information about the ASSIGN command.
058057 Tandem Computers Incorporated 2–5
Loading...
+ 282 hidden pages