Tandem ENFORM 058057 User manual

Data Management Library
Tandem Computers Incorporated
ENFORM™
Reference Manual
Abstract This manual provides detailed information about the syntax of the ENFORM language.
Part Number 058057

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.
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.

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.
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.

New and Changed Information
058057 Tandem Computers Incorporated iii
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.

New and Changed Information
iv 058057 Tandem Computers Incorporated
(This page left intentionally blank)

New and Changed Information
058057 Tandem Computers Incorporated v

Contents
058057 Tandem Computers Incorporated v
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

Contents
vi 058057 Tandem Computers Incorporated
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

Contents
058057 Tandem Computers Incorporated vii
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
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

Contents
viii 058057 Tandem Computers Incorporated
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

Contents
058057 Tandem Computers Incorporated ix
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
Alphanumeric Edit Descriptor 5-10
Integer Edit Descriptor 5-10
Fixed Format Edit Descriptor 5-11
Mask Edit Descriptor 5-12
Nonrepeatable Edit Descriptors 5-14
Scale Factor Edit Descriptor 5-14
Optional Plus Edit Descriptor 5-15
Modifiers 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
Decorations 5-19
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

Contents
x058057 Tandem Computers Incorporated
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

Contents
058057 Tandem Computers Incorporated xi
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
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

Contents
xii 058057 Tandem Computers Incorporated
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

Contents
058057 Tandem Computers Incorporated xiii
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
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

Contents
xiv 058057 Tandem Computers Incorporated
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

Preface
058057 Tandem Computers Incorporated xv
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

Preface
xvi 058057 Tandem Computers Incorporated
(This page left intentionally blank)

Preface
058057 Tandem Computers Incorporated xvii

Notation Conventions
058057 Tandem Computers Incorporated xvii
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.
This manual suits for next models
1
Table of contents
Popular Software manuals by other brands

Sherwood
Sherwood LAD-500 - USB DOWNLOADER manual

DH Instruments
DH Instruments RPM RANGER manual

Texas Instruments
Texas Instruments GRAPH LINK Guide book

Red Hat
Red Hat NETWORK 4.1.0 - Configuration guide

Xerox
Xerox 6100BD - Phaser Color Laser Printer Getting started guide

Novell
Novell GROUPWISE 7 - INTEROPERABILITY GUIDE manual