Saturday, November 6, 2010

jQL Command Syntax

jQL-Command file-specifier {record-list} {selection-criteria} {sort-criteria} {USING file- specifier} {output-specification} {format-specification} {(options}

Syntax Elements

JQL Command
One of the verbs like Commands detailed later. Most Commands will accept any or all of the optional clauses.
File specifier
Identifies the main data file to be processed. Usually the data section of a file, but could be a dictionary or a secondary data area.
Record list
Defines which records will be eligible for processing. Comprises an explicit list of record keys or record selection clauses. An explicit list comprises one or more record keys enclosed in single or double quotes. A selection clause uses value strings enclosed in single or double quotes and has at least one relational operator. If no record list is supplied, all records in the file will be eligible for processing unless an “implicit” record list is provided by preceding the Command with a selection Command such as GET-LIST or SELECT.
Selection criteria
Qualify the records to be processed. Comprises a selection connective (WITH or IF) followed by a field name. Field names can be followed by relational operators and value strings enclosed in double quotes. Logical Connectives AND/OR ca also be used. Expressions can be parenthesized to specify procedure.
Sort criteria
Specify the data list order. Comprises a sort modifier, such as BY or BY-DSND, followed by a field name. Used also to “explode” a report by sorting lines corresponding to multivalued fields by value, and to limit the output of values (see output specification).
USING file specifier
Defines an alternate file for use as the dictionary.
Output Specification
Comprises the names of the fields to be included in the report, optionally preceded by a BREAK-ONconnective or ‘TOTAL’ connective. Print limiters (Values strings enclosed in double quotes after the field name, optionally preceded by relational operators) can be used to restrict multivalue output.
Format specification
Comprise modifiers, such as HEADING, ID-SUPP, and DBL-SPC, which define the overall format of the report.
options
Comprises letters enclosed in parentheses, which modify the action of the Command to redirect output to a printer for Example.
Comments:A macro can substitute any element of a jQL Command sentence (with the exception of the Command and filename). When the REQUIRE-SELECT modifier is included in a jQL sentence it verifies that a select list is active before processing the sentence.

Macros

jQL allows the use of macros to predefine parts of a sentence. The macro definition contains one or more optional sentence elements. You invoke the macro by including its name in a sentence. The jQL processor looks for the macro in the currently active dictionary and includes all of its text parts in the sentence.

Using Clause

You may include multiple USING clauses in the sentence to specify that another file contains the attribute and the macro definition items referenced in the sentence. Each macro definition can also contain a USING clause to define the terms used within that macro.

Options

Options are letters enclosed within parentheses, which modify the action of the verb.

Print Limiters

Sort criteria and format specifications can include 'print limiters' which suppress output of particular values according to specified criteria.

Record IDs

jBASE treats record ID’s differently from other fields in a file, in that the record ID is the default field displayed by LIST/SORT commands and the implied field for selection clauses.

The @ID Field

The @ID Field is optional in jBASE files. The field name is @ID; the column name is set automatically to the name of the file, and the output format defaults to 10L.

The @ID Synonym

The @ID synonym is an optional entry you may find in some file dictionaries particularly in table dictionaries or in jBASE files converted from CONVERT.SQL utility. Under prime emulation, @ID contains the default output specification of @LPTR for output to printers.

0 comments:

Post a Comment

 

Blog Info

A Pakistani Website by Originative Systems

Total Pageviews

Tutorial Jinni Copyright © 2015 WoodMag is Modified by Originative Systems