Enform Plus Reference Manual Abstract This manual provides detailed information about the syntax of the Enform Plus language. Product Version Enform Plus D46 Supported Releases This manual supports D46.00 and all subsequent D4x releases and G06.00 and all subsequent G-series releases until otherwise indicated in a new edition.
Document History Part Number Product Version Published 422684-001 Enform Plus D46 May 1999 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 representative to make sure you have the most recent information.
Enform Plus Reference Manual Glossary Index Figures What’s New in This Manual iii Manual Information iii New and Changed Information iii About This Manual v Your Comments Invited v Notation Conventions vii 1. Introduction Enform Plus Terminology 1-1 2.
3. Enform Plus Language Elements Contents 3.
4. Statements Contents User Variables 3-27 User Variable as a Target-Item 3-27 User Variable in Request-Qualification 3-29 User Tables 3-29 Arithmetic Overflow Conditions 3-29 4.
4.
5. Clauses Contents Subtitle for Current Report or All Reports Canceling Session-Wide Subtitle TITLE Statement 4-46 4-46 4-47 Specifying a Field Name Within a TITLE Statement 4-47 Spacing Considerations 4-47 Title for Current Report or All Reports 4-48 Canceling Session-Wide Title 4-48 5.
5.
5.
6. Commands Contents TIMESTAMP-DATE Clause 5-67 TIMESTAMP-TIME Clause 5-68 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 6.
B. Error Messages Contents COBOL Procedures A-12 FORTRAN Functions A-12 TAL Functions A-13 B. Error Messages Enform Plus Initialization Messages B-2 !!! Error and *** Warning Type Messages *** File Error Type Messages B-4 B-22 Enform Plus Trap Messages B-26 BUILDMK Error Messages B-26 C.
Tables Contents Tables Table 2-1. Enform Plus Generic Files and Their Uses (page 1 of 2) 2-11 Table 2-2. Enform Plus Output Files (page 1 of 2) Table 3-1. Enform Plus Reserved Words and Characters Table 3-2. Special Characters Table 3-3. Arithmetic Operators Table 3-4. Conditional Operators Table 4-1. Summary of Statements (page 1 of 2) Table 5-1. Enform Plus Clauses and Their Functions (page 1 of 3) Table 5-2. Permissible Modifiers and Edit Descriptors Table 6-1.
What’s New in This Manual Manual Information Enform Plus Reference Manual Abstract This manual provides detailed information about the syntax of the Enform Plus language. Product Version Enform Plus D46 Supported Releases This manual supports D46.00 and all subsequent D4x releases and G06.00 and all subsequent G-series releases until otherwise indicated in a new edition.
New and Changed Information What’s New in This Manual Enform Plus Reference Manual—422684-001 xii
About This Manual This manual describes Enform Plus, a language/report generator used for information retrieval. It accesses, sorts, and formats information from a database. Enform Plus can use the Data Definition Language (DDL) to define data format. This manual describes the language syntax of Enform Plus, which is an enhancement of an earlier product, Enform.
Your Comments Invited About This Manual Many of the improvements you see in manuals are a result of suggestions from our customers. Please take this opportunity to help us improve future manuals.
Notation Conventions About This Manual Notation Conventions Hypertext Links Blue underline is used to indicate a hypertext link within text. By clicking a passage of text with a blue underline, you are taken to the location described. For example: This requirement is described under Backup DAM Volumes and Physical Disk Drives on page 3-2. General Syntax Notation The following list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS.
General Syntax Notation About This Manual | Vertical Line. A vertical line separates alternatives in a horizontal list that is enclosed in brackets or braces. For example: INSPECT { OFF | ON | SAVEABEND } … Ellipsis. An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example: M address-1 [ , new-value ]... [ - ] {0|1|2|3|4|5|6|7|8|9}...
1 Introduction This section introduces the content of this manual and the terminology used by Enform Plus. This manual documents the following information: • • • The syntax of the TACL command ENFORM needed to call the Enform Plus process, the TACL commands needed to create a server query processor, and the names of generic files that can be assigned using either the TACL ASSIGN command or the Enform Plus ?ASSIGN command.
Enform Plus Terminology Introduction Figure 1-1. A Typical Enform Plus Session Begin Session nn> ENFORM Enter Query Specifications >?DICTIONARY $mkt.sample Command >OPEN employee; Statement >LIST BY empnum, By-item Clause empname,salary, Target-list Statement Query Target-items WHERE salary GT 2000; Clause Request-qualification Report Compiler/ Report Writer Dictionary TargetRecords Query Processor Database CDT 001.CDD The important terms are: Query specifications.
Enform Plus Terminology Introduction Request-qualification. A condition or conditions that a database 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 Plus process that compiles your query and writes a report (if one is requested). The compiler/report writer issues error messages for syntax errors.
Enform Plus Terminology Introduction Enform Plus Reference Manual—422684-001 1 -4
2 Running Enform Plus This section describes the initiation of an Enform Plus session, the scope of such a session, the action of the query processor, TACL commands and macros that control and influence the session, and the files used by the session. The ENFORM command issued from TACL calls the Enform Plus subsystem. If no parameters are specified, the ENFORM command appears as: nn> ENFORM The nn in this example represents the history number that is displayed as part of every TACL prompt.
ENFPLUS Macro Running Enform Plus table supplied by Compaq. See the Enform User's Guide for information on creating a user-defined message table. The TACL ASSIGN command (described on page 2-7) can be used to make up to 32 logical file assignments before the Enform Plus subsystem is called. ENFPLUS Macro The ENFORM command described previously is the same command used to run the older Enform subsystem.
Noninteractive Mode Running Enform Plus ?SOURCE command can be used to execute the source code created in the Edit process. These commands are described in Section 6, Commands. Exit interactive mode by entering the EXIT statement, the ?EXIT command, or by pressing the Ctrl and Y terminal keys simultaneously. Noninteractive Mode Enform Plus functions in noninteractive mode when commands and statements are entered through an input file other than a terminal.
Pressing the Terminal Break Key Running Enform Plus The QUERY-COMPILER-LISTING file and the QUERY-REPORT-LISTING file are described under Generic Files on page 2-10. The ?OUT command file is described on page 6-14. Pressing the Terminal Break Key Enform Plus 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.
Passing Parameters to Compiled Query Files Running Enform Plus Enform Plus is used in interactive mode, the Enform Plus ?ASSIGN command overrides any TACL ASSIGN commands. The syntax of the TACL ASSIGN command is as follows: [ { record-name } , physical-file-name ] ASSIGN [ { generic-file-name } ] [ ] [ [ , exclusion-mode ] ] record-name is the name of a dictionary record description.
A Server Query Processor Running Enform Plus parameter-value is the value to be assigned to parameter-name. parameter-value can have either of the following forms: character-string "character-string" If the first form is used, the string must not contain any embedded commas, and leading and trailing blanks are not included as part of parameter-value. If the second form is used, all the characters, including leading and trailing blanks, between the quotation marks are included as part of parameter-value.
The TACL ASSIGN Command Running Enform Plus Figure 2-1. Server Query Processor, Several Compiler/Report Writer Processes Report Enform Plus Compiler/Report Writer Process Dictionary A Database A Enform Plus Compiler/Report Writer Process Output File Compiled Enform Plus Query Enform Plus Server Query Processor Host Language Program Database B Dictionary B Report Enform Plus Compiler/Report Writer Process CDT 002.
The TACL PARAM Command Running Enform Plus The TACL ASSIGN command defines the physical file or files kept open. The syntax of this command is as follows: ASSIGN { Fnumber } , physical-file-name { generic-file-name } [ , exclusion-mode ] Fnumber specifies the logical file name. Valid values for logical file names range from F1 through F31. generic-file-name is the name of one of the following generic files: QUERY-WORK-AREA, QUERYSORT-AREA, QUERY-QPSTATISTICS, and QUERY-QPSTATUS-MESSAGES.
The TACL QP Command Running Enform Plus message is displayed. See the @COST-TOLERANCE Option Variable in the Option Variable clauses on page 5-48 for an explanation of strategy cost limits. max-cost must be an integer between one and eight. The default is no limit. TIMEOUT time-out sets the number of minutes a server query processor sits idle before stopping itself. The default is no limit, meaning the query processor continues to run indefinitely.
Example of Server Query Processor Creation Running Enform Plus Example of Server Query Processor Creation Issue the following instructions to create a server query processor named $qp1 that does the following: • • • • Keeps open parts, order, and odetail Accepts up to 15 requestors Sets a limit of 2 on the cost strategy Waits up to three minutes before stopping 27> 28> 29> 30> 31> ASSIGN F1, $data.database.parts ASSIGN F2, $data.database.order ASSIGN F3, $data.database.
Generic Files Running Enform Plus Table 2-1. Enform Plus Generic Files and Their Uses (page 1 of 2) Generic File Name Description QUERY-COMPILER-LISTING All compilation output produced during an Enform Plus session (that is, entering a query either directly or indirectly); compiler errors and warnings; including output, errors, and warnings from other Enform Plus commands (such as ?ASSIGN and ?SHOW). Output is produced in ASCII with a record length of 132Ebytes.
Generic Files and a Dedicated Query Processor Running Enform Plus Table 2-1. Enform Plus Generic Files and Their Uses (page 2 of 2) Generic File Name Description QUERY-SORT-AREA The location where all temporary files are built by the SORT process while processing a FIND or LIST statement during an Enform Plus session. The QUERY-SORT-AREA file name can be a volume name or an explicit file name.
Running Enform Plus Generic Files and the Server Query Processor Generic Files and the Server Query Processor The generic files QUERY-WORK-AREA, QUERY-SORT-AREA, QUERYQPSTATISTICS, and QUERY-QPSTATUS-MESSAGES can be held open for the lifetime of a server query processor if the TACL ASSIGN command (see A Server Query Processor on page 2-6) is specified at the time the server query processor is created.
Generic Files and the Current Output Listing File Running Enform Plus Table 2-2. Enform Plus Output Files (page 1 of 2) Enform Plus Output Output File Enform Plus banner and trailer Commands Statements Command output (e.g.,?SHOW) Output is directed to: 1. The QUERY-COMPILER-LISTING file, if assigned; otherwise, 2. The default output file. Report from a LIST statement Output is directed to: 1. The ?OUT file, if specified; otherwise, 2. QUERY-REPORT-LISTING file, if assigned; otherwise, 3.
Generic Files and the Current Output Listing File Running Enform Plus Table 2-2. Enform Plus Output Files (page 2 of 2) Enform Plus Output Output File Error messages from the command processor and query compiler Output is sent to the QUERY-STATUS-MESSAGES file, if assigned, in addition to the following: 1. QUERY-COMPILER-LISTING, if assigned; otherwise, 2. The default output file.
Running Enform Plus Generic Files and the Current Output Listing File Enform Plus Reference Manual—422684-001 2- 16
3 Enform Plus Language Elements An Enform Plus query is built with elements of the Enform Plus language. This section contains the following: • • • • An explanation of the Enform Plus language elements that are used throughout query specifications. These elements are reserved words, special characters, and comments. A brief explanation of the functions of the Enform Plus statements, clauses, and commands.
Reserved Words Enform Plus Language Elements Figure 3-1. Enform Plus Language Elements ?DICTIONARY $mkt.
Reserved Words Enform Plus Language Elements Do not use reserved words to name records, fields, variables, tables, or parameters. Reserved words can be redefined or translated to a language other than English. See the Enform User's Guide for instructions on redefining the Enform Plus reserved words. Table 3-1 lists the Enform Plus reserved words. Table 3-1.
Special Characters Enform Plus Language Elements Special Characters Table 3-2 lists the Enform Plus special characters and describes their functions within a query. Table 3-2. Special Characters Character Name Character Description Apostrophe ' Serves as a delimiter for display formats, some conditional operators. Assignment syntax := Assigns a value to a target-item. Blank Separates keywords and other language elements. Brackets [ ] Delimits subscripts, modifiers, and decorations.
Enform Plus Language Elements Clauses With the exception of the LIST and FIND statement, Enform Plus statements remain in effect (unless canceled, reset, or overridden) for the duration of an entire Enform Plus session. Enform Plus requires the LIST and FIND statements to be terminated with a semicolon. The other Enform Plus statements should be terminated with a semicolon because Enform Plus does not report errors until it encounters either a terminating semicolon or the beginning of a new statement.
Enform Plus Language Elements Rules for Naming User-Defined Elements Rules for Naming User-Defined Elements When you name variables, tables, aggregates, or parameters, the name: • • • • • • Must be unique Must start with either an alphabetic character or a circumflex (^) Can contain numbers, hyphens (-), or circumflexes (^) Can be from 1 to 31 characters in length Must not contain embedded blanks Must not end with a hyphen (-) Rules for Referencing Database Elements When you reference a database elemen
Primary Key References Enform Plus Language Elements field-name OF record-name or field-name OF group-name A field name requires as much qualifying as necessary to uniquely identify the field to Enform Plus. The necessary qualification might be as simple as combining the field name with the record name or group name. It might require combining the field name with both a group name and a record name or with two group names. Consider the record descriptions shown in Figure 3-2. Figure 3-2.
Enform Plus Language Elements Subscripts advantage of the form record-name.KEY is that you do not need to know the name of the primary key field to reference it. A listing of the primary key values of the parts file can be obtained by the following: OPEN parts; LIST parts.KEY; The record with the primary key value of 1403 can be referenced by: WHERE parts.KEY = 1403 For files with relative file structure, the primary key is a record number.
Subscripts Enform Plus Language Elements The syntax for including subscripts is: { field-name-ref1 } { user-table-name } { "["subscript"]" } { "["subscript-range"]" } { "["subscript"]" }.field-name-ref2 grp-name { } { "["subscript"]" } { "["subscript-range"]" } { "["subscript-range"]" } field-name-ref1 is the qualified name of a database field. user-table-name is the name of a user table defined by the DECLARE statement. subscript is an integer. The lowest valid value for subscript is 1.
Subscripts Enform Plus Language Elements The valid subscript values for u-var are 1 through 24. Valid subscript values for database tables are defined by the OCCURS clause in the dictionary description of the table. For example: 02 monthly-sales OCCURS 12 TIMES. The valid subscript values for monthly-sales are 1 through 12. Both user and database tables can be referenced without a subscript. Enform Plus uses a default a subscript of 1.
Aggregates Enform Plus Language Elements The subordinate elements of a database table can themselves contain a database table resulting in nested database tables. For example, consider the following record description: 02 10 10 10 tot-sales OCCURS 12 times. month PIC X(3). top-dept PIC 999. wkly-sales PIC 99999 OCCURS 4 TIMES. Enform Plus allows you to reference nested database tables.
Enform Plus Language Elements Aggregates AVG is a predefined Enform Plus aggregate that computes an average value for a set of numbers or expressions. COUNT is a predefined Enform Plus aggregate that tallies the occurrences of a field defined as either numeric or alphanumeric. MAX is a predefined Enform Plus aggregate that finds the highest number in a set of numbers or expressions, or finds the alphanumeric string with the highest value based on the ASCII collating sequence.
Enform Plus Language Elements Predefined Aggregates UNIQUE excludes duplicate values from contributing to the collecting operation of the aggregate. UNIQUE adds considerable processing overhead and should not be specified unless you know unwanted duplicate values exist. UNIQUE is redundant with MAX or MIN. While the same answer is returned when UNIQUE is specified with these aggregates, processing time increases greatly.
Enform Plus Language Elements • • User Aggregates A user aggregate cannot be referenced in the end expression of the declaration of another user aggregate. A user aggregate declared with an end expression cannot be used as a qualification aggregate over a by-item. The syntax of a user-defined aggregate is shown with the DECLARE Statement on page 4-9. The syntax is also shown here to clarify this description.
Target Aggregates Enform Plus Language Elements This user-aggregate could be used to compare the new gross salaries to the old average salary: LIST AVG (salary), grossavg (salary); Target Aggregates A target aggregate appears as part of the Enform Plus output. When you specify a target aggregate, follow these rules: • • • • The field names in the target aggregate syntax can come from different database records. An over-item must be a by-item.
Target Aggregates Enform Plus Language Elements The query groups target-item-1 and target-item-2 within by-item-2. The aggregate AVG is used and the average value of target-item-2 is found by totaling all of the values of target-item-2 and dividing that total by the number of target-item-2 values. Notice that AVG target-item-2 prints as a separate column on the report with only one nonblank entry. This entry corresponds to the aggregate value of all records in the report.
Enform Plus Language Elements Qualification Aggregates Qualification Aggregates Qualification aggregates must be specified in a WHERE clause. When specifying a qualification aggregate, follow these rules: • • • • • Qualification aggregates cannot be nested; that is, one aggregate cannot be used as the argument for another aggregate. A qualification aggregate can contain an embedded WHERE clause.
Qualification Aggregates Enform Plus Language Elements Figure 3-5.
Aggregates and Scale Enform Plus Language Elements gives: • • All employees whose salaries are less than the average The average of all salaries that are less than the average Qualification Aggregate With an Embedded WHERE Clause If a qualification aggregate contains a WHERE clause that restricts the records for the aggregate calculation, Enform Plus processes the embedded WHERE clause before the aggregate.
Literals Enform Plus Language Elements If you want the aggregate to return a value with a scale other than that of the input field, assign the result to a user variable declared with the appropriate scale. For example: DECLARE fixit INTERNAL F6.2; LIST fixit := AVG (price OVER partnum); The average of price over part number will now be returned with six total digits, with two digits to the right of the decimal point. Literals Literals can be used in both a target-list and a request-qualification.
Enform Plus Language Elements Arithmetic Expressions The following are examples of string literals: "This is a string literal" "This string literal contains a "" quotation mark" "1234.99" String literals can stand alone as target-items in a LIST statement. By using a string literal in this manner, you allow printing of one or more constant characters between two columns of data. For example: LIST customer,"....
Evaluation Order of Arithmetic Expressions Enform Plus Language Elements Evaluation Order of Arithmetic Expressions Arithmetic expressions are evaluated in the following order: 1. Nested parenthesized expressions are evaluated first, beginning with the innermost expression. 2. Within a nested parenthesized expression, multiplication and division operations are evaluated next. 3. Within a nested parenthesized expression, addition and subtraction operations are evaluated last.
Enform Plus Language Elements Logical Expressions The syntax of a logical expression is: [NOT] condition [ { AND | OR } ] [NOT] condition ] ...
Enform Plus Language Elements Effect of Parentheses on Compound Logical Expressions m,n is two integers, separated by comma, indicating that at least m characters but not more than n characters must precede or follow string-literal when it is found in a field value. - is a dash indicating any number of characters (0 through 255) can precede or follow string-literal when it is found as a field value. Specification of a dash indicates you do not care about the contents of this part of the field.
Enform Plus Language Elements Range of Values in Logical Expressions In this example, the logical expression is evaluated as true only if the field begins with a value in which COMPAQ is in uppercase characters. The BEGINS WITH operator can be used only with fields specified as alphanumeric in the data dictionary. A field is alphanumeric when its corresponding data description entry is specified as PIC X. The CONTAINS operator determines if a field contains a specified alphanumeric string.
Enform Plus Language Elements Pattern-Match in Logical Expressions Pattern-Match in Logical Expressions In a logical expression, a field described as alphanumeric in the data dictionary can be compared to a pattern-match. A pattern-match is actually a comparison template that the field value is compared to.
Parameters Enform Plus Language Elements Parameters You can use a parameter either for request qualification or as a target-item. You can pass a parameter to a stored compiled query file. Define parameters by issuing the PARAM statement, described on page 4-39. Enform Plus handles parameters syntactically as if they were literals. Enform Plus handles any parameter declared with an alphanumeric internal format as a string literal; it handles all other parameters as numeric literals.
Enform Plus Language Elements User Variable as a Target-Item expression is an arithmetic expression or an IF/THEN/ELSE expression. field-name is the name of a database field. literal is a numeric literal or string literal that agrees in type with the user variable. user-table-element is the subscripted name of a user table element. You cannot assign a subscript range to a user variable. user-variable-2 is the name of a previously defined user variable.
Enform Plus Language Elements User Variable in Request-Qualification Enform Plus uses 20, the value assigned in the first assignment syntax (u-var + 10) for the value of u-var in the second expression. After determining the value of the expression ((u-var + 10) + 20), Enform Plus assigns the value of the expression, 40, to the user variable. Enform Plus performs this process for every target-record.
Enform Plus Language Elements Enform Plus Reference Manual—422684-001 3- 30 Arithmetic Overflow Conditions
4 Statements This section describes the syntax of the Enform Plus statements. The statements are arranged in alphabetic order to provide ease of access. The Enform Plus statements, with the exception of the LIST and FIND statements, have a session-wide affect unless canceled or overridden. The LIST and FIND statements effect only the queries of which they are a part. The AT END, AT START, FOOTING, SUBFOOTING, SUBTITLE, and TITLE statements apply only to queries containing a LIST statement.
Statements Table 4-1. Summary of Statements (page 2 of 2) Statement Function SET Initializes a user variable, user table, or a parameter and resets option variables. Report Information Formatting Statement Function AT END Prints information at the end of all subsequent reports in the current session. See also the AT END PRINT Clause on page 5-26. AT START Prints information just before the first set of column headings for all subsequent reports in the current session.
AT END Statement Statements AT END Statement The AT END statement allows you to specify information that is printed at the end of all subsequent reports in the current session unless canceled or reset by another AT END statement or overridden by an AT END clause. (See the AT END PRINT Clause on page 5-26.) The syntax of the AT END statement is: AT END [ PRINT print-list [ CENTER ] ] [ ; ] print-list can contain any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
AT END Information for Current Report or All Reports Statements AT END PRINT "End of Report for" SKIP "Region " regnum; End of Report for Region 1 By using a FORM clause within an AT END statement, you can cause Enform Plus to print the remainder of the AT END print-list on a new page and to increment the page number. By using the CENTER clause following the print-list of an AT END statement, you can center the information on the page.
AT START Statement Statements AT START Statement The AT START statement allows you to specify information that is printed just before the first set of column headings for all subsequent reports in the current session unless canceled or reset by another AT START statement or overridden by an AT START clause. (See the AT START PRINT Clause on page 5-28.
AT START Information for Current Report or All Reports Statements option variable @VSPACE. In the following example, the SKIP clause of the AT START statement causes two lines to be printed: AT START PRINT "Report For" SKIP "Region " regnum; Report For Region 2 By using the FORM clause within an AT START statement, you can cause the remainder of the AT START print-list to be printed on a new page and increments the page number.
CLOSE Statement Statements CLOSE Statement The CLOSE statement allows you to delete a user variable, user aggregate, user table, a parameter, or a record description from the internal table. The syntax of the CLOSE statement is: { { CLOSE { { { record-name user-variable-name user-aggregate-name user-table-name param-name } } } , ... [ ; ] } } record-name is the name of a dictionary record description previously accessed by an OPEN statement.
Statements The Effect of a CLOSE Statement on the Internal Table An alternative to the CLOSE statement is the DICTIONARY statement or?DICTIONARY command. Both completely clear the Enform Plus internal table and reclaim table space.
DECLARE Statement Statements DECLARE Statement The DECLARE statement allows you to define a user variable, user aggregate, or user table. The syntax of the DECLARE statement is: { { DECLARE { { { { user-variable-name { user-table-name "[" max-subscript "]" } { user-aggregate-name ( formal-argument ) { = ( step-expression [ , [ end-expression ] { [ , initialize-constant ] ] ) } [ INTERNAL internal-format ] } [ AS display-format ] } ,...
Declaring a User Aggregate Statements heading-string is a string literal that is the default heading for the declared element. Remember string literals must be enclosed in quotation marks (“ ”). Specify the DECLARE statement before you reference a user variable, user aggregate, or user table. Enform Plus stores information about each user-defined element in the internal table.
Declaring a User Variable or User Table Statements no^orders is defined. The INTERNAL clause indicates that no^orders is to be stored as alphanumeric with a length of 9 bytes: DECLARE no^orders INTERNAL A9; The default display format for either a user variable or an element in a user table is a fourteen character integer. To change this default, specify the optional AS clause.
DELINK Statement Statements DELINK Statement The DELINK statement allows you to clear a connecting relationship between dictionary record descriptions. The syntax of the DELINK statement is: { record-name1 [ TO [OPTIONAL] ] } { record-name2 VIA field-name } DELINK { } , ... [;] { qualified-field-name1 [ TO [ OPTIONAL ] ] } { qualified-field-name2 } record-name1 and record-name2 are the names of dictionary record descriptions. field-name is the name of a field common to both of the record descriptions.
DICTIONARY Statement Statements DICTIONARY Statement The DICTIONARY statement allows you to identify the subvolume containing your dictionary. It also allows you to clear the internal table. The DICTIONARY statement has the same effect as the ?DICTIONARY command. The syntax of the DICTIONARY statement is: DICTIONARY [ dict-subvol-name ] dict-subvol-name is the name of the subvolume where your dictionary files reside. See the Guardian Programmer's Guide for information on specifying Guardian file names.
Clearing the Internal Table Statements Clearing the Internal Table Entering the DICTIONARY statement without a volume and subvolume name is a simple means of clearing the entire internal table and reclaiming table space without changing the dictionary. To clear only certain elements of the internal table, see the CLOSE Statement on page 4-7 and the DELINK Statement on page 4-12.
EXIT Statement Statements EXIT Statement The EXIT statement terminates the current Enform Plus session. The syntax of the EXIT statement is: EXIT [ ; ] The EXIT statement returns control to the invoking process, usually TACL. The EXIT statement is the same as the ?EXIT command. Pressing the Ctrl and Y terminal keys simultaneously is an alternative way to exit Enform Plus.
FIND Statement Statements FIND Statement The FIND statement allows you to specify the input fields and records that contribute to the target-record and either write output records to a physical file or transmit output records to a host-language program. The FIND statement must end with a semicolon.
Output Record Dictionary Description Statements Output Record Dictionary Description Before executing the FIND statement, you must include a description of the output record in the dictionary. When the FIND statement is executed, Enform Plus either writes the output records to the physical file specified in the dictionary or transmits the output records to a host-language program. In either case, the Data Definition Language (DDL) record description must describe the file type as unstructured.
Output Fields Statements When a FIND statement contains more than one BY, BY DESC, ASCD, or DESC clause, Enform Plus determines a major to minor sort precedence by the order in which the BY, BY DESC, ASCD, or DESC clauses appear in the FIND statement. The first clause has highest priority and is sorted first, the next one second priority, down to the last clause. Output Fields When the FIND statement is executed, Enform Plus takes the values from the input elements and stores them in the output field.
Input Elements Statements • The output-field-name can be a group name; however, Enform Plus might not store the fields within the group in the manner you expect. To understand the way that Enform Plus stores group elements, you must first understand what a group is. A group is defined in DDL as any field whose level number (03, 04, and so on) is less than that of the next field in the record. Consider, for example, the following DDL record description: RECORD findfl. FILE IS $mkt.sample.
Input Elements Statements • The value of a string literal. A string literal must be enclosed in parentheses. FIND ... ( jobtitle := ("manager"), ... ) ; • The value of an arithmetic expression. Enclose an arithmetic expression within parentheses. Use any combination of numeric fields, numeric literals, numeric user variables, predefined aggregates, or user aggregates for the arithmetic expression. FIND ... ( sales := (price * quantity), ... ) ; • The value of an IF/THEN/ELSE expression.
Request-Qualification Statements • An input element must be sufficiently qualified to avoid any ambiguity between it and any other element specified in the query. Request-Qualification Use the WHERE clause to limit the records written to the physical output file or transmitted to the host-language program. See the WHERE Clause on page 5-72.
Statements Statements and Clauses That Do Not Apply to the FIND Statement If you want summary records that consist of only by-items and aggregates to include those where the last value of a by-item has not changed but a subordinate by-item value has changed, then you must include a target-item in the target-list that has not appeared as a by-item or aggregate. Of course, you must also set @SUMMARY-ONLY to OFF. For example: SET @SUMMARY-ONLY TO OFF; FIND findfil2 (BY employee.dept, BY employee.
FOOTING Statement Statements FOOTING Statement The FOOTING statement allows you to specify a footing to be printed at the bottom of each report page for all reports in the current session unless overridden or reset by another FOOTING statement or temporarily overridden by a FOOTING clause. (See the FOOTING Clause on page 5-36.) The syntax of the FOOTING statement is: FOOTING [ print-list [ CENTER ] ] [ ; ] print-list can be any combination of literals, FORM, SKIP, SPACE or TAB clauses.
Footing for Current Report or All Reports Statements The following footing appears at the bottom of the next report that is generated without a LIST statement FOOTING clause: Report 2-A Total Sales By using a FORM clause within a FOOTING statement, you can force a new page. Enform Plus continues with the remainder of the FOOTING print-list. The page number remains the same.
LINK Statement Statements LINK Statement The LINK statement allows you to specify a connecting relationship between dictionary record descriptions. The syntax of the LINK statement is: { record-name1 [ TO ] [ OPTIONAL ] record-name2 { VIA field-name LINK { { qualified-field-name1 [ TO ] [ OPTIONAL ] { qualified-field-name2 } } } ,...[ ; ] } } record-name1 and record-name2 are the names of dictionary record descriptions containing a common field.
Duration of Link Established by LINK or LINK OPTIONAL Statement Statements Duration of Link Established by LINK or LINK OPTIONAL Statement When you use either the LINK statement or the LINK OPTIONAL statement, you establish a link that exists for the duration of the Enform Plus session.
LINK OPTIONAL Statement Considerations Statements This statement causes Enform Plus to build: • • • A logical record description that consists of fields from both employee and branch. One logical record for each matching employee and branch record. (Each logical record contains field values from both records.) One logical record for each employee record for which there is not a corresponding branch record.
Statements LINK OPTIONAL Statement Considerations Note. When checking your query for violations of these rules, Enform Plus ignores any links (initiated by either a LINK statement or a WHERE clause) that reference the same record descriptions as referenced in a LINK OPTIONAL statement. In effect, Enform Plus “cancels” any other link between the record descriptions when determining the legality of the links. Enform Plus ignores these links only when checking for violations of the LINK OPTIONAL rules.
LINK OPTIONAL Statement Considerations Statements record descriptions referenced in the WHERE clause contribute to the logical record, Enform Plus uses all the terms in the WHERE clause. • For a given logical record, Enform Plus supplies null values for any fields that correspond to a “noncontributing” record description. If your query specifications include expressions or aggregates that reference these null field values, Enform Plus computes the expression or aggregate value by using blank values.
LIST Statement Statements LIST Statement The LIST statement allows you to select the information printed in a report and prints the report. The LIST statement must end with a semicolon.
Input Record Description Statements UNIQUE prevents identical records from contributing to the report. UNIQUE adds processing overhead and should not be used unless undesirable duplicate records are known to exist. by-item is the name of a field modified by a BY or a BY DESC clause. Enform Plus sorts and groups the report according to the value of this field. You cannot specify more than 63 by-items in your query.
Group Definition and Sorting Statements entry-sequenced, unstructured) of the data file. The actual file type of a data file must be the same as the file type described in the record description; otherwise, your query might return incorrect results. Group Definition and Sorting BY and BY DESC clauses group and sort records. Enform Plus prints the by-item value for a group only for the first record of all the records that have the same value for the by-item.
How Values Are Displayed in Report Columns Statements • An arithmetic expression enclosed in parentheses. The expression can use any combination of numeric fields, numeric literals, numeric user variables, predefined aggregates, user aggregates, JULIAN-DATE clauses, or System Variable clauses. LIST ..., (price * quantity); • An IF/THEN/ELSE expression. Enclose IF/THEN/ELSE expressions in parentheses. LIST ..., (IF inventory GT 0 THEN inventory ELSE ZERO); • A user variable.
Request-Qualification Statements you must first understand what a group is. A group is defined in DDL as any field whose level number (03, 04, 05, and so on) is less than that of the next field. For example, consider the following DDL record description: RECORD test. FILE IS "$mkt.sample.test" key-sequenced. 02 account-num. 05 type PIC 9(4). 05 num TYPE BINARY 16. 02 custnum PIC 9(4). end Within this record, account-num is a group. The data type of a group is always alphanumeric.
Summary Reports Statements When you explicitly request a summary report, you get a report summarized down to the lowest level where an aggregate is calculated over that level. For example: SET @SUMMARY-ONLY TO ON; LIST BY dept, BY job, BY empname, salary, COUNT(empname OVER job); returns one record for each job in each department. Only the first employee name (empname) for each job is returned, as follows: DEPT ---- JOB --- 0101 MANAGER SALESMAN SECRETARY SYS.
Optional Clauses Statements can be modified by the NOPRINT clause if desired. Of course, you must also set @SUMMARY-ONLY to OFF. For example: SET @SUMMARY-ONLY TO OFF; LIST BY dept, BY job, BY empname, salary NOPRINT, COUNT (empname OVER job); returns more than one record for each job in each department. All the employee names (empname) for each job are returned, as follows: DEPT ---- JOB --- 0101 MANAGER EMPNAME ------- SALESMAN 0102 0201 SECRETARY SYS.
Optional Clauses Statements • • • • • • • • • • NOHEAD clause suppresses the printing of the column heading for a target-item or by-item. NOPRINT clause suppresses the printing of a target-item or by-item. PCT clause prints a percentage for a target-item or by-item. SUBFOOTING clause prints a subfooting for a report. SUPPRESS clause defines a condition that prevents specific records from printing in a report. SUBTOTAL clause prints a subtotal for a target-item within each by-item.
OPEN Statement Statements OPEN Statement The OPEN statement accesses the dictionary record description. The syntax of the OPEN statement is: OPEN { record-name } { record-name2 [ AS ] COPY [ OF ] record-name1 }, ... [ ; ] record-name and record-name1 are the names of dictionary record descriptions. record-name2 is a name that you supply for the copy of record-name1. record-name2 can be the name of a dictionary record description.
PARAM Statement Statements PARAM Statement The PARAM statement allows you to name and define a parameter that can receive a value from a TACL PARAM command. The syntax of the PARAM statement is: PARAM { param-name [ INTERNAL internal-format ] } , ... [ ; ] param-name is the name of the parameter being defined. The name must conform to the naming conventions described under Rules for Naming User-Defined Elements on page 3-6. internal-format is the internal format for storing the parameter.
How Enform Plus Handles Parameters Statements PARAM reptnum I3; TITLE "REPORT ", (reptnum); OPEN parts; LIST parts; Notice that reptnum is enclosed in parentheses when specified in the TITLE statement. To provide a value for reptnum, enter the following TACL PARAM command: nn> PARAM reptnum 333 If you then specify the ENFORM command: nn> ENFORM /IN rept,OUT $s/ the resulting report is: REPORT 333 Part Number -----212 244 1403 ...
SET Statement Statements SET Statement The SET statement allows you to initialize or reset a user variable, user table, or a parameter. The SET statement also allows you to reset option variables.
Redefining Option Variables Statements the following example, the user variable u-var is defined as numeric by the DECLARE statement and set to the value of 99 by the SET statement: DECLARE u-var INTERNAL I2; SET u-var TO 99; The SET statement can initialize a user table. An unsigned numeric integer subscript must be used.
SUBFOOTING Statement Statements SUBFOOTING Statement The SUBFOOTING statement allows you to specify a subfooting to be printed at the bottom of each report page for all reports in the current session unless overridden or reset by another SUBFOOTING statement or temporarily overridden by a SUBFOOTING clause. See the SUBFOOTING Clause on page 5-59.
Subfooting for Current Report or All Reports Statements variable @VSPACE. In the following example, the SKIP clause of the SUBFOOTING statement causes the subfooting to print on two lines: SUBFOOTING "Report 2-A" SKIP "Total Sales"; The following subfooting will appear at the bottom of the next report that is generated without a LIST statement SUBFOOTING clause. Report 2-A Total Sales By using the FORM clause within a SUBFOOTING statement, you can force a new page.
SUBTITLE Statement Statements SUBTITLE Statement The SUBTITLE statement allows you to specify a subtitle for all subsequent reports in the current session. The subtitle is printed at the top of each page immediately following the title. The SUBTITLE statement can be overridden or reset by another SUBTITLE statement or temporarily overridden by a SUBTITLE clause.
Subtitle for Current Report or All Reports Statements SUBTITLE "Report 2-A" SKIP "Total Sales"; Report 2-A Total Sales By using the FORM clause within a SUBTITLE statement, you can force a new page. Enform Plus prints the remainder of the SUBTITLE print-list, starting at the top of the next physical page. The page number remains the same. A single logical page can span multiple physical pages such that a SUBTITLE can appear on one page, the data on the next, and a FOOTING on the next.
TITLE Statement Statements TITLE Statement The TITLE statement allows you to specify a title to be printed the top of each page for all subsequent reports in the current session unless canceled or reset by another TITLE statement or temporarily overridden by a TITLE clause. (See the TITLE Clause on page 5-69.) The syntax of the TITLE statement is: TITLE [ print-list [ CENTER ] ] [ ; ] print-list can be any combination of literals, FORM, SKIP, SPACE or TAB clauses.
Title for Current Report or All Reports Statements TITLE "Report 2-A" SKIP "Total Sales"; Report 2-A Total Sales By using the FORM clause within a TITLE statement, you can force a new page. The remainder of the TITLE print-list is printed, starting at the top of the next physical page. The page number remains the same. A single logical page can span multiple physical pages such that a TITLE can appear on one page, the data on the next, and a FOOTING on the next.
5 Clauses This section describes the syntax of the Enform Plus clauses. The clauses are specified in alphabetic order. Enform Plus clauses are components of statements. They provide additional specifications of the Enform Plus program to be performed. Most of the Enform Plus clauses remain in effect only for the query associated with the LIST or FIND statement of which they are a part.
Clauses Table 5-1. Enform Plus Clauses and Their Functions (page 2 of 3) Calculating Running Total, Total, Subtotal, and Percentage Clause Function CUM Prints a running total for a numeric target-item. The CUM OVER clause prints the running group total for a numeric target-item. PCT Prints the value of the percentage of the grand total for a numeric target-item. The PCT OVER clause prints the percentage that each grouped value represents of the total of all values in the group.
Clauses Table 5-1. Enform Plus Clauses and Their Functions (page 3 of 3) Converting Data to Internal or Display Format Clause Function AS Specifies the display format for printing a target-item or by-item. AS DATE Specifies the display format for printing a date. AS TIME Specifies the display format for printing a time. INTERNAL Specifies the storage format for a user-defined element. JULIAN-DATE Translates date information to internal format.
AFTER CHANGE Clause Clauses AFTER CHANGE Clause The AFTER CHANGE clause prints information preceding the records for each group for the current report. The AFTER CHANGE clause is an optional part of a LIST statement. The syntax of the AFTER CHANGE clause is: AFTER CHANGE [ ON ] by-item PRINT print-list [ CENTER ] by-item is the name of a field that has been grouped by a BY or BY DESC clause. print-list can contain any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Spacing Considerations Clauses If you specify either a SKIP clause or the slash symbol (/) within a print-list, Enform Plus advances one or more lines before printing the rest of the AFTER CHANGE print-list. The number of lines advanced can be affected by one or more of the following: the digit (if any) following the keyword SKIP, the number of slashes specified, or the option variable @VSPACE.
ASCD and DESC Clauses Clauses ASCD and DESC Clauses The ASCD and DESC clauses sort target-records, in ascending or descending order respectively, according to the value of the specified field. The syntax of the ASCD and DESC clauses is: { ASCD } target-item { DESC } target-item is the name of a field from an input record that serves as a sort key for the target records. The ASCD and DESC clauses do not group field values.
AS Clause Clauses AS Clause The AS clause specifies a display format for printing a target-item or by-item. The syntax of the AS clause is: { report-item AS [ nonrepeatable-edit-descriptors ] { repeatable-edit-descriptors { { report-item AS " "[" [ decorations, ... ] { [ modifiers, ... ] "]" { repeatable-edit-descriptors " { { report-item AS " "[" [ decorations, ... ] { [ modifiers, ...
AS Clause Clauses where w specifies the width of the report-item. m specifies the number of digits that appear to the left of the decimal for fixed-point values and the minimum number of digits for integer values d specifies the number of digits to the right of the decimal. mask is a combination of the characters 9, Z, V, . (period) and literals. The combination must be enclosed within apostrophes (‘ ’) or greater-than and less-than symbols (< >).
Repeatable Edit Descriptors Clauses "["modifiers"]" alter the effect of the edit descriptors as follows: BN, BZ prints blanks for null or zero values, respectively. FL char specifies a substitute fill character. OC char respecifies the overflow character. LJ, RJ specifies right or left justification. SS pr-of-symbols allows substitution of symbols. where char is an ASCII character enclosed in apostrophes.
Repeatable Edit Descriptors Clauses Alphanumeric Edit Descriptor The alphanumeric edit descriptor specifies the target-item or by-item is to be printed using alphanumeric display format. The syntax is: A[w] w is an unsigned integer that specifies the width in characters of the value of the target-item or by-item to be printed. The maximum value for w is 255 characters. If you specify w, Enform Plus prints the number of characters specified for the value of the target-item or by-item.
Repeatable Edit Descriptors Clauses Note that if the value to be printed is zero and you specify Iw.0, Enform Plus prints blanks. The following examples show the effect of the integer edit descriptor: Format -----I7 I7.2 I7.6 I7.6 Item Value ---------100 -1 100 -1 Printed Item -----------100 -01 000100 -000001 Fixed Format Edit Descriptor The fixed format edit descriptor specifies a fixed-point display format. The syntax is: Fw.d[.
Repeatable Edit Descriptors Clauses Mask Edit Descriptor The mask edit descriptor specifies a display format according to a template. The syntax is as follows: M mask mask is a set of symbols or characters enclosed within quotation marks (“ ”), apostrophes (‘ ’), or angle brackets (< >). The symbols in a mask that serve a special function are: Z is a digit selector. Z specifies that if no digit exists, zeros are suppressed. Z can be used with alphanumeric or numeric data.
Nonrepeatable Edit Descriptors Clauses zeros are displayed to the right of the decimal point (the mask does not change the integer format). If cost were declared as INTERNAL F4.2, and appeared in the query as: LIST (cost) AS M<99>, ... the value of cost would be displayed without the digits to the right of the decimal point. More information on scale appears under Aggregates on page 3-11 and Arithmetic Expressions on page 3-21.
Nonrepeatable Edit Descriptors Clauses • • Scale factor edit descriptor Optional plus sign edit descriptor Scale Factor Edit Descriptor The scale factor edit descriptor specifies a scale of 10**n for a fixed-point (F) number. The value printed equals the internally represented number multiplied by 10**n. The syntax is: nP n is the exponent for the scale factor (10**n). P is the implied decimal point of the number.
Modifiers Clauses The following examples show the effect of the optional plus edit descriptor: Format -----"SP F10.2" F10.2 "SP F10.2" "SP F10.2" Item Value ---------123.00 123.00 -123.00 000.00 Printed Item -----------+123.00 123.00 -123.00 .00 Modifiers Modifiers alter the normal effect of edit descriptors. A modifier must immediately precede the edit descriptor it modifies. Modifiers are enclosed within brackets ([ ]) and separated by commas.
Modifiers Clauses The following examples show the effect of the field blanking modifiers: Format -----"[BZ] F10.2" "[BN] F10.2" "[BN] F10.2" Item Value ---------.00 null value 100.00 Printed Item -----------100.00 Fill Character Modifier The fill character modifier specifies the fill character that is used in the current display format. The default fill character is a blank. The syntax is: FL char char is a single ASCII character enclosed within apostrophes (‘ ’).
Modifiers Clauses If you want to change the default overflow character for all display formats in the current session, use the @OVERFLOW option variable described under Option Variable Clauses on page 5-48. The following examples show the effect of the overflow character modifier: Format -----"[OC'!'] I2" "[OC'!'] F5.2" Item Value ---------100 100000.
Decorations Clauses pair-of-symbols are the standard and substitute symbols enclosed within apostrophes (‘ ’). The standard symbol must appear first, followed by the substitute symbol. The symbol substitution modifier allows you to replace the standard symbols used in edit descriptors. You can change the symbols for 9, Z, V, ., and , in the mask (M) edit descriptor or change the symbol for decimal point (.) in the fixed-point (F) edit descriptor.
Decorations Clauses location is one of the following: An Absolute position n F Floating P Prior char-string is one or more alphanumeric characters enclosed within apostrophes (‘ ’). The following rules apply to decorations: • • • • Separate multiple decorations by commas. Enclose decorations in brackets along with any modifiers. Specify decorations immediately before the edit descriptor they modify. Enclose decorations and the edit descriptors they modify in quotation marks (“ ”).
Decorations Clauses position for left-justified values. The data values are shifted an appropriate number of positions. Processing Order Enform Plus processes decorations in the following order: 1. The data is tested to determine if it has a null value. 2. The data is tested to determine if it has a positive, negative, or zero value. 3. If the P location decoration is specified, the character string is added to the item value. 4.
Decorations Clauses PP char-string if value is positive, print char-string immediately to the right of value. ZAn char-string if value is zero, print char-string in position n. ZF char-string if value is zero, print char-string immediately to the left of right-justified value, immediately to the right of left-justified value. ZP char-string if value is zero, print char-string immediately to the right of value. OAn char-string if overflow condition occurs, print char-string in position n.
AS DATE Clause Clauses AS DATE Clause The AS DATE clause allows you to specify the display format for printing a date. The syntax of the AS DATE clause is: date-in-internal-format AS DATE { * } { display-format } date-in-internal-format is the name of a variable or field that contains a date in internal format. The option variable @DATE can be specified to give the current date in internal format. * specifies the default display format.
Examples of Date Display Formats Clauses Examples of Date Display Formats These date keywords produce the following: MA JANUARY,FEBRUARY,...,DECEMBER MA3 JAN,FEB,...,DEC M2 01,02,...,12 M 1,2,...,12 MB2 1, 2,...,12 DA MONDAY,TUESDAY,...,SUNDAY DA3 MON,TUE,...,SUN D2 01,02,...,31 DB2 1, 2,...,31 D3 001,002,...,366 DB3 1, DOB2 1ST, 2ND, ... 31ST DAO FIRST, SECOND, ... ,THIRTY-FIRST Y2 00,01, ...,96,97,98... YB2 0, 1, ...,96,97,98... Y4 1900,1901,...,1998,1999,2000 2,...
AS TIME Clause Clauses AS TIME Clause The AS TIME clause allows you to specify the display format for printing a time. The syntax of the AS TIME clause is: time-in-internal-format AS TIME { * } { display-format } time-in-internal-format is the name of a variable or field that contains a time in internal format. * specifies the default display format, which specifies the hour, minute, and second as HP2:M2:S2 (see the following description of display-format).
Examples of the Time Display Format Clauses Examples of the Time Display Format These time keywords produce the following: HB2 1, 2,....,24 HP2 01,02,....,12 HPB2 1, 2,....,12 M2 00,01,....,59 MB2 0, 1,....,59 S2 00,01,....,59 SB2 0, 1,....
AT END PRINT Clause Clauses AT END PRINT Clause The AT END PRINT clause prints information at the end of the current report. This clause is an optional part of the LIST statement. The syntax of the AT END PRINT clause is: AT END PRINT print-list [ CENTER ] print-list can contain any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Clauses AT END Information for Current Report or All Reports By using the FORM clause within the print-list, you can cause Enform Plus to start a new page, increment the page number, and continue with the rest of the printlist. By using the CENTER clause following the print-list, you can center the information on the page. The CENTER, Option Variable, SKIP, SPACE, and TAB clauses are described in this section.
AT START PRINT Clause Clauses AT START PRINT Clause The AT START PRINT clause allows you to specify information to be printed just before the first set of column headings for the current report. This clause is an optional part of the LIST statement. The syntax of the AT START PRINT clause is: AT START PRINT print-list [ CENTER ] print-list can contain any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Clauses AT START Information for Current Report or All Reports following the keyword SKIP, the number of slashes specified, or the option variable @VSPACE. In the following example, the SKIP clause causes two lines to be printed: AT START PRINT "End of Report for" SKIP "Region " regnum, End of Report for Region 1 By using the FORM clause within a print-list, you can cause Enform Plus to start a new page, increment the page number, and continue with the rest of the print-list.
BEFORE CHANGE Clause Clauses BEFORE CHANGE Clause The BEFORE CHANGE clause allows you to specify information to be printed following the records for each group for the current report. The BEFORE CHANGE clause is an optional part of the LIST statement. The syntax of the BEFORE CHANGE clause is: BEFORE CHANGE [ ON ] by-item PRINT print-list [ CENTER ] by-item is the name of a field grouped by a BY or BY DESC clause. print-list can contain any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Spacing Considerations Clauses BEFORE CHANGE ON ordernum PRINT "*****" SPACE 5 "Orders for " ordernum, ***** Orders for 122 If you specify either a SKIP clause or the symbol / (slash) within a print-list, Enform Plus advances one or more lines before printing the rest of the BEFORE CHANGE print-list. The number of lines advanced can be affected by one or more of the following: the digit (if any) following the keyword SKIP, the number of slashes specified, or the option variable @VSPACE.
BY and BY DESC Clauses Clauses BY and BY DESC Clauses The BY and BY DESC clauses group and sort target-records according to the value of a specified field. The syntax of the BY and BY DESC clauses is: { BY } by-item { BY DESC } by-item is the name of a field from an input record whose values are to be used to group and sort target-records. BY and BY DESC clauses group and sort records according to the field values.
CENTER Clause Clauses CENTER Clause The CENTER clause centers an object within its context. The syntax of the CENTER clause is: { { target-item } CENTER , } { { by-item } } { } { CENTER ALL, } target-item is a record name, a field name, a string literal, a predefined aggregate, a user aggregate, an arithmetic expression, an IF/THEN/ELSE expression, a user variable, or a System Variable clause. by-item is the name of a field grouped by a BY or BY DESC clause.
CUM Clause Clauses CUM Clause The CUM clause allows you to specify printing of a running total for a numeric target-item either for all the instances of the target-item or for the instances of the target-item grouped within the each value of a by-item.
CUM Clause Used With User Variable Clauses CUM Clause Used With User Variable When a numeric target-item with a CUM clause is assigned to a user variable, Enform Plus assigns the value to the user variable first, before the running total is calculated. When the user variable is referenced as a target-item element in a LIST statement or as an element within a LIST target-item, Enform Plus uses the value of the user variable.
FOOTING Clause Clauses FOOTING Clause The FOOTING clause allows you to specify information for printing at the bottom of each page for the current report. This clause is an optional part of the LIST statement. The syntax of the FOOTING clause is: FOOTING print-list [ CENTER ] print-list can be any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Footing for Current Report or All Reports Clauses The following footing is printed on the next report: Report 2-A Total Sales To force a new page, use a FORM clause within the FOOTING statement. Printing continues with the remainder of the FOOTING print-list, starting at the top of the next physical page. The page number remains the same. A single logical page can span multiple physical pages, such that a TITLE can appear on one page, the data on the next, and a FOOTING on the next.
FORM Clause Clauses FORM Clause The FORM clause allows you to control when to skip to a new page. The syntax of the FORM clause is: FORM [ number ] number is an unsigned integer. FORM Clause With a By-Item When the FORM clause follows a field name that has been grouped with a BY or BY DESC clause, Enform Plus starts a new page whenever the field value changes. If number is specified, Enform Plus starts a new page only if there are fewer than that number of lines remaining on the current page.
HEADING Clause Clauses HEADING Clause The HEADING clause allows you to override the default column title for a targetitem or by-item in a report. The HEADING clause also allows you to define a column title for target-items, such as arithmetic expressions, that do not have a default column title.
Heading for Subscripted Elements Clauses a number sign (#), causing Region and Number to print on two lines, and the symbol / inside the print list is printed between Branch and Number: SET @NEWLINE TO "#"; LIST regnum HEADING "Region#Number", branchnum HEADING "Branch/Number"/; Region Number -----1 1 Branch/Number ------------1 2 Notice that when the / symbol appears outside of the heading clause, it causes Enform Plus to advance one line before printing the next target-item.
Clauses Heading for Subscripted Elements Remember the default heading for a field name is either the heading declared in the dictionary or, if no heading is so declared, the field name. The default heading for a user variable is either the heading defined in the DECLARE statement, or if no heading is defined, the user variable name.
INTERNAL Clause Clauses INTERNAL Clause The INTERNAL clause allows you to specify the storage format for a user-defined element. The syntax of the INTERNAL clause is: INTERNAL internal-format internal-format is the format for storing the user-defined element. Internal-format can be: An Alphanumeric; n is the length In Integer; n is the length Fw.d Fixed; w is the number of digits and d is the number of decimal places The optional INTERNAL clause can appear in a PARAM or DECLARE statement.
"JULIAN-DATE Conversion Clause Clauses " JULIAN-DATE Conversion Clause The JULIAN-DATE Conversion clause allows you to specify translation of a date target-item into internal format. The syntax for the JULIAN-DATE Conversion clause is: JULIAN-DATE ( year , month , day ) year is the year in 4 digits. month is the month in 2 digits, in the range 1-12. day is the day in 2 digits, in the range 1-31. Dates are a common part of database records.
Display Format Clauses Alternatively, convert the date to an integer that can be formatted with an AS clause. For example: date AS M<99-99-9999> To convert a date stored as a yearly Julian date, where the day of the year is relative to January 1 of that year, define each part of the date: 05 yearly-julian-date. 10 day-of-year PIC "999". 10 current-year PIC "9999".
NOHEAD Clause Clauses NOHEAD Clause The NOHEAD clause allows you to specify suppression of the printing of the column heading of a target-item or by-item. The syntax of the NOHEAD clause is: { { target-item } NOHEAD } { { by-item } } { } { NOHEAD ALL } target-item is a record name, a field name, a numeric literal, a predefined aggregate, a user aggregate, an arithmetic expression, an IF/THEN/ELSE expression, a user table name, a user variable, a System Variable clause, or a JULIAN-DATE clause.
NOPRINT Clause Clauses NOPRINT Clause The NOPRINT clause allows you to specify suppression of the printing of a targetitem or by-item and its associated column heading.
Suppress All Report Items Clauses within that statement. Title and summary information, using AT END, AT START, FOOTING, SUBFOOTING, SUBTITLE, TITLE statements and clauses, and AFTER CHANGE and BEFORE CHANGE clauses still appear in the report. This strategy is useful for reports where only summary information is desired.
Option Variable Clauses Clauses Option Variable Clauses The Option Variable clauses allow you to redefine the default values for several operational variables. See the SET Statement on page 4-41.
Option Variable Clauses Clauses display-format specifies the default format for printing dates or times when AS DATE * and AS TIME * clauses are used; it must be enclosed in quotation marks. @BLANK-WHEN-ZERO When set ON, Enform Plus suppresses the printing of target-item or by-item values of zero in reports. When set OFF, zeros are printed. The default is OFF.
Option Variable Clauses Clauses This condition does not mean an Enform Plus session that meets criteria for level 2 will always take less time to run than another Enform Plus session that requires level 7. The execution time also depends on the amount of data that must be processed. When not set or set to 0 (zero), Enform Plus proceeds with whatever strategy it chooses. If the specified strategy is exceeded, an error message is received and the Enform Plus program stops.
Option Variable Clauses Clauses To reset the display count so that the entire Enform Plus program is printed, enter zero for number. Specifying @DISPLAY-COUNT when using an Enform Plus server (described in the Enform Plus User's Guide) is inadvisable. The default value is zero. @HEADING When set ON, Enform Plus prints column headings in the report. When set OFF, Enform Plus does not print headings. OFF is equivalent to NOHEAD ALL for every report. The default is ON.
Option Variable Clauses Clauses creating a file system error 43 unable to obtain disc space for file extent; or the estimate could be too small, producing more data than the file can hold. Each time an output file is full, Enform Plus must create a new output file, with a larger extent size, and copy the data from the full file into the new file. This strategy results in very inefficient processing. @READS specifies the maximum number of records to be returned from the database per Enform Plus program.
Option Variable Clauses Clauses not fit in the column, Enform Plus truncates it on the right. The character string can consist of 1 to 15 ASCII characters, enclosed within quotation marks. The default value is an asterisk (*). @SUMMARY-ONLY causes a summary report to be produced. See the explanation of summary reports found with the LIST and FIND statements in Section 4, Statements. The default value is OFF. @TARGET-RECORDS specifies the maximum number of records to be selected per Enform Plus program.
PCT Clause Clauses PCT Clause The PCT clause prints the percentage of the grand total for a numeric target-item, based either on a total figure for all instances of the target-item or a total for the instances of the target-item grouped over a by-item.
Combining Percentages and Subtotals Clauses LOCATION -------H76 H57 ... Part Number ------ PRICE --------- PCT PRICE --------- 3102 7301 2402 3103 ... 4800.00 2400.06 7500.00 10500.00 ... 66.67 33.33 41.67 58.33 ... Combining Percentages and Subtotals The SUBTOTAL OVER clause can be combined with the PCT OVER clause, causing Enform Plus to print the percentage the subtotal represents of the total value of the target-item. Enform Plus does not print the value of each target-item.
SKIP Clause Clauses SKIP Clause The SKIP clause allows you to indicate the number of lines Enform Plus should move forward before continuing printing. The syntax of the SKIP clause is: SKIP [ number ] number is an integer representing the number of lines to skip. Sometimes it is desirable to print more than one target-item under the same column heading.
SKIP Clause With a Print List Clauses BEFORE CHANGE clause. When number is specified, Enform Plus moves forward the specified number of lines every time the SKIP clause is processed. When number is not specified, Enform Plus moves forward to the next line when the SKIP clause is processed.
SPACE Clause Clauses SPACE Clause The SPACE clause allows you to specify horizontal spacing. The syntax of the SPACE clause is: SPACE [ number ] number is an integer. SPACE Clause With a LIST Target-Item or By-Item The SPACE clause can precede either a target-item or a by-item within a LIST statement. When number is specified, Enform Plus inserts the specified number of spaces every time the SPACE clause is processed. When number is not specified, one space is inserted.
SUBFOOTING Clause Clauses SUBFOOTING Clause The SUBFOOTING clause allows you to specify printing of information at the bottom of each page preceding the footing for the current report. This clause is an optional part of the LIST statement. The syntax of the SUBFOOTING clause is: SUBFOOTING print-list [ CENTER ] print-list contains any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Clauses Subfooting for Current Report or All Reports The following subfooting prints on the current report: Report 2-A Total Sales Using the FORM clause within a SUBFOOTING print-list forces a new page. Enform Plus continues printing the remainder of the SUBFOOTING print-list, starting at the top of the next physical page. The page number remains the same. A single logical page can span multiple physical pages, so that a TITLE can appear on one page, the data on the next, and a SUBFOOTING on the next.
SUBTITLE Clause Clauses SUBTITLE Clause The SUBTITLE clause allows you to specify printing of information at the top of each page immediately following the title for the current report. This clause is an optional part of the LIST statement. See also the TITLE Clause on page 5-69 and the SUBTITLE Statement on page 4-45. The syntax of the SUBTITLE clause is: SUBTITLE print-list [ CENTER ] print-list contains any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Subtitle for Current Report or All Reports Clauses SUBTITLE "Report 2-A" SKIP "Total Sales", Report 2-A Total Sales Using the FORM clause within the print-list causes Enform Plus to start a new page. Enform Plus continues with the remainder of the print-list starting at the top of the next physical page. The page number remains the same. Using the CENTER clause centers the subtitle on the page. The CENTER, Option Variable, SKIP, SPACE, and TAB clauses are described in this section.
SUBTOTAL Clause Clauses SUBTOTAL Clause The SUBTOTAL clause allows you to specify the printing of a subtotal for a numeric target-item. This clause is an optional part of the LIST statement. The syntax for the SUBTOTAL clause is: target-item SUBTOTAL [ OVER by-item ] target-item is a record name, a field name, a numeric literal, a predefined aggregate, a user aggregate, an arithmetic expression, an IF/THEN/ELSE expression, a user table name, a user variable, or a System Variable clause.
SUPPRESS Clause Clauses SUPPRESS Clause The SUPPRESS clause allows you to eliminate certain records from being printed in the report. The records still contribute to the report calculations. This clause is an optional part of the part of the LIST statement. This clause cannot be used with the FIND statement. The syntax of the SUPPRESS clause is: SUPPRESS [ WHERE ] logical-expression logical-expression is an expression returning a true or false value.
System Variable Clauses Clauses System Variable Clauses The System Variable clauses allow you to obtain the current value for the current date, time, line number, and page number. The syntax for the System Variable clauses is: @DATE @TIME @LINENO @PAGENO Printing the Current Date or Time The @DATE and @TIME System Variable clauses return the current date and time in internal format. When used in an expression, Enform Plus treats them as numeric literals.
TAB Clause Clauses TAB Clause The TAB clause allows you to specify in which column in the report a target-item or by-item is to begin. This clause is an optional part of the LIST statement and must not be specified in the FIND statement. The syntax of the TAB clause is: TAB [ number ] number is an integer. The TAB clause specifies the column to which to tab before printing an element on a report. Care must be taken not to overlap elements.
TIMESTAMP-DATE Clause Clauses TIMESTAMP-DATE Clause The TIMESTAMP-DATE clause extracts the date portion of a timestamp field that has been created by the Guardian procedure TIMESTAMP. The syntax of the TIMESTAMPDATE clause is: TIMESTAMP-DATE ( field-name ) field-name is the name of a field to which the TIMESTAMP-DATE clause returns a date value. The field must be described in the dictionary. You must define the field that receives the date value from the TIMESTAMP-DATE clause in your data dictionary.
TIMESTAMP-TIME Clause Clauses TIMESTAMP-TIME Clause The TIMESTAMP-TIME clause extracts the time portion of a timestamp field that has been created by the Guardian procedure TIMESTAMP. The syntax of the TIMESTAMPTIME clause is: TIMESTAMP-TIME ( field-name ) field-name is the name of a field to which a time value is returned. The field must be described in your data dictionary. Your data dictionary must contain a definition of the field to which the TIMESTAMPTIME clause returns a time value.
TITLE Clause Clauses TITLE Clause The TITLE clause allows you to specify printing of information at the top of each page for the current report. See also the SUBTITLE Clause on page 5-61 and the TITLE Statement on page 4-47. The syntax of the TITLE clause is: TITLE print-list [ CENTER ] print-list contains any combination of literals, FORM, SKIP, SPACE, or TAB clauses.
Title for Current Report or All Reports Clauses Using the FORM clause within a print-list causes Enform Plus to start a new page and continue with the rest of the print-list. The page number remains the same. A single logical page can span multiple physical pages such that a TITLE appears on one page, the data on the next, and a FOOTING on the next. The same page number applies to all physical pages in a logical page. Using the CENTER clause centers the title on the page.
TOTAL Clause Clauses TOTAL Clause The TOTAL clause prints the grand total for a numeric target-item. This clause is an optional part of the LIST statement and cannot be specified in a FIND statement. The syntax of the TOTAL clause is: { target-item } TOTAL { by-item } target-item is a record name, a field name, a numeric literal, a predefined aggregate, a user aggregate, an arithmetic expression, an IF/THEN/ELSE expression, a user table name, a user variable, or a System Variable clause.
WHERE Clause Clauses WHERE Clause The WHERE clause allows you to restrict the records that contribute to the target file. The syntax of the WHERE clause is: WHERE logical-expression logical-expression is a condition that returns a true or false value. See Logical Expressions on page 3-22 for more information. The logical expression in a WHERE clause defines which records are restricted from contributing to the target file.
6 Commands This section contains a complete description of the syntax of the Enform Plus commands. The commands are arranged in alphabetic order. Enform Plus commands are compiler directives that instruct the Enform Plus compiler/report writer to perform a specific operation. The compiler/report writer recognizes a command by the presence of a question mark in column 1. You can either enter commands at the level of the Enform Plus prompt (>) or place commands in an Edit-format file.
Commands Table 6-1. Summary of Commands (page 2 of 2) Command Function ?RUN Compiles and executes Enform Plus source queries in an Editformat file. ?SECTION Identifies a section of Enform Plus commands and statements within an Edit-format file. ?SHOW Displays information about the environment of the current Enform Plus session. ?SOURCE Reads an Edit-format file or a collection of commands and statements within an Edit-format file.
?ASSIGN Command Commands ?ASSIGN Command The ?ASSIGN command associates a physical file with a dictionary record description or a generic file. This command is functionally equivalent to the TACL ASSIGN command. The syntax of the ?ASSIGN command is: ?ASSIGN [ { record-name } [ , ] physical-file-name [ { generic-file-name } [ TO ] [ , create-open-spec ... ] ?ASSIGN record-name , { , create-open-spec } ... record-name is the name of a record description from a DDL dictionary.
?ASSIGN Command Commands { { { { { { extent-spec CODE file-code exclusion-spec access-spec REC record-size BLOCK block-size } } } } } } extent-spec is one of the following: { EXT [ ( ] pri-extent-size [ ) ] } { EXT ( [ pri-extent-size ] , sec-extent-size ) } exclusion-spec is one of the following: { EXCLUSIVE } { SHARED } { PROTECTED } access-spec is one of the following: { I-O } { INPUT } { OUTPUT } The ?ASSIGN command can be entered at any time prior to running a query.
?ASSIGN Command Commands The ?ASSIGN command can be used to assign the generic Enform Plus files to a physical device. In the following example, the generic file QUERY-COMPILERLISTING is assigned to a printing device named $ep: ?ASSIGN QUERY-COMPILER-LISTING TO $s.#ep The ?ASSIGN command can be used to change the exclusion specification for a file; the default is SHARED. If the DDL physical file name is not being overridden, only the record name and the exclusion specification need be specified.
?ATTACH Command Commands ?ATTACH Command The ?ATTACH command allows you to specify a query processor to use during an Enform Plus session. The syntax of the ?ATTACH command is: ?ATTACH [ process-name ] process-name is the name of a query processor. When one or more server query processors exist on a Compaq system, you can use the ?ATTACH command to specify the query processor you want to use. If you do not specify the ?ATTACH command, Enform Plus defaults to a dedicated query processor.
?COMPILE Command Commands ?COMPILE Command The ?COMPILE command compiles a query and stores it in a physical file. The syntax of the ?COMPILE command is: ?COMPILE edit-filename [ ( section-name , ... ) ] TO compiled-physical-filename edit-filename is the name of the Edit-format file containing the Enform Plus query. ( section-name , ... ) is a list of the names of the section(s) within an Edit-format file. The list must be enclosed within parentheses.
?DICTIONARY Command Commands ?DICTIONARY Command The ?DICTIONARY command names a subvolume that contains your dictionary. It also clears the internal table and reclaims table space. The ?DICTIONARY command is the same as the DICTIONARY statement. ?DICTIONARY [ dict-subvol-name ] dict-subvol-name is the name of the subvolume where your dictionary files reside. See the Guardian Programmer's Guide for information on specifying Guardian file names.
?EDIT Command Commands ?EDIT Command The ?EDIT command allows you to access the Editor without leaving Enform Plus. The syntax of the ?EDIT command is: ?EDIT [ edit-filename ] edit-filename is the name of an Edit-format file. A query can be stored in an Edit-format file. The Edit-format file can be created or changed without leaving Enform Plus. An ?EDIT command invokes the Editor and operates just as if the TACL EDIT command was used.
?EXECUTE Command Commands ?EXECUTE Command The ?EXECUTE command executes a compiled query file. The syntax of the ?EXECUTE command is: ?EXECUTE compiled-physical-filename compiled-physical-filename is the name of the physical file containing the stored compiled query. The ?EXECUTE command resets the internal table to the same state that existed at time of compilation. The ?EXECUTE command changes the dictionary being used for the duration of the execution.
?EXIT Command Commands ?EXIT Command The ?EXIT command terminates the current Enform Plus session. The syntax of the ?EXIT command is: ?EXIT The ?EXIT command returns control to TACL. It is the same as the EXIT statement. An alternative way of exiting from Enform Plus is to press the Ctrl and Y keys simultaneously.
?HELP Command Commands ?HELP Command The ?HELP command displays information about the syntax of the Enform Plus language. The command can also display information about user-defined topics if your system manager has provided this information. The syntax of the ?HELP command is: ?HELP [ help-element ] help-element is a topic for which help is available. Among these topics is the syntax of the Enform Plus statements, clauses, commands, and language elements.
?HELP Command Commands In the following example, Enform Plus displays information about a target item when you enter ?HELP target-item: >?HELP target-item A target-item is a record name, a field name, a literal, a user variable name, a parameter name, a system variable clause, an aggregate, or an arithmetic expression. Help is also available for SYSTEM VARIABLE, AGGREGATE, and ARITHMETIC EXPRESSION.
?OUT Command Commands ?OUT Command The ?OUT command specifies the output device for a report. The syntax of the ?OUT command is: ?OUT [ physical-filename ] physical-filename is the name of the output device to which any subsequent report is directed. The ?OUT command is used to name the physical device on which a report is printed. The physical device can be a printing device such as such as $mlp. The physical device can also be a file name.
?RUN Command Commands ?RUN Command The ?RUN command executes one or more queries stored in an Edit-format file. The syntax of the ?RUN command is: ?RUN [ edit-filename [ ( section-name , ... ) ] edit-filename is the name of the Edit-format file containing the Enform Plus source query. ( section-name , ...) is a list of the names of one or more sections of the Edit-format file. A sectionname must be enclosed within parentheses.
?SECTION Command Commands ?SECTION Command The ?SECTION command names a collection of Enform Plus commands and statements within an Edit-format file. The syntax of the ?SECTION command is: ?SECTION section-name section-name is the name to be used for a collection of Enform Plus commands and/or statements within an Edit-format file. The ?SECTION command names a collection of Enform Plus commands and/or statements within an Edit-format file.
?SHOW Command Commands ?SHOW Command The ?SHOW command displays information about the environment of the current Enform Plus session. The syntax of the ?SHOW command is: [ [ [ ?SHOW [ [ [ [ [ OPEN ] LINK ] CONTROL ] LIMITS ] ASSIGN [ record-name ] ] user-variable-name ] record-name ] param-name ] user-variable-name is the name of a user variable. record-name is the name of an opened dictionary record description. param-name is the name of a parameter.
?SHOW Command Commands Table 6-2. Information Displayed by the ?SHOW Command (page 2 of 2) Command Display Message ?SHOW CONTROL Displays the current values of all of the option variables. Option variables can be changed by setting the Option Variable clauses. See the SET Statement on page 4-41 and the Option Variable Clauses on page 5-48. ?SHOW LIMITS Displays the current space available for the symbol table, literals and formats, LINK table, PRINT table, PARAM table, and OVER clause table.
?SOURCE Command Commands ?SOURCE Command The ?SOURCE command reads an Edit-format file or a collection of commands and statements within an Edit-format file. The syntax of the ?SOURCE command is: ?SOURCE edit-filename [ ( section-name , ... ) ] edit-filename is the name of the Edit-format file containing an Enform Plus query. ( section-name , ...) is a list of the names of the sections of the Edit-format file; section-name must be enclosed with parentheses.
?SOURCE Command Commands Enform Plus Reference Manual—422684-001 6- 20
A Enform Plus Syntax Summary This appendix summarizes the Enform Plus syntax. For specific details of the syntax, see Section 3, Enform Plus Language Elements; Section 4, Statements; Section 5, Clauses; and Section 6, Commands.
Statements Enform Plus Syntax Summary Logical Expression: [NOT] condition [ { AND | OR } ] [NOT] condition ] ...
Statements Enform Plus Syntax Summary DICTIONARY [ dict-subvol-name ] EXIT [ ; ] FIND [ UNIQUE ] output-record-name { { BY by-item { { BY DESC by-item ( { [ output-field-name := ] { target-item { { ASCD target-item { { DESC target-item } } } } } } } } , ...
Statements Enform Plus Syntax Summary { { { { { { { { { { { { { LIST [ UNIQUE ] { { { { { { { { { { { { { { { { { { { BY by item BY DESC by-item target-item ASCD target-item DESC target-item user-var-name := target-item [ [ [ [ [ [ [ [ [ [ [ [ [ [ } } } } } } } } } } } } } CUM [ OVER ALL ] ] } CUM OVER by-item ] } PCT [ OVER ALL ] ] } PCT OVER by-item ] } TOTAL ] } SUBTOTAL ] } SUBTOTAL OVER by-item ] , ... } , ...
Clauses Enform Plus Syntax Summary OPEN { record-name } { record-name2 [ AS ] COPY [ OF ] record-name1 }, ... [ ; ] PARAM { param-name [ INTERNAL internal-format ] }, ...
Clauses Enform Plus Syntax Summary nonrepeatable-edit-descriptors specify some general ways report-items are to be printed. nonrepeatable-edit-descriptors should not be specified without a repeatable-edit-descriptor. Valid values for nonrepeatableedit-descriptors are: P multiplies value by 10**n; n is an integer. S, SP, SS control plus (+) sign printing. repeatable-edit-descriptors specify data conversion to the Guardian Formatter for printing the reportitem values.
Clauses Enform Plus Syntax Summary P add char-string if value is positive. Z add char-string if value is zero. O add char-string if overflow condition occurs. location is where the character string is to be printed: An indicates char-string is to be printed at absolute position n. F indicates char-string is to be inserted after the value is formatted. If condition is satisfied, char-string is printed immediately to the left of the item value.
Clauses Enform Plus Syntax Summary date-in-internal-format AS DATE { * } { display-format } time-in-internal-format AS TIME { * } { display-format } AT END PRINT print-list [ CENTER ] AT START PRINT print-list [ CENTER ] BEFORE CHANGE [ ON ] by-item PRINT print-list [ CENTER ] { BY } by-item { BY DESC } { { target-item } CENTER , } { { by-item } } { } { CENTER ALL, } target-item CUM [ OVER ALL ] [ OVER by-item ] FOOTING print-list [ CENTER ] FORM [ number ] { by-item } HEADING "heading-string" { target-
Clauses Enform Plus Syntax Summary { { target-item } NOPRINT } { { by-item } } { } { NOPRINT ALL } The Option Variables and their valid values are as follows: { { { { { { { @BLANK-WHEN-ZERO @BREAK-KEY @CENTER-PAGE @HEADING @STATS @SUMMARY-ONLY @WARN } } } } TO BBC { ON } } { OFF } } } { { { { { { { { { { { { { @COPIES @COST-TOLERANCE @DISPLAY-COUNT @LINES @MARGIN @PAGES @PRIMARY-EXTENT-SIZE @SECONDARY-EXTENT-SIZE @READS @SPACE @TARGET-RECORDS @VSPACE @WIDTH { { { { { @DECIMAL @NEWLINE @NONPRINT-REP
Commands Enform Plus Syntax Summary SUBTITLE print-list [ CENTER ] target-item SUBTOTAL [ OVER by-item ] SUPPRESS [ WHERE ] logical-expression The System Variables are as follows: @DATE @TIME @LINENO @PAGENO TAB [ number ] TIMESTAMP-DATE ( field-name ) TIMESTAMP-TIME ( field-name ) TITLE print-list [ CENTER ] { target-item } TOTAL { by-item } WHERE logical-expression Commands ?ASSIGN [ { record-name } [ , ] physical-file-name [ { generic-file-name } [ TO ] [ , create-open-spec ...
Commands Enform Plus Syntax Summary ?COMPILE edit-filename [ ( section-name , ... ) ] TO compiled-physical-filename ?DICTIONARY [ dict-subvol-name ] ?EDIT [ edit-filename ] ?EXECUTE compiled-physical-filename ?EXIT ?HELP [ help-element ] ?OUT [ physical-filename ] ?RUN [ edit-filename [ ( section-name , ... ) ] ?SECTION section-name [ [ [ ?SHOW [ [ [ [ [ OPEN ] LINK ] CONTROL ] LIMITS ] ASSIGN [ record-name ] ] user-variable-name ] record-name ] param-name ] ?SOURCE edit-filename [ ( section-name , ...
Enform Plus Procedures Enform Plus Syntax Summary Enform Plus Procedures COBOL Procedures ENTER ENFORMSTART USING [ [ [ [ [ [ [ [ , , , , , , , , , , , ctlblock compiled-physical-filename buffer-length error-number restart-flag ] param-list ] assign-list ] process-name ] cpu ] priority ] timeout ] reserved-for-expansion ] !INT:ref !INT:ref !INT:value !INT:ref !INT:value !INT:ref !INT:ref !INT:ref !INT:value !INT:value !INT32:value !INT:ref ENTER ENFORMRECEIVE USING ctlblock, buffer [ GIVING count ] !
TAL Functions Enform Plus Syntax Summary TAL Functions CALL ENFORMSTART ( , , , [ [ [ [ [ [ [ [ ctlblock compiled-physical-filename buffer-length error-number , restart-flag ] , param-list ] , assign-list ] , process-name ] , cpu ] , priority ] , timeout ] , reserved-for-expansion ]) !INT:ref !INT:ref !INT:value !INT:ref !INT:value !INT:ref !INT:ref !INT:ref !INT:value !INT:value !INT32:value !INT:ref [ count := ] ENFORMRECEIVE ( ctlblock , buffer ) !INT:function INT:ref INT:ref ! ENFORMFINISH ( ctlblo
TAL Functions Enform Plus Syntax Summary Enform Plus Reference Manual—422684-001 A -14
B Error Messages This appendix documents the following types of messages: • • • • • • !!! ERROR error-number types: these indicate a serious error has occurred. Statement execution terminates. If this type of error occurs for a LIST or FIND statement, the query terminates. *** WARNING warning-number types: these point out an error that could change the expected results. The error does not abort the query although it could lead to more serious error conditions. *** FILE ERROR ...
Enform Plus Initialization Messages Error Messages Enform Plus Initialization Messages *** Current reserved word cannot be used to redefine another reserved word A reserved word redefinition in the ?VOCABULARY section of the message table contains an old reserved word where a new word is expected. (The key-sequenced message table file was not built by the BUILDMK utility or the file has been modified since it was built.
Error Messages Enform Plus Initialization Messages *** Message table must contain both ?MESSAGES and ?HELP sections Self-explanatory. Use the BUILDMK utility to build the key-sequenced message table file. *** Message table version number is not correct The version number in the message table does not match the version number expected by Enform Plus. Rebuild the key-sequenced message table file using the appropriate version of BUILDMK.
!!! Error and *** Warning Type Messages Error Messages !!! Error and *** Warning Type Messages !!! ERROR [26] Invalid use of range item A subscript range may be used as a target-item (but cannot be used when modified by a BY, BY DESC, ASCD, or DESC clause) only in a LIST or FIND statement. Its use is invalid in all other circumstances.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [32] Invalid SET-variable specification The “@” symbol is not followed by a valid string for an option variable name. !!! ERROR [33] Name not found A field name has been misspelled or the wrong dictionary is being used. !!! ERROR [34] Name not sufficiently qualified to avoid ambiguity Field name appears in more than one opened record description. Use more qualification.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [39] Too many references to user aggregates The total number of references to user aggregates exceeds 32. !!! ERROR [40] Multiply defined name The name already exists as a record name, user-defined item, or parameter name. !!! ERROR [41] The maximum target length of 2000 bytes was exceeded.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [46] Too many LINKs The number of links exceeds 32. Clear some links by using a DELINK statement. *** WARNING [47] Source line was truncated The line must be 255 characters or fewer. !!! ERROR [48] Only field names may appear in a qualification The item name in the WHERE or SUPPRESS clause has not been defined or is misspelled. This conidtion is usually due to an internal error.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [53] Invalid subscript range specification The subscript range specified ([x:y]) for an item is wrong. Subscripts must be numeric literals. The first number (x) must be smaller than the second number (y). !!! ERROR [54] Invalid AS format description The display format for AS, AS DATE, or AS TIME is invalid or the INTERNAL format is invalid.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [58] Illegal use of KEY item (SERVER-related failure on name) Record-name.KEY or KEY OF record-name is not allowed when the data for record-name is from an Enform Plus server (process file). !!! ERROR [59] Maximum read count exceeded Enform Plus has read the limit number of records specified by the @READS Option Variable clause.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [64] By-item not found Either the grouped item was not defined in a BY or BY DESC clause or was misspelled. !!! ERROR [65] An aggregate may not be used in a print-list clause Self-explanatory. !!! ERROR [66] Only one OPTIONAL LINK request allowed per LIST or FIND statement Only one link (regardless of whether it is OPTIONAL) can be used when OPTIONAL is specified.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [70] Nonnumeric item in arithmetic expression You used alphanumeric item in an Arithmetic Expression clause. !!! ERROR [71] The table containing literals, AS formats and headings has overflowed The literal table overflowed its maximum size of 5,915 words. !!! ERROR [72] Invalid occurrence number You attempted to subscript past the end of a table.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [77] A destination name must be specified An item in a FIND statement must be assigned to an output field name, because the “name-correspondence” rules are insufficient here. !!! ERROR [78] The attribute UNIQUE may not be used with an OVER clause UNIQUE can not be used with aggregates computed OVER a grouped-item. !!! ERROR [79] TAB 0, SKIP 0 or FORM 0 not defined The number must be greater than zero.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [84] Too many OVER clauses The number of AFTER CHANGE, BEFORE CHANGE, TOTAL, SUBTOTAL, CUM, or PCT clauses in the LIST statement exceeds 64. !!! ERROR [85] More than one PCT or CUM modifies list item Only one PCT or CUM clause is allowed per item. !!! ERROR [86] Server QP process has failed repeatedly Either the primary or the backup process for the Enform Plus query processor has failed more than 10 times.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [90] All field names referenced in a qualification aggregate must belong to the same record All fields in the expression being aggregated, the over-item, and the embedded WHERE clause must belong to the same record. *** WARNING [91] No report will be listed. The target list is composed of literals only An Enform Plus report will not print alphanumeric or numeric literals only.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [96] Invalid dictionary subvolume name An internal error has occurred. !!! ERROR [98] Insufficient memory available to OPEN record description An internal error has occurred. !!! ERROR [99] Multiply defined SECTION name A section name can appear only once in a ?COMPILE, ?RUN, or ?SOURCE command. !!! ERROR [100] Undefined SET variable A user-defined item or parameter used in a SET statement has not been defined yet.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [104] Output line would exceed buffer space Divide the output line in the LIST statement using SKIP or FORM clauses. !!! ERROR [105] SUBTOTAL, TOTAL, CUM, and PCT only modify numeric items Cannot use alphanumeric string items here. Numeric strings are allowed. !!! ERROR [106] Field or expression must be numeric Self-explanatory.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [112] Illegal dictionary description (SERVER-related failure on name) The dictionary description for an Enform Plus server (process file) must specify a file type of UNSTRUCTURED or no file type at all. !!! ERROR [113] An aggregate may not be used in this context with PCT Only the aggregates SUM and COUNT can be used with PCT and they must be used alone (not in an expression).
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [136] Page count exceeded Your report has produced more pages than the number specified for the @PAGES option variable. !!! ERROR [137] Invalid date specified The data being formatted with an AS DATE clause is not a valid date. !!! ERROR [138] Invalid time specified The data being formatted with an AS TIME clause is not a valid time.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [169] ?RUN command is ignored unless entered interactively The ?RUN command must be typed in at the terminal. !!! ERROR [170] Illegal value for this option variable Check the syntax of the Option Variable Clauses on page 5-48 for the values allowed.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR [177] Parameter is treated like a literal here. be changed Its value cannot In certain cases, Enform Plus treats a parameter exactly like a numeric literal. This means that you cannot change the value of the parameter at execution time, either with a TACL PARAM command or an Enform Plus SET statement. See the PARAM Statement on page 4-39 for more details.
!!! Error and *** Warning Type Messages Error Messages !!! ERROR (Messages not in expected order) The query processor received an unexpected message from the query compiler/report writer. If the query processor is running as a server in NonStop mode, this message might indicate failure of the primary process. Otherwise, this message indicates an error in the Enform Plus software.
*** File Error Type Messages Error Messages *** File Error Type Messages Enform Plus reports file management errors with *** FILE ERROR... messages. In the following messages, #file-error-number is a Guardian file management error number; name is the physical file name. *** FILE ERROR (Abnormal termination of Query Processor) Self-explanatory. *** FILE ERROR (Communication with Query Processor failed) #file-error-number on name Enform Plus lost communication with the query processor.
*** File Error Type Messages Error Messages *** FILE ERROR (Illegal list device) on name The listing device name is misspelled or the device does not exist. *** FILE ERROR (Illegal input device) on name The input file name or Edit-format file name is misspelled or the file does not exist. *** FILE ERROR (Not an Edit file) on name The file named is not an Edit-format file. *** FILE ERROR (OPEN failure) #file-error-number on name There was a problem opening the physical file.
*** File Error Type Messages Error Messages *** FILE ERROR (READ failure) #file-error-number on name Enform Plus could not read the physical file named. *** FILE ERROR (RENAME failure) on name There was a problem renaming the physical file. *** FILE ERROR (SERVER-related failure) # number on name There was a failure related to the use of an Enform Plus server (process file). The number and name are optional values supplied by the server instead of a standard Guardian file error and file name.
*** File Error Type Messages Error Messages *** FILE ERROR (Unable to position ENFORM message table) #file-error-number on name Enform Plus is unable to use the message table file. The session continues, but all messages contain “???” instead of text. *** FILE ERROR (Unable to read ENFORM message table) #file-error-number on name Enform Plus is unable to use the message table file. The session continues, but all messages contain “???” instead of text.
Enform Plus Trap Messages Error Messages Enform Plus Trap Messages ENFORM TRAP: nnn S: xxxxxx P: xxxxxx E: xxxxxx L: xxxxxx The Enform Plus Compiler/Report Writer process has failed. nnn is the trap number as described in the Guardian Programmer's Guide. xxxxxx are values in the hardware registers. ENFORM QP TRAP: nnn S:xxxxxx P: xxxxxx E: xxxxxx L: xxxxxx The Enform Plus Query Processor process has failed. nnn is the trap number as described in the Guardian Programmer's Guide.
BUILDMK Error Messages Error Messages ** ERROR Edit file contains ?HELP section but no ?MESSAGES section The Edit-format file version of the message table must contain a ?MESSAGES section if a ?HELP section is included. ** ERROR Edit file contains ?MESSAGES section but no ?HELP section The Edit-format file version of the message table must contain a ?HELP section if a ?MESSAGES section is included.
BUILDMK Error Messages Error Messages *** ERROR ?VOCABULARY section must redefine at least one reserved word Self-explanatory. **** ERROR Identifier must contain less than 32 characters Self-explanatory. *** ERROR In a reserved word redefinition, the old reserved word is missing Supply the old reserved word. *** FILE ERROR (EDITREAD read error) on name The indicated error occurred on the specified file during the execution of BUILDMK.
BUILDMK Error Messages Error Messages *** FILE ERROR (OPEN failure) #file-error-number on name The indicated file error occurred on name during the execution of BUILDMK. *** FILE ERROR (POSITION failure) #file-error-number on name The indicated file error occurred on name during the execution of BUILDMK. *** FILE ERROR (READ failure) #file-error-number on name The indicated file error occurred on name during the execution of BUILDMK.
BUILDMK Error Messages Error Messages Enform Plus Reference Manual—422684-001 B -30
C Links and the LINK OPTIONAL Statement Rules To fully understand the rules for the LINK OPTIONAL statement, you must first understand how Enform Plus defines links. This appendix describes how Enform Plus defines a link, reviews the rules for the LINK OPTIONAL statement, and provides some examples of invalid links.
Links Initiated by a LINK OPTIONAL Statement Links and the LINK OPTIONAL Statement Rules Links Initiated by a LINK OPTIONAL Statement A link initiated by a LINK OPTIONAL statement is a one-directional link. Therefore, a one-way dependency condition exists where the record occurrences associated with the record description on the right of the statement depend upon the record occurrences associated with the record description on the left of the statement.
Links and the LINK OPTIONAL Statement Rules Links Initiated by a WHERE Clause Each term in a WHERE clause can contain subterms connected by the Boolean operator OR. For example, consider the WHERE clause in the following query: OPEN fruit, peach; LIST ... WHERE fruit.fuzz = peach.fuzz OR fruit.color = "ORANGE"; The logical expression in this WHERE clause is also in conjunctive normal form. The single term in this WHERE clause is: fruit.fuzz = peach.fuzz OR fruit.
Links Initiated by a WHERE Clause Links and the LINK OPTIONAL Statement Rules The WHERE clause in the following query does not establish a link: OPEN apple, banana; LIST ... WHERE apple.color = "RED" AND banana.color = "YELLOW"; The converted form of this WHERE clause contains two terms: apple.color = “RED” first term AND banana.color = “YELLOW” second term Because neither term references two record descriptions, the WHERE clause does not establish a link.
Links Due to the Transitive Property of Links Links and the LINK OPTIONAL Statement Rules Links Due to the Transitive Property of Links The transitive property of links applies to both two-directional and one-directional links. For two-directional links, the transitive property is defined as: If A is linked to X and B is linked to X, then A is linked to B and B is linked to A. For one-directional links, A is linked to B if: A is optionally linked to X and X is linked to B.
Review of Rules for the LINK OPTIONAL Statement Links and the LINK OPTIONAL Statement Rules Under the transitive property of links, apple is linked optionally to orange, banana, and pear. The orange, banana, and pear are linked to each other. These links could be symbolically represented as: apple orange banana pear Note that apple is linked to orange, banana, and pear; but orange, banana, and pear are not linked to apple.
Links and the LINK OPTIONAL Statement Rules Examples of Invalid Links Examples of Invalid Links The following examples involve query specifications that use the sample data base shown in the Enform User's Guide. The purpose of these examples is to show invalid links, not to show useful queries. Each example includes a sketch of its links. The following symbols are used for the sketches: Represents a one-directional link initiated by a LINK OPTIONAL statement.
Links and the LINK OPTIONAL Statement Rules Examples of Invalid Links The preceding query specifications are effectively the same as the first query specifications. These specifications contain invalid links because the WHERE clause links order back to employee due to the transitive property of links.
Links and the LINK OPTIONAL Statement Rules Examples of Valid Links WHERE employee.regnum <> region.regnum OR employee.branchnum <> branch.branchnum; A sketch of these links appears as follows: employee region branch The links in this query are invalid because both region and branch appear on the right side of more than one LINK OPTIONAL statement. The WHERE clause establishes three two-directional links between employee, region, and branch.
Links and the LINK OPTIONAL Statement Rules Examples of Valid Links A sketch of these links appears as follows: employee region The link initiated by the WHERE clause might appear to violate rule 1. Remember, however, that when Enform Plus checks the validity of a link, a LINK OPTIONAL statement “cancels” any two-directional link between the same record descriptions. Enform Plus does use this two-directional link when evaluating the query.
Links and the LINK OPTIONAL Statement Rules Comparison of the LINK Statement, the LINK OPTIONAL Statement, and the WHERE Clause The LINK OPTIONAL statements establish the only links for this query. Although the SUPPRESS clause contains a WHERE phrase, this WHERE phrase does not establish a link. (If the WHERE phrase did establish a link, the links in this query would be invalid.
Links and the LINK OPTIONAL Statement Rules Comparison of the LINK Statement, the LINK OPTIONAL Statement, and the WHERE Clause Enform Plus Reference Manual—422684-001 C -12
Glossary aggregate. A cumulative operation on set(s) of numbers, producing a single value per set. See also predefined aggregate. and user aggregate. by-item. The field name used to group and sort Enform Plus output; always associated with a BY or BY DESC clause. A by-item is a special kind of target-item. clause. Component of an Enform Plus statement. command. A directive to the Enform Plus compiler. compiler/report writer.
format 1 file. Glossary format 1 file. A file created under software releases earlier than G06.00/D46.00, or a file created under release G06.00, D46.00, or later, but with a size that does not exceed two gigabytes (less one megabyte). format 2 file. A large-format file, or a file that can contain larger partitions than a file created under software releases preceding G06.00 or D46.00. A format 2 file has the potential of exceeding the 2 GB (less 1 MB) size limit of a format 1 file. front end.
qualified field name. Glossary qualified field name. A name that uniquely identifies a field as a component of a record description. query. A complete Enform Plus LIST or FIND statement specifying which fields and records to retrieve. query processor (QP). The Enform Plus process that opens the files and retrieves the records from a relational database for a report or a new file. record. A related set of field values. record description.
target-file. Glossary target-file. The file produced by the Query Processor that contains records with all the information requested in the query specifications. target-item. The record names, field names, expressions, variables, aggregates, and literals, including by-items, whose values appear in a target-record. target-list. The record names, field names, expressions, variables, aggregates, and literals following the keywords LIST or FIND that contribute to the target-record.
Index A Accessing the Editor from Enform Plus 6-9 Adding a character string to a targetitem 5-18 AFTER CHANGE clause description 5-4 examples 5-4, 5-5 print-list elements 5-4 spacing considerations 5-4 syntax 5-4 with a field name 5-4 Aggregates and null values created by LINK OPTIONAL 4-29 and scale 3-19 description 3-11 excluding duplicate values (UNIQUE) 3-13 predefined AVG 3-13 COUNT 3-13 MAX 3-13 MIN 3-13 SUM 3-13 qualification aggregates and target records 3-18 description 3-17 examples 3-17, 3-18 wit
A Index AS clause (continued) repeatable edit descriptors alphanumeric 5-10 fixed format 5-11 integer 5-10 mask 5-12 syntax 5-7 AS DATE clause default display format 5-22 description 5-22 examples 5-23 syntax 5-22 with JULIAN-DATE Conversion clause 5-44 AS TIME clause default display format 5-24 description 5-24 examples 5-25 syntax 5-24 time keywords 5-25 ASCD clause description 5-6 example 5-6 sorting precedence 5-6 syntax 5-6 Ascending order, sorting 5-6 ASSIGN command and generic files 2-4, 2-8, 2-10,
B Index AT START statement (continued) overriding 4-6 resetting 4-6 spacing considerations 4-5 syntax 4-5 with a field name 4-5 Attaching a query processor 6-6 Average value, finding 3-13 AVG 3-13 B Backspacing 5-66 BEFORE CHANGE clause description 5-30 examples 5-31 print-list elements 5-30 spacing considerations 5-30 syntax 5-30 with a field name 5-30 BEGINS WITH operator 3-24 Blanking fields on reports 3-26, 5-16, 5-49 Boolean operators 3-24 Break key 2-4, 5-49 BUILDMK messages B-26 BY clause descript
C Index CENTER clause (continued) specifying in a clause (continued) SUBTITLE 5-62 TITLE 5-70 specifying in a statement 4-36 AT END 4-4 AT START 4-6 FOOTING 4-24 SUBFOOTING 4-44 SUBTITLE 4-46 TITLE 4-48 syntax 5-33 Centering a print list 5-33 a single report item 5-33 all items in a report 5-33 body of a report 5-49 Changing default fill character 5-16 default output width 5-53 default overflow character 5-16, 5-51 default underline character 5-53 session-wide default date display format 5-50 session-wide
C Index Column headings specifying 5-39 suppressing 5-45 Combining percentages and subtotals 5-55 Commands Enform Plus commands 3-5 in an Edit-format file 6-1, 6-15 summary 6-1 ?ASSIGN 2-4, 6-3 ?ATTACH 2-6, 6-6 ?COMPILE 6-7 ?DICTIONARY 6-8 ?EDIT 6-9 ?EXECUTE 6-10 ?EXIT 6-11 ?HELP 6-12 ?OUT 6-14 ?RUN 6-15 ?SECTION 6-16 ?SHOW 6-17 ?SOURCE 6-19 TACL commands ASSIGN 2-4, 2-7 ENFORM 2-1 FC 2-2 PARAM 2-5, 2-8, 4-39 PAUSE 2-4 QP 2-9 Comments description 3-4 examples 3-4 Comparison template mask edit descriptor 5
D Index Creating a new physical file 4-17 Creating a server query processor ASSIGN command 2-7 description 2-6 example 2-10 PARAM command 2-8 QP command 2-9 CUM clause description 5-34 example 5-34 restrictions 5-35 syntax 5-34 with a user variable 5-35 Cumulative operations 3-11, 5-34, 5-63, 5-71 Current Enform Plus session, terminating 6-11 Current output listing file Break key 2-4 description 2-3 generic files 2-10 terminating 2-4 Current values of option variables 6-18 D Data Definition Language (DDL
E Index Default (continued) value of a user variable 3-29 values for option variables 5-48 Delimiters 3-4 DELINK statement description 4-12 examples 4-12 syntax 4-12 DESC clause description 5-6 sorting precedence 5-6 syntax 5-6 Descending order, sorting 5-6 Descriptors See also AS clause alphanumeric 5-10 altering the effect of 5-15 combined with modifiers 5-15 fixed format 5-11 integer 5-10 mask 5-12 nonrepeatable 5-13 optional plus sign 5-14 repeatable 5-9 scale factor 5-14 Diagnostic messages B-1 Dicti
F Index Edit-format files containing Enform Plus queries 2-3 reading 6-19 storing source code in 6-9, 6-15, 6-19 Eliminating field values 5-46 headings 5-45 records from a report 5-64 Embedded WHERE clause 3-19 ENFOLD macro 2-2 ENFORM command description 2-1 syntax 2-1 ENFPLUS macro 2-2 Entering commands and statements directly 2-2 indirectly 2-3 Entry-sequenced files 3-7 Environmental information, displaying internal table space 6-18 links in effect 6-17 open record descriptions 6-17 option variable valu
F Index Field name qualification required 3-7 references 3-6 specifying in a clause AFTER CHANGE 5-4 AT END PRINT 5-26 AT START PRINT 5-28 BEFORE CHANGE 5-30 FOOTING 5-36 SUBFOOTING 5-59 SUBTITLE 5-61 TITLE 5-69 specifying in a statement AT END 4-3 AT START 4-5 FOOTING 4-23 SUBFOOTING 4-43 SUBTITLE 4-45 TITLE 4-47 with subscripts 3-9 Field sorting clauses 5-6, 5-32 File assignments, logical 2-4 File error messages B-22 File type and the LIST statement 4-31 Files Edit-format 2-1 entry-sequenced 3-7 format
G Index FOOTING statement (continued) with a field name 4-23 FORM clause description 5-38 example 5-38 specifying in a clause AT END PRINT 5-27 AT START PRINT 5-29 FOOTING 5-37 SUBFOOTING 5-60 SUBTITLE 5-62 TITLE 5-70 specifying in a statement AT END 4-4 AT START 4-6 FOOTING 4-24 LIST 4-31 SUBFOOTING 4-44 SUBTITLE 4-46 TITLE 4-48 syntax 5-38 with a by-item 5-38 with a target-item 5-38 within a print list 5-38 Format 1 files Glossary-2 Format 2 files Glossary-2 Formatter 5-7 G Generic files and a dedicate
J Index IF/THEN/ELSE expressions (continued) value keywords 3-26 IN option and the current output listing file 2-3 description 2-1 Initial value of a user variable 3-27 Input file 2-3 Integer edit descriptor description 5-10 examples 5-11 syntax 5-10 Interactive mode ASSIGN command 2-5 description 2-2 getting help 6-12 INTERNAL clause description 5-42 example 5-42 internal format types 5-42 syntax 5-42 Internal table clearing 4-7, 4-12, 4-14, 6-8 description 4-7 J JULIAN-DATE Conversion clause converting
M Index Links clearing 4-7, 4-12, 4-14, 6-8 defined by Enform Plus LINK OPTIONAL statement C-2 LINK statement C-1 WHERE clause C-2 maximum number 4-26 session-wide 4-26 LIST statement conditional printing 4-34 description 4-30 displaying values in report columns 4-32 examples 4-32, 4-33, 4-34, 4-35, 4-36 grouping and sorting targetrecords 4-32 input record description 4-31 optional clauses 4-36 request-qualification 4-34 summary reports 4-34 syntax 4-30 Literals description 3-20 examples 3-20, 3-21 numeri
N Index Modifiers (continued) field blanking 5-15 fill character 5-16 justification 5-17 overflow character 5-16 symbol substitution 5-17 syntax 5-7, 5-9 N Naming a collection of source code 6-16 a section 6-16 a server query processor 2-9 a subvolume containing a dictionary 2-1, 6-8 fields 3-6 parameters 3-6 records 3-6 the message table file 2-1 user-defined elements 3-6 Nested arithmetic expressions 3-22 database tables 3-11 IF/THEN/ELSE expressions 3-26 logical expressions 3-24 ?SOURCE commands 6-19
P Index Option Variable clauses (continued) @DATE-FORMAT 5-50 @DECIMAL 5-50 @DISPLAY-COUNT 5-50 @HEADING 5-51 @LINES 5-51 @MARGIN 5-51 @NEWLINE 5-51 @NONPRINT-REPLACE 5-51 @OVERFLOW 5-51 @PAGES 5-51 @PRIMARY-EXTENT-SIZE 5-51 @READS 5-52 @SECONDARY-EXTENT-SIZE 5-52 @SPACE 5-52 @STATS 5-52 @SUBTOTAL-LABEL 5-52 @SUMMARY-ONLY 5-53 @TARGET-RECORDS 5-53 @TIME-FORMAT 5-53 @UNDERLINE 5-53 @VSPACE 5-53 @WARN 5-53 @WIDTH 5-53 Optional plus sign edit descriptor description 5-14 syntax 5-14 OUT option and the current
Q Index Parameter (continued) deleting from the internal table 4-7 description 3-27 displaying current value 6-18 handling by Enform Plus 3-27, 4-39 in a print-list 4-39 maximum number allowed 4-39 passing to a compiled query file 2-5, 4-39 rules for naming 3-6 variable-length 3-25 Passing parameters 2-5 Pattern match 3-23, 3-26 See also Logical expressions PAUSE command 2-4 PCT clause combining percentages and subtotals 5-55 description 5-54 examples 5-54 restrictions 5-55 syntax 5-54 with a by-item 5-54
R Index QUERY-COMPILER-LISTING and the current output listing file 2-3 description 2-11 QUERY-QPSTATISTICS 2-12 QUERY-QPSTATUS-MESSAGES 2-12 QUERY-REPORT-LISTING and the current output listing file 2-3 description 2-11 QUERY-SORT-AREA 2-12 QUERY-STATISTICS 2-11 QUERY-STATUS-MESSAGES 2-11 QUERY-WORK-AREA 2-11 R Range of values description 3-25 syntax 3-25 Reading an Edit-format file 6-19 Reassigning a physical file 2-5, 6-4 Reclaiming table space 4-7, 6-8 Record displaying environmental information 6-17,
S Index Reports (continued) starting a new page 5-38 subfootings 4-43, 5-59 subtitles 4-45, 5-61 summary 4-34 suppressing zeros 5-49 title 4-47, 5-69 title for the current report 5-70 values in report columns 4-32 vertical spacing 5-53, 5-56 REQUESTORS parameter 2-8 Request-qualification aggregates 3-17 description 1-3 FIND statement 4-21 literals 3-20 user variables 3-29 WHERE clause 5-72 Reserved words 3-2 Resetting AT END statement 4-4 AT START statement 4-6 FOOTING statement 4-24 SUBFOOTING statement
S Index SET statement and option variables 4-42 and user-defined elements 4-41 description 4-41 examples 4-42 syntax 4-41 Setting option variables 4-41, 4-42 the left margin 5-51 the number of report lines 5-51 user elements 4-41 values of user-defined elements 4-41 Sharing a server query processor 2-6 Size determining for a target-item 5-8 left margin 5-51 running total value 5-34 subtotal value 5-63 total value 5-71 SKIP clause and @VSPACE 5-56 description 5-56 example 5-56 specifying in a clause AFTER
S Index Statements applicable only to queries containing a LIST statement 4-1 AT END 4-3 AT START 4-5 CLOSE 4-7 DECLARE 4-9 DELINK 4-12 description 3-4 DICTIONARY 4-13 duration of effect 3-5, 4-1 EXIT 4-15 FIND 4-16 FOOTING 4-23 LINK 4-25 LIST 4-30 OPEN 4-38 PARAM 4-39 SET 4-41 SUBFOOTING 4-43 SUBTITLE 4-45 summary 4-1 terminating with a semicolon 3-5, 4-1 TITLE 4-47 Statistics description 5-52 output device for 2-11 Storage format default for a user table 4-10 default for a user variable 4-10 for dates 5
T Index SUBTITLE statement (continued) overriding 4-46 resetting 4-46 spacing considerations 4-45 syntax 4-45 with a field name 4-45 SUBTOTAL clause description 5-63 syntax 5-63 SUM 3-13 Summary of Enform Plus statements 4-1 Summary records 4-21, 5-53 Summary report 4-35, 5-53 SUPPRESS clause description 5-64 example 5-64 syntax 5-64 Suppressing column headings 5-46 column headings for all reports 5-51 printing of report items 5-46 selected records from a report 5-64 Suspending output 2-4, 5-49 Symbol sub
T Index Target-items aggregates 3-11 centering 5-33 description 1-2 display format 5-7 displayed in report columns 4-32 headings 5-39 in a LIST statement 4-30 record names 3-6 user tables 3-29 user variables 3-27 Target-list aggregates 3-15 description 1-2 literals 3-20 Target-records description 1-3 generated by a LIST statement 4-31 grouping by field values 5-32 sorting 5-6, 5-32 summary records 4-21 summary reports 4-34 Temporarily changing fill character 5-16 overflow character 5-16 Temporary work fil
U Index Trap messages B-26 Two-directional links C-1 U Underline character 5-53 Unstructured files 3-7 User aggregates declaring 4-9 deleting from the internal table 4-7, 4-13, 6-8 description 3-13 examples 3-14, 3-15 initial value 4-9 naming 3-6 rules for using 3-15, 4-10 syntax 3-14, 4-9 User tables as target-items 3-29 assignment syntax 3-29 declaring 4-9 default display format 4-11 default storage format 4-10 deleting from the internal table 4-7, 4-12, 6-8 description 3-29 displaying current value of
W Index W Warning messages appearing on a terminal 5-53 listing B-4 WHERE clause and a qualification aggregate 3-19 compared to LINK OPTIONAL statement C-11 compared to LINK statement C-4, C-11 description 5-72 examples 5-72 links initiated by C-2 specifying a link 5-72 syntax 5-72 terms 4-28, C-2 Z Zeroing fields on reports 3-26 Special Characters !!! ERROR messages B-4 *** FILE ERROR messages B-22 *** WARNING messages B-4 ?ASSIGN command 2-4 and generic files 6-3 changing the exclusion specification 6
Special Characters Index ?SOURCE command description 6-19 nesting of 6-19 syntax 6-19 @BLANK-WHEN-ZERO description 5-49 setting 4-42 @BREAK-KEY and the Break key 2-4 description 5-49 setting 4-42 @CENTER-PAGE description 5-49 setting 4-42 @COPIES description 5-49 setting 4-42 @COST-TOLERANCE description 5-49 setting 4-42 @DATE 5-65 See also System Variable clauses @DATE-FORMAT description 5-50 setting 4-42 @DECIMAL description 5-50 setting 4-42 @DISPLAY-COUNT description 5-50 setting 4-42 @HEADING descrip
Special Characters Index @SUMMARY-ONLY (continued) description 5-53 setting 4-42 @TARGET-RECORDS description 5-53 setting 4-42 @TIME 5-65 See also System Variable clauses @TIME-FORMAT description 5-53 setting 4-42 @UNDERLINE description 5-53 setting 4-42 @VSPACE description 5-53 setting 4-42 @WARN description 5-53 setting 4-42 @WIDTH description 5-53 setting 4-42 Enform Plus Reference Manual—422684-001 Index -25
Special Characters Index Enform Plus Reference Manual—422684-001 Index -26