SYSTEM 2000 Quick Reference Guide QUEST Language Commands
ADD
Replaces nulls with values in existing data records.
Syntax
ADD item full-trace EQ |value * :
|PREVIOUS
ADD item full-trace] = |item :
|* function *
|* function (parameters)
|(adhoc-function)
|system-function
ADD item [partial-trace] EQ |value * where-clause :
|PREVIOUS
ADD item [partial-trace] = |item where-clause :
|* function *
|* function (parameters)
|(adhoc-function)
|system-function
ADD record full-trace EQ |value-stream END * :
|PREVIOUS
ADD record [partial-trace] EQ |value-stream END * where-clause:
|PREVIOUS
- item
- is a schema item name or component number.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- value
- is a literal value or a system string (*NOW*, *TODAY*, *FTODAY*).
- PREVIOUS
- repeats the value stream or the item value in the preceding update
command.
- function
- is a stored function name or component number.
- parameters
- are the values that replace the numbered parameters
in the stored function.
See Function Definition
in DEFINE.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- system-function
- allows you to obtain simple arithmetic statistics about values stored in
a database. System functions include: AVG, COUNT,
MAX, MIN, SIGMA, and SUM.
See System Function.
- partial-trace
- is a trace in which the last integer designates a position other than
level 0.
- record
- is a schema record name or component number.
- value-stream
- is a series of item numbers and values to be added, with each item
number followed by its associated value. The system separator must
follow each item number and each value. The item numbers do not have to
be in DESCRIBE order.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
AD C412 EQ BS* WH C1 = 1005:
ADD EDUCATION EQ 413*01/07/85*414*ENGLISH*415*MARKETING*END*
WH C2 EQ BROOKS:
ADD C126 = (C124 - C114) WH C1 EXISTS AND C121 EQ 06/30/91:
ADD C105 = (*TODAY*) WH C2 = GIBSON:
Rules
Abbreviation: ADD = AD
-
Use ADD only to add data to existing data records that are occurrences
of a single schema record.
-
If you need to add multiple values, all values must be occurrences
of items in the specified record.
-
If you use the syntax 'ADD item = item', the item types must be
compatible, that is, both dates, both numeric, or both nonnumeric. For
numeric types, the second item assumes the picture of the first item.
Also, if the value of the second item is too large for the picture of
the first item, an error message appears. If the item name for either
includes the equals sign, use the component number for the item.
Also for the 'ADD item = item' syntax, if one item is type UNDEFINED,
the other item must also be type UNDEFINED. That is, you can add only
UNDEFINED values to other UNDEFINED items. You cannot add CHARACTER or
TEXT values to UNDEFINED items.
-
If you use the '=' syntax, the item, stored function, system function,
or ad hoc function must be in the path of the target record (the record
containing the specified item). If the system function includes a
by-phrase, the record specified in the by-phrase must be in the path of
the target record.
-
You must have U-authority for components specified in the action-clause
of an ADD command.
-
The command referenced by PREVIOUS cannot contain errors.
-
When specifying PREVIOUS, the item or record preceding EQ must be the
same item or record as in the previous update command.
-
You cannot use Collect File items in an ADD action-clause.
-
You cannot issue ADD for a damaged database.
Back to Top of Page
Ad Hoc Function
Specifies mathematical operations to be performed on data. The
following operands are available:
Syntax
* multiplication
/ division
+ addition
- subtraction
Examples
PRINT (C114 + C126) WHERE C1 EQ 1010:
PR (((MIN C126) + (MAX C126))/2):
Rules
Back to Top of Page
ASSIGN
Replaces values or nulls with values in existing data records.
Syntax
ASSIGN item full-trace EQ |value * :
|PREVIOUS
ASSIGN item full-trace = |item :
|* function *
|* function (parameters)
|(adhoc-function)
|system-function
ASSIGN item [partial-trace] EQ |value * where-clause :
|PREVIOUS
ASSIGN item [partial-trace] = |item where-clause :
|* function *
|* function (parameters)
|(adhoc-function)
|system-function
ASSIGN record full-trace EQ |value-stream END * :
|PREVIOUS
ASSIGN record [partial-trace] EQ |value-stream END * where-clause :
|PREVIOUS
- item
- is a schema item name or component number.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- value
- is a literal value or a system string (*NOW*, *TODAY*, *FTODAY*).
- PREVIOUS
- repeats the value stream or the item value in the preceding update
command.
- function
- is a stored function name or component number.
- parameters
- are the values that replace the numbered parameters in the stored
function.
See Function Definition
in DEFINE.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- system-function
- allows you to obtain simple arithmetic statistics about values
stored in a database. System functions include: AVG, COUNT,
MAX, MIN, SIGMA, and SUM.
See System Function.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- record
- is a schema record name or component number.
- value-stream
- is a series of item numbers and values to be assigned, with each item
number followed by its associated value. The system separator must
follow each item number and each value. The item numbers do not have to
be in DESCRIBE order.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
AS OFFICE-EXTENSION EQ 410 XT369* WH C1 = 1120:
AS C14 EQ 2311 HANSFORD* WH C3 EQ MOLLY I. AND C2 EQ GIBSON:
ASSIGN JOB SKILLS EQ 201*RUSSIAN*202*EXCELLENT*203*15*END*
WH C2 EQ BOWMAN:
Rules
Abbreviation: ASSIGN = AS
-
Use ASSIGN only to replace data in existing data records that are
occurrences of a single schema record.
-
If you specify a record and if any original data are to be retained,
those data must be included as a part of the value stream.
-
If you need to assign multiple values, all values must be occurrences of
items in the specified record.
-
If you use the syntax 'ASSIGN item = item', the item types must be
compatible, that is, both dates, both numeric, or both nonnumeric. For
numeric types, the second item assumes the picture of the first item.
Also, if the value of the second item is too large for the picture of
the first item, an error message appears. If the item name for either
includes the equals sign, use the component number for the item.
Also for the 'ASSIGN item = item' syntax, if one item is type UNDEFINED,
the other item must also be type UNDEFINED. That is, you can assign
only UNDEFINED values to other UNDEFINED items. You cannot assign
CHARACTER or TEXT values to UNDEFINED items.
-
If you use the '=' syntax, the item, stored function, system function,
or ad hoc function must be in the path of the target record (the record
containing the specified item). If the system function includes a
by-phrase, the record specified in the by-phrase must be in the path of
the target record.
-
You must have U-authority for components specified in the action-clause
of an ASSIGN command.
-
The command referenced by PREVIOUS cannot contain errors.
-
When specifying PREVIOUS, the item or record preceding EQ must be the
same item or record as in the previous update command.
-
You cannot use Collect File items in an ASSIGN action-clause.
-
You cannot issue ASSIGN for a damaged database.
Back to Top of Page
ASSIGN TREE
Replaces existing data trees (including the data) with new data trees.
Syntax
ASSIGN TREE record full-trace EQ |value-stream END* :
|PREVIOUS
ASSIGN TREE record [partial-trace] EQ |value-stream END* where-clause :
|PREVIOUS
- record
- is a schema record name or component number; the target record.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- value-stream
- is a series of component numbers and associated item values in the same
format as for the loader stream. The record number to the left of
the EQ operator is not included in the value stream.
See LOAD
for the format of a loader stream.
- PREVIOUS
- repeats the value stream or the item value in the preceding update
command.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- where-clause
- selects specific data records.
See Where-Clause.
Example
AT C100 EQ 101*PROGRAMMER*102*INFORMATION SYSTEMS*103*MYJ*104*
PROFESSIONAL*105**TODAY**110*111*1100.00*112*MONTHLY*113*
*TODAY**114*194.50*120*120*130*131*1.0*132*NEW EMPLOYEE*END*
WH C1 = 1345:
Rules
Back to Top of Page
By-Clause
Specifies that only certain items within a data tree are to be displayed
together in logical order. Enables you to specify which values are to be
retrieved, to retrieve data from disjoint records, or to specify
computations on subsets of data.
Syntax
by-phrase, units
unit by-phrase
- by-phrase
BY |record
|DATA BASE
- unit
|item
|record
|* function *
|* function (parameters)
|* string *
|* string (parameters)
|(adhoc-function)
|system-function
|cf-item
- item
- is a schema item name or component number.
- record
- is a schema record name or component number.
- function
- is a stored function name or component number.
- string
- is a stored string name or component number.
- parameters
- are the values that replace the numbered parameters in the stored function.
See Function Definition
in DEFINE.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- system-function
- allows you to obtain simple arithmetic statistics about
values stored in a database. System functions include:
AVG, COUNT, MAX, MIN, SIGMA, and SUM.
See System Function.
- cf-item
- is a Collect File item name.
Examples
LIST C1, C2, BY C100, C102, C132 WH C7 EQ FEMALE:
LIST C1, C2, BY C100, C102, C132, BY C110, C121 WH C7 = FEMALE:
PRINT BY C0, C102, C201 WH C7 EQ FEMALE:
PRINT COUNT C0, BY DATA BASE, COUNT C0 WHERE C7 = FEMALE:
PRINT C111 BY C0 WHERE SAME:
PRINT BY C0, C111 BY C100 WHERE SAME:
Rules
Back to Top of Page
CHANGE value
Replaces existing values with new values.
Syntax
CHANGE item full-trace EQ |value * :
|PREVIOUS
CHANGE item full-trace = |item :
|* function *
|* function (parameters)
|(adhoc-function)
|system-function
CHANGE item [partial-trace] EQ |value * where-clause :
|PREVIOUS
CHANGE item [partial-trace] = |item where-clause :
|* function *
|* function (parameters)
|(adhoc-function)
|system-function
CHANGE record full-trace EQ |value-stream END * :
|PREVIOUS
CHANGE record [partial-trace] EQ |value-stream END * where-clause :
|PREVIOUS
- item
- is a schema item name or component number.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- value
- is a literal value or a system string (*NOW*, *TODAY*, *FTODAY*).
- PREVIOUS
- repeats the value stream or the item value in the preceding update
command.
- function
- is a stored function name or component number.
- parameters
- are the values that replace the numbered parameters in the stored
function.
See Function Definition
in DEFINE.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- system-function
- allows you to obtain simple arithmetic statistics about values stored
in a database. System functions include: AVG, COUNT,
MAX, MIN, SIGMA, and SUM.
See System Function.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- record
- is a schema record name or component number.
- value-stream
- is a series of values to be changed, each preceded by its associated
item number. The system separator must follow each item number and each
value. The item numbers do not have to be in DESCRIBE order.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
CH PAY SCHEDULE EQ MONTH* WH C112 EQ MONTHLY:
CHANGE C11 EQ 80.00* WHERE C1 EQ 1120:
CHANGE C131 = (C131/10) WH C1 = 1043:
CH JOB SKILLS EQ 202*GOOD*203*3*END* WH C201 EQ GRAPHICS AND
C1 EQ 1043:
CH C0 EQ 14* 1302 LAZY LANE* 16* 78752* END* WH C1 = 1120:
Rules
Abbreviation: CHANGE = CH
-
Use CHANGE only to change data within existing data records that are
occurrences of a single schema record.
-
If you need to change multiple values, all values must be occurrences of
items in the specified record.
-
If you use the syntax 'CHANGE item = item', the item types must be
compatible, that is, both dates, both numeric, or both nonnumeric. For
numeric types, the second item assumes the picture of the first item.
Also, if the value of the second item is too large for the picture of
the first item, an error message appears. If the item name for either
includes the equals sign, use the component number for the item.
Also for the 'CHANGE item = item' syntax, if one item is type UNDEFINED,
the other item must also be type UNDEFINED. That is, you can change
only UNDEFINED values to other UNDEFINED items. You cannot change
CHARACTER or TEXT values to UNDEFINED items.
-
If you use the '=' syntax, the item, stored function, system function,
or ad hoc function must be in the path of the target record (the record
containing the specified item). If the system function includes a
by-phrase, the record specified in the by-phrase must be in the path of
the target record.
-
You must have U-authority for components specified in the action-clause
of a CHANGE command.
-
The command referenced by PREVIOUS cannot contain errors.
-
When specifying PREVIOUS, the item or record preceding EQ must be the
same item or record as in the previous update command.
-
You cannot use Collect File items in a CHANGE action-clause.
-
You cannot issue CHANGE for a damaged database.
Back to Top of Page
CLEAR
Specifies when modified database pages, or Update Log pages, or both are
to be written from main memory to disk.
Syntax
CLEAR :
[CLEAR] AUTOMATICALLY :
CLEAR UPDATE LOG :
[CLEAR] UPDATE LOG AUTOMATICALLY :
Examples
CLEAR UPDATE LOG AUTO:
CLEAR:
CLEAR UPDATE LOG:
Rules
Back to Top of Page
COLLECT
Creates (or cancels) a Collect File, which is a relational table containing
values extracted from one or more databases.
Syntax
COLLECT [/[options] [,TITLE comment]/] retrieval-clause
[[,ordering-clause] where-clause] :
COLLECT :
- options
- is a list of one or more of the following format options, separated by
commas. Defaults are listed in the first column.
INDENT BLOCK
NULL SUPPRESS NULL
NUMBER NAME
REPEAT REPEAT SUPPRESS
SINGLE SPACE DOUBLE SPACE
STUB STUB SUPPRESS
TREE RECORD
ZERO SUPPRESS ZERO
HEX OFF HEX ON
See FORMOP
for details on format options.
- TITLE
- allows you to insert a comment within the output. (If you do not
specify format options, do not include a comma before the keyword
TITLE.)
- comment
- can be any string of characters not containing the command terminator or
a slash. The comment cannot begin with (, B(, D(, F(, L(, R(, or S(,
and it must be less than 130 characters long, although leading,
trailing, and extraneous blanks are not counted. The comment is
displayed with the echo of the command in the Message File.
- retrieval-clause
cf-retrieval-object [,cf-retrieval-object]
- cf-retrieval-object
[cf-item = ] retrieval-object
- cf-item
- is a unique Collect File item name, which can be any character string.
If reserved words or component numbers are used, the Collect File cannot
be used to create a new database. The Collect File item name can be
omitted if it is the same as the retrieval object's name.
- retrieval-object
- is a schema item name or component number, Collect
File item name, stored function, system function, or ad hoc function.
You cannot specify a schema record unless it is embedded in a system
function.
- ordering-clause
- specifies the order of selected data records. A where-clause is
required if an ordering-clause is specified.
See Ordering-Clause.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
COLLECT LAST NAME, HIRE DATE, ACCRUED VACATION:
COLLECT:
CO NAME = LAST NAME, HIRED = HIRE DATE, VACATION = ACCRUED VACATION,
OB HIRE DATE WH HIRE DATE SPANS 01/01/1988 * 01/01/1989:
Rules
Back to Top of Page
COPY TREE
Duplicates a data record and its descendants from one position in a
database to another.
Syntax
COPY TREE record |where-clause TO |before-clause :
|partial-trace where-clause |after-clause
|full-trace |partial-trace where-clause
|full-trace
- record
- is the name or component number of the schema record
at the top node of the tree
to be copied.
- where-clause
- selects specific data records.
See Where-Clause.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- before-clause
- is the same as a where-clause except that the keyword BEFORE replaces
the keyword WHERE.
See Where-Clause.
- after-clause
- is the same as a where-clause except that the keyword AFTER replaces the
keyword WHERE.
See Where-Clause.
Examples
COPY TREE C110 WHERE C113 = 03/01/90 AND C1 = 1120
TO AFTER C113 EQ 03/01/91 AND C1 EQ 1120:
CT C0*1 TO *3:
Rules
Back to Top of Page
DATE FORMAT IS
Specifies alternate input and output formats for dates.
Syntax
DATE FORMAT IS |MM/DD/YYYY :
|MM/DD/YY
|DD/MM/YYYY
|DD/MM/YY
|YY/MM/DD
|YYYY/MM/DD
Example
DATE FORMAT IS MM/DD/YY:
Rules
Back to Top of Page
DESCRIBE
Displays all or part of a database definition.
Syntax
DESCRIBE :
DESCRIBE |[/DEFINE/] |component [THROUGH component] :
|[/AUTHORITIES [n]/] |RECORD unit
|[/DEFINE,AUTHORITIES/]
DESCRIBE [/DEFINE/] |STRINGS :
|FUNCTIONS
DESCRIBE /COLLECT FILE [,DEFINE]/ [cf-item [(CF)] [THROUGH cf-item [(CF)]]] :
- component
- is an item, record, string, or function name or component number.
- n
- is a positive integer indicating the column in which component
authorities are to be printed. The number must be between one and the
line length, minus three. The default is 68.
- unit
- is the component name or number of a schema record or schema item for
the RECORD option. If you specify an item, the software displays the
parent schema record along with its items and subordinate records.
- cf-item
- is a Collect File item name.
Examples
DESCRIBE:
DESCRIBE /DEFINE/ SECURITY CLEARANCE:
DESC C110:
DESCRIBE /CF/ C13 (CF):
DESCRIBE C400 THRU C415:
DESCRIBE STRINGS:
DESCRIBE FUNCTIONS:
DESCRIBE /AUTHORITIES 45/:
DESCRIBE /AUTH 50/C100 THROUGH C110:
DESCRIBE RECORD C100:
DESCRIBE /AUTH 41/ RECORD C100:
DESCRIBE /DEFINE/ RECORD C100:
DESCRIBE /DEFINE, AUTH/ C0 THRU C10:
Rules
Back to Top of Page
DITTO
Repeats the most recently executed action-clause of a retrieval or
update command.
Syntax
DITTO [where-clause] :
- where-clause
- selects specific data records.
See Where-Clause.
Example
PR COUNT ENTRY WH C7 EQ FEMALE AND C124 GE $1000.00 AT 1:
.
.
.
DI WH GENDER EQ MALE AND C124 GE $1000.00 AT 1:
Rules
Abbreviation: DITTO = DI
-
You can use DITTO after the following commands: ADD, ASSIGN, ASSIGN
TREE, CHANGE, COLLECT, DESCRIBE, INSERT TREE, LIST, PRINT, REMOVE,
REMOVE TREE, TALLY, UNLOAD.
-
If the previous retrieval or update command does not contain a
where-clause, the DITTO command must not contain one. However, if the
previous retrieval or update command contains a where-clause, the DITTO
command must contain one.
-
The keyword identifying the where-clause (WHERE, BEFORE, AFTER) must be
the same in the DITTO command as in the previous retrieval or update
command.
-
If the action-clause in the previous retrieval or update command
contains an ordering-clause, it is repeated by DITTO. However, if the
action-clause in the previous retrieval or update command does not
contain an ordering-clause, one cannot be added with DITTO.
Back to Top of Page
ENABLE/DISABLE EXECUTION
Allows or prevents the execution of QUEST, DEFINE, or QUEUE retrieval
and update commands. However, ENABLE EXECUTION and DISABLE EXECUTION
allow scanning of those commands for syntax errors.
Syntax
|ENABLE EXECUTION :
|DISABLE
Examples
ENABLE EXECUTION:
DISABLE EXECUTION:
Rules
Back to Top of Page
ENABLE/DISABLE VALUES PADDING
Controls the placing of new values of key items in the Distinct Values
Table.
Syntax
|ENABLE VALUES PADDING :
|DISABLE
Example
ENABLE VALUES PADDING:
Rules
Back to Top of Page
FORMOP
Sets format options without your having to issue a PRINT, LIST, UNLOAD, or
COLLECT command.
Syntax
FORMOP /options/ :
- options
- is a list of one or more of the following format options, separated by
commas. Defaults are listed in the first column.
INDENT BLOCK
NULL SUPPRESS NULL
NUMBER NAME
REPEAT REPEAT SUPPRESS
SINGLE SPACE DOUBLE SPACE
STUB STUB SUPPRESS
TREE RECORD
ZERO SUPPRESS ZERO
HEX OFF HEX ON
The rules pertaining to the format options also apply when you specify
format options with the PRINT, LIST, UNLOAD, or COLLECT command.
Example
FORMOP /REPEAT SUPPRESS, DOUBLE SPACE/:
Rules
Back to Top of Page
FRAME and END FRAME
Establishes a logical unit of work for Coordinated Recovery, or places a
global hold on the database, or both. If the Rollback Log is enabled,
each FRAME and END FRAME command causes a database synchpoint.
Syntax
FRAME [/IMMEDIATE/] :
END FRAME :
Examples
FRAME /IM/:
END FR:
Rules
Back to Top of Page
INSERT TREE
Inserts new data trees where trees do not exist.
Syntax
INSERT TREE record EQ |value-stream END* |before-clause :
|PREVIOUS |after-clause
INSERT TREE record full-trace EQ |value-stream END* :
|PREVIOUS
INSERT TREE record partial-trace EQ |value-stream END* where-clause:
|PREVIOUS
- record
- is a schema record name or component number.
- value-stream
- is a series of component numbers and associated data values in the same
format as the loader stream. The record number to the left of the EQ
operator is not included in the value stream.
See LOAD
for the format of a loader stream.
- PREVIOUS
- repeats the value stream in the preceding update command.
- before-clause
- is the same as a where-clause, except that the keyword BEFORE replaces
the keyword WHERE.
See Where-Clause.
- after-clause
- is the same as a where-clause, except that the keyword AFTER replaces
the keyword WHERE.
See Where-Clause.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
IT C420 EQ 421*422*COBOL*423*09/09/1986*END* AFTER C2 = REID
AND C421 = TECNIK:
INSERT TREE C120 *1*1*1 EQ 121*06/30/91* END* WH C1 EXISTS:
IT C120 *1*1*1 EQ 121*05/29/91*122*184.00*123*10.00*124*1950.00*
125*153.20*126*1560.35*END* WHERE C1 EQ 1120:
IT C200 *2 EQ 201*COBOL*202*GOOD*203*1*END* WH C1 = 1120:
IT C0 *0 EQ 100*101*PROGRAMMER*102*INFORMATION SYSTEMS*130*131*
1.0*132*NEW EMPLOYEE*END*:
Rules
Back to Top of Page
LIMIT and END LIMIT
Does three things: sets a specific number of records on which retrieval
or update commands are to be executed, sets a minimum and maximum for
the number of records on which retrieval or update commands are to be
executed, or controls the output of selected records in retrieval
commands.
Syntax
LIMIT k :
LIMIT k , m |[/CANCEL] :
|[/TRUNCATE]
LIMIT k , m |[/CANCEL] , j [/fileref] :
|[/TRUNCATE]
END LIMIT :
- k, m, j
- are positive integers or 0.
Zero means infinite for m and j. Also,
k and j must be less
than or equal to m except when m equals 0. The
j intermediate limit has no effect on Collect File commands.
- CANCEL
- TRUNCATE
- controls the output of selected records. The default is CANCEL;
that is, if the number of selected records falls outside the range
specified, the command is cancelled.
- fileref
- is a DDname declared in the JCL. The default is the Report File.
- END LIMIT
- resets the software to the default, which is unlimited.
Examples
LIMIT 3:
LIMIT 3, 5:
LIMIT 3, 3/TRUNCATE:
LIMIT 3, 7, 5:
LIMIT 3, 7, 5/ALTFILE:
LIMIT 3, 7/TRUNCATE, 5:
LIMIT 3, 7/TRUNCATE, 5/ALTFILE:
END LIMIT:
Rules
Back to Top of Page
LIST
Retrieves database and Collect File information and displays it in
columnar format.
Syntax
LIST [/[options] {,TITLE specifications]/] retrieval-clause
[[,ordering-clause] where-clause] :
- options
- is a list of one or more of the following format options, separated by
commas. Defaults are listed in the first column.
INDENT BLOCK
NULL SUPPRESS NULL
NUMBER NAME
REPEAT REPEAT SUPPRESS
SINGLE SPACE DOUBLE SPACE
STUB STUB SUPPRESS
TREE RECORD
ZERO SUPPRESS ZERO
HEX OFF HEX ON
See FORMOP
for details on format options.
- TITLE
- allows you to include layout specifications. Use a comma in front of
the keyword TITLE only if you have specified a format option. Title and
paging specifications can occur anywhere after the keyword TITLE.
- specifications
- See Layout Specifications.
- retrieval-clause
- specifies a list of one or more retrieval objects, separated by commas.
See Retrieval-Clause.
- ordering-clause
- specifies the order of selected data records. A where-clause is
required if an ordering-clause is specified.
See Ordering-Clause.
- where-clause
- selects specific records.
See Where-Clause.
Examples without Layout Specifications
LIST EMPLOYEE NUMBER, LAST NAME WHERE EMPLOYEE NUMBER LE 1005:
LIST C2, C1, C6, ORDERED BY C2 WHERE C1 <= 1003:
LIST LAST NAME, *C2001*, (C106 - C105), AVG C111 WHERE C106 EXISTS:
LIST/DOUBLE SPACE, REPEAT SUP/ C2,C4,C7,C15,C16 WHERE C1 <= 1003:
Layout Specifications
specifications [(page-width)] [title] [paging] [rows]
- (page-width)
- is the maximum number of characters for a line, 4 to 131. The
defaults are 131 for batch and 71 for interactive.
- title
D (starting-column) [title-line-text]
- paging
F (lines-per-page) [footing-line-text]
Lines-per-page must be from 10 to 60.
rows |L (width) [column-heading] [,S-specification]
|R
|B
- L
- specifies left-justified column heading.
- R
- specifies right-justified column heading.
- B
- specifies a blank column; optional heading is left-justified.
Not specifying L, R, or B directs the software to left-justify the
heading text and to allow the longest of the three lines possible
to determine the width of the columns.
- (width)
- is the column heading width.
- column-heading
[[text] + ] [[text] + ] text
- S-specification
- tells the software where to start a new row, how to space between rows
of column headings, and how to space between corresponding rows of
values. For syntax, see LIST command in
SYSTEM 2000 QUEST Language and System-Wide Commands, Version 12, First Edition
Examples with Layout Specifications
LIST /TITLE R(16)MAJOR FIELD, L(16)MINOR FIELD/ C414, C415 WHERE
C415 EXISTS AND C1 LE 1100:
LIST /TITLE (45) D(15) REPORT TITLE, F(15) --FOOTING LINE--,
L(10) LAST NAME, EMPLOYEE+NUMBER, R(15) SOCIAL +SECURITY
NUMBER/ C2, C1, C6 WHERE C1 =< 1005:
LIST /DOUBLE SPACE, TITLE (40) D(7)REPORT TITLE,
F(40) --FOOTING LINE--,
L(10) LAST NAME,S(1,2),B(10),
L(8)EMPLOYEE+ NUMBER,R(15)SOCIAL +SECURITY NUMBER,S(2)/
C2, C1, C6 WHERE C1 LE 1005:
LI/TITLE D(20)*NOW*/C1, C2, C3 WH C1 <= 1010:
Rules
Back to Top of Page
LOAD
Loads data into a database in logical order.
Syntax
LOAD :
Example
LOAD:
Rules
When you issue this command, the software looks to the Data File for a
loader stream. Therefore, you must first issue the DATA FILE IS
command.
-
A loader stream consists of a group of values, with each value preceded
by an item number and followed by a system separator. Each group of
values (a data record) is preceded by a schema record number. The item
numbers and record numbers are not preceded by a C.
-
You indicate the end of a data record by either another schema record
number or an entry terminator (END*).
-
You indicate the end of the loader stream by following the last entry
terminator with a system separator. For example,
1*1120*2*REID*3*DAVID G/*4*01/16/1988*5*08/15/1957*6*441-04-0121* */
.
.
.
420*421*TECNIK*422*SYSTEM RS ADVANCED*423*03/18/1989*END**
-
Enable values padding before doing a LOAD operation. After the load
processing completes, you should disable values padding or too much
table space will be added during ad hoc updates.
See ENABLE/DISABLE VALUES PADDING.
-
To check for errors before loading, issue the DISABLE EXECUTION command
or the STOP IF command before issuing the LOAD command.
-
When the loading process is complete, the database cycle number is
incremented by one.
Back to Top of Page
MOVE TREE
Moves a data record and its descendants from one position in a database
to another without affecting the database tables or index.
Syntax
MOVE TREE record |where-clause TO |before-clause :
|partial-trace where-clause |after-clause
|full-trace |partial-trace where-clause
|full-trace
- record
- is a schema record name or component number; the target record.
- where-clause
- selects specific records.
See Where-Clause.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- before-clause
- is the same as a where-clause except that the keyword BEFORE replaces the
keyword WHERE.
See Where-Clause.
- after-clause
- is the same as a where-clause except that the keyword AFTER replaces the
keyword WHERE.
See Where-Clause.
Example
MT C110 WH C113 EQ 03/01/90 AND C1 EQ 1120 TO AFTER C113 = 03/01/91
AND C1 = 1120:
Rules
Back to Top of Page
Ordering-Clause
Specifies the output order of data to be retrieved with PRINT, LIST,
UNLOAD, and COLLECT commands. Can also be used with RELOAD and MAP.
Syntax
,ORDERED BY sort-keys
- sort-keys
- is a list of one or more items, records, ad hoc functions, stored
functions, or system functions in the following format, separated by
commas.
|[LOW] unit
|[HIGH]
- LOW
- specifies low-to-high (ascending) order, for example, A,B,C,D or
1,2,3,4. The default is LOW.
- HIGH
- specifies high-to-low (descending) order, for example, Z,Y,X,W or
9,8,7,6.
- unit
|item
|record
|stored-function
|(adhoc-function)
|system-function
- item
- is a schema item name or component number.
- record
- is a schema record name or component number.
- stored-function
- is a stored function name or component number with
optional parameters.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- system-function
- allows you to obtain simple arithmetic statistics about
values stored in a database. System functions include: AVG, COUNT,
MAX, MIN, SIGMA, and SUM. A by-phrase is required if you use a system
function in an ordering-clause.
See System Function.
Examples
PRINT C1, C2, C10, ORDERED BY C1, C10 WHERE C1 EXISTS:
UNLOAD C1, OB C1 WH C1 EXISTS:
PR C1, C2, C11, OB HIGH C1, LOW C2, HIGH C11 WH C11 EXISTS:
Rules
Back to Top of Page
PRINT
Retrieves database or Collect File information and displays it in a
simple, sequential list.
Syntax
PRINT [/[options] [,TITLE comment]/] retrieval-clause
[[,ordering-clause] where-clause] :
- options
- is a list of one or more of the following format options, separated by
commas. Defaults are listed in the first column.
INDENT BLOCK
NULL SUPPRESS NULL
NUMBER NAME
REPEAT REPEAT SUPPRESS
SINGLE SPACE DOUBLE SPACE
STUB STUB SUPPRESS
TREE RECORD
ZERO SUPPRESS ZERO
HEX OFF HEX ON
See FORMOP
for details on format options.
- TITLE
- allows you to insert a comment within the output. (If you do not
specify format options, do not include a comma before the keyword
TITLE.)
- comment
- can be any string of characters not containing the command terminator or
a slash. The comment cannot begin with (, B(, D(, F(, L(, R(, or S(,
and it must be less than 130 characters long, although leading,
trailing, and extraneous blanks are not counted. The comment is
displayed with the echo of the command in the Message File.
- retrieval-clause
- specifies a list of one or more retrieval objects, separated by commas.
See Retrieval-Clause.
- ordering-clause
- specifies the order of selected data records. A where-clause is
required if an ordering-clause is specified.
See Ordering-Clause.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
PRINT C1, C2:
PR C100 WHERE C1 = 1265:
PRINT/DOUBLE SPACE,INDENT/ C2,C4,C7,C15,C16 WHERE C1 LE 1003:
PRINT /TITLE THIS TEXT DISPLAYED IN MESSAGE FILE/ C1, C2, C3:
Rules
Back to Top of Page
QUEUE
Calls the QUEUE processor.
Syntax
QUEUE :
Example
USER, DEMO:
DBN IS EMPLOYEE:
.
. (QUEST commands)
.
QUEUE: (calls QUEUE)
.
.
.
Rules
Back to Top of Page
RELOAD
Reconstructs database files.
Syntax
RELOAD [[ordering-clause] where-clause] :
- ordering-clause
- specifies the order of selected data records. You can specify only
level 0 items. A where-clause is required if an ordering-clause is
specified.
See Ordering-Clause.
- where-clause
- selects specific data records. You cannot include the SAME operator.
See Where-Clause.
Examples
RELOAD:
RELOAD WHERE EMPLOYEE NUMBER < 5075:
RELOAD ORDERED BY C1 WHERE C1 EXISTS:
Rules
Back to Top of Page
REMOVE
Replaces values with nulls in selected data records.
Syntax
REMOVE item full-trace :
REMOVE item [partial-trace] where-clause :
REMOVE record full-trace :
REMOVE record [partial-trace] where-clause :
- item
- is a schema item name or component number.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- where-clause
- selects specific data records.
See Where-Clause.
- record
- is a schema record name or component number.
Examples
RE CURRENT DEDUCTION WH C113 EQ 03/01/90 AND C1 EQ 1120:
REMOVE C302 WHERE C1 = 1043:
REMOVE ENTRY WHERE C1 FAILS:
Rules
Back to Top of Page
REMOVE TREE
Removes data trees (including the data) from a database.
Syntax
REMOVE TREE record full-trace :
REMOVE TREE record [partial-trace] where-clause :
- record
- is a schema record name or component number; the target record.
- full-trace
- is a list of one or more positive integers or 0, each preceded by the
system separator (for example, *1*4*0). In a left-to-right scan, each
integer designates the position of the child record under its parent at
each level. The rightmost integer designates the level 0 position.
Zero means last.
- partial-trace
- is a trace in which the rightmost integer designates a position other
than level 0.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
REMOVE TREE ENTRY WHERE C2 = REID:
RT C130 *2 WHERE C1 EQ 1340:
Rules
Back to Top of Page
REPORT
Calls the REPORT processor.
Syntax
REPORT :
Example
USER, DEMO:
DBN IS EMPLOYEE:
.
. (QUEST commands)
.
REPORT: (calls REPORT)
.
.
.
Rules
For information about REPORT processor commands,
see SYSTEM 2000 REPORT Language, Version 12, First Edition.
Back to Top of Page
Retrieval-Clause
Specifies a list of components to be retrieved with a LIST, PRINT,
UNLOAD, or COLLECT command. Can include records, items, stored strings,
stored functions, ad hoc functions, system functions, by-clauses, and
Collect File items -- separated by commas. Can be followed by an
ordering-clause, a where-clause, or both.
Syntax
units
- unit
|item
|record
|* function *
|* function (parameters)
|* string *
|* string (parameters)
|(adhoc-function)
|system-function
|by-clause
|cf-item
- item
- is a schema item name or component number.
- record
- is a schema record name or component number. The record cannot be
specified in the retrieval-clause of a LIST command unless it appears in
a by-phrase or with the COUNT system function.
- function
- is a stored function name or component number.
- string
- is a stored string name or component number.
- parameters
- are the values that replace the numbered parameters in the stored
function or string.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- system-function
- allows you to obtain simple arithmetic statistics about values stored
in a database. System functions include:
AVG, COUNT, MAX, MIN, SIGMA, and SUM.
See System Function.
- by-clause
- specifies that only values for certain items are to be displayed in
logical order.
See By-Clause.
- cf-item
- is a Collect File item name. The item name must be followed by (CF) if
it has the same name as a schema component.
Examples
PR C1, C2, C3:
PRINT LAST NAME WHERE ACCRUED VACATION EXISTS:
LIST C1, C2, C3, *C2010* WH C1 LE 1010:
PR (C114 + C126) WH C1 EQ 1010:
PR SUM C124 BY C110, SUM C124 BY DATA BASE WH C1 = 1120:
PR MIN C2, MAX C2:
PR C1, (*FTODAY* - C4) WH C1 <= 1004:
Rules
Back to Top of Page
SAME IS
Tells the software which retained list of qualified data records to use
when the SAME operator is specified.
Syntax
SAME IS DYNAMIC :
SAME IS STATIC :
Example
SA IS STATIC:
Rules
-
Abbreviation: SAME = SA
-
At the beginning of each session, SAME is set to DYNAMIC.
-
The DYNAMIC setting allows you to issue a sequence of commands acting on
an evolving collection of data records.
-
The STATIC setting allows you to issue a sequence of commands acting on
a static collection of data records. For each individual command, the
collection can be modified with additional qualification criteria.
Back to Top of Page
STOP IF/CONTINUE IF
STOP IF specifies a limit of command errors that can occur before the
software ends a session. CONTINUE IF reverses the limit set in a STOP
IF command.
Syntax
STOP [AFTER SCAN] IF |[ANY] [UPDATE] |COMMAND IS REJECTED :
|[n] |COMMANDS ARE
CONTINUE [AFTER SCAN] IF |COMMAND IS REJECTED :
|COMMANDS ARE
- ANY
- is the default maximum error count, which specifies 1.
- n
- is the maximum error count. The number must be greater than 0.
- UPDATE
- If you omit the UPDATE option, all command errors are counted.
Examples
STOP IF 2 COMMANDS ARE REJECTED:
CONTINUE IF COMMANDS ARE REJECTED:
STOP IF ANY COMMAND IS REJECTED:
STOP IF 2 UPDATE COMMANDS ARE REJECTED:
STOP AFTER SCAN IF 9 COMMANDS ARE REJECTED:
Rules
-
Abbreviation: AFTER = AF
-
The status of STOP IF remains the same if you change processors.
Back to Top of Page
System Function
Obtains simple statistics about database values.
Syntax
|AVG unit [by-phrase]
|COUNT
|MAX
|MIN
|SIGMA
|SUM
- unit
|item
|record
|stored-function
|(adhoc-function)
|cf-item
|(system-function)
- item
- is a schema item name or component number.
- record
- is a schema record name or component number.
- stored-function
- is a stored function name or component number with
optional parameters.
- adhoc-function
- is a mathematical expression enclosed in parentheses.
See Ad Hoc Function.
- cf-item
- is a Collect File item name.
- by-phrase
BY |record
|DATA BASE
See By-Clause .
- system-function
- You can have one system function inside another. The inner system
function must be enclosed in parentheses.
Examples
PRINT MIN C2, MAX C2:
PR COUNT C126, MIN C126, MAX C126, SUM C126, AVG C126, SIGMA C126:
PR SUM C124 BY C0 WH C1 LE 1010:
PR AVG (SUM C124 BY C0):
PR (((MIN C126) + (MAX C126))/2):
Rules
You can use system functions in the action-clause of a LIST, PRINT, or
UNLOAD command, in an ordering-clause with a by-phrase, and in update
commands if the system functions are enclosed in parentheses.
-
AVG produces the average of the values stored for the requested numeric
item.
-
COUNT produces a count of the number of times a data value exists or a
data record occurs. This is the only system function you can use with
records.
-
MAX produces the maximum value stored for the requested item.
-
MIN produces the minimum value stored for the requested item.
-
SIGMA produces the standard deviation for the requested numeric item.
-
SUM adds all the values for the requested numeric item.
-
You can use any system function with a by-phrase, but the by-phrase
should contain an ancestor record name or number.
-
You can use SUM, AVG, and SIGMA with numeric item types only (including
dates).
-
You cannot use Collect File items with system functions.
-
If you use a system function in an ad hoc function, the system function
must be enclosed in parentheses.
-
When the ZERO format option is in effect and when the object of a system
function is enclosed in parentheses, nulls are treated as zero.
Back to Top of Page
System String
Provides the current date in date and function format and the current
time according to your computer's internal calendar and clock.
Syntax
*NOW* current time
*TODAY* current date
*FTODAY* current date in function format
Examples
PRINT C1, (*FTODAY* - C4) WHERE C1 LE 1004:
LIST/TITLE D(20) *NOW*/ C1, C2, C3 WH C1 <= 1010:
Rules
Back to Top of Page
TALLY
Provides summary information about the values stored for key items in a
database.
Syntax
TALLY |[/EACH/] items :
|[/ALL/]
- items
- is a list of one or more key item names or component numbers, separated
by commas. The maximum is 96 items.
Examples
TA /EACH/ C8:
TALLY C7, C8, C9, C102:
Rules
Abbreviation: TALLY = TA
-
At the beginning of each session, TALLY is set to EACH.
-
EACH lists each distinct value for the specified items as well as the
number of times each value occurs, along with the total number of values
and total occurrences.
-
ALL lists only the minimum and maximum values for the specified items,
along with the total number of distinct values and total occurrences.
-
You must have R-authority for items specified in a TALLY command.
-
If Security by Entry is in effect, only the master password holder can
issue TALLY.
-
Issuing the LIMIT command affects TALLY output. Only values whose
number of occurrences fall in the range of the limits are displayed.
-
SINGLE SPACE/DOUBLE SPACE is the only format option that affects TALLY.
Back to Top of Page
UNLOAD
Retrieves data in a format suitable for use in a Data File.
Syntax
UNLOAD :
UNLOAD [/[options] [,TITLE comment]/] retrieval-clause
[[,ordering-clause] where-clause] :
UNLOAD/COLLECT FILE [,options] [,TITLE comment]/ :
- options
- is a list of one or more of the following format options, separated by
commas. Defaults are listed in the first column.
INDENT BLOCK
NULL SUPPRESS NULL
NUMBER NAME
REPEAT REPEAT SUPPRESS
SINGLE SPACE DOUBLE SPACE
STUB STUB SUPPRESS
TREE RECORD
ZERO SUPPRESS ZERO
HEX OFF HEX ON
See FORMOP
for details on format options.
- TITLE
- allows you to insert a comment within the output. (If you do not
specify format options, do not include a comma before the keyword
TITLE.)
- comment
- can be any string of characters not containing the command terminator or
a slash. The comment cannot begin with (, B(, D(, F(, L(, R(, or S(,
and it must be less than 130 characters long, although leading,
trailing, and extraneous blanks are not counted. The comment is
displayed with the echo of the command in the Message File.
- retrieval-clause
- specifies a list of retrieval objects, separated by commas.
See Retrieval-Clause.
- ordering-clause
- specifies the order of selected data records. A where-clause is
required if an ordering-clause is specified.
See Ordering-Clause.
- where-clause
- selects specific data records.
See Where-Clause.
Examples
UNLOAD:
UN C1, C2:
UNLOAD C100 WH C1 = 1265:
UNLOAD C1, C2, JOB SKILLS WH C1 EQ 1120:
UNLOAD /RECORD/ C100 WH C1 = 1265:
UN C1, C2, SUM C126, (C124 - C114) WH C1 EQ 1265:
UNLOAD /CF/:
Rules
Back to Top of Page
Where-Clause
Selects a subset of a database for retrieval or update commands. A
where-clause consists of one or more expressions following the keyword
WHERE. Each expression is made up of one or more conditions that an
item value must meet.
Syntax
WHERE expression
- expression
|condition
|(expression)
|NOT expression
|expression AND expression
|expression OR expression
|record HAS expression
|expression AT n
|SAME
- condition
[NON-KEY] item |unary-operator
|binary-operator value
|ternary-operator value * value
|CONTAINS text
|* binary-operator item *
|* binary-operator cf-item [(CF)] *
|IN (value, value [, value])
|CTNSIN (value, value [, value])
- NOT
- finds the complement of specified criteria.
- AND
- combines two expressions by finding data records that satisfy both
expressions.
- OR
- combines two expressions by finding data records that satisfy either
expression or both.
- record
- is a schema record name or component number.
- HAS
- specifies a focal record to qualify data records based on the contents
of descendant or ancestor data records.
- AT
- specifies a data record by its position under its parent.
- n
- is a 0 or a positive integer indicating position. Zero means last
position.
- SAME
- repeats the where-clause of a previous command with or without
additional qualification criteria.
- item
- is a schema item name or component number. The item can be key or
non-key.
- unary-operator
- EXISTS or FAILS
verifies existence or nonexistence of values for an item.
- binary-operator
- EQ, NE, GE, GT, LE, or LT
- ternary-operator
- EQ, NE, or SPANS
compares data values with a range of values.
- value
- is a literal value or a system string (*NOW*, *TODAY*, *FTODAY*).
Enclose the value with a delimiter of your choice. The default is the
slash. Ternary operators require a low value and a high value.
- CONTAINS
- searches for characters within an item's value.
- text
- uses the following syntax:
[[THE] CHARACTERS] substring
[* substring [correlation]] |[position]
|[interval]
[THE] |WORD substring |[position]
|PREFIX |[interval]
|SUFFIX
For details on searching for characters using CONTAINS, see
SYSTEM 2000 QUEST Language and System-Wide Commands, Version 12, First Edition
- cf-item
- is a Collect File item name. The item name may be followed by (CF) to
resolve a conflict between a schema item name and a Collect File item
name.
- IN
- causes the software to create a condition for each specified value.
The conditions are connected with the OR operator. Each condition
contains the specified item, the EQ operator, and one of the specified
values.
- CTNSIN
- causes the software to create a condition for each specified value.
The conditions are connected with the OR operator. Each condition
contains the specified item, the CONTAINS operator, and one of the
specified values. The software searches for the characters within
the item's value.
Examples
PRINT LAST NAME WHERE ACCRUED VACATION EXISTS:
PR LAST NAME WH EMPLOYEE STATUS NE FULL TIME OR EMPLOYEE
STATUS FAILS:
LI C2, C3 WH C13 FAILS AND C4 GE 01/01/91:
PR C2 WH HIRE DATE SPANS 01/01/88*12/31/1990:
PR C2 WH (MAJOR FIELD = MATH OR MINOR FIELD = MATH)
AND GENDER EQ FEMALE:
PR C2 WH C0 HAS C201 EQ FORTRAN AND C0 HAS C201 EQ COBOL:
PR C101 WH START DATE* = HIRE DATE*:
LIST C102, C103 WHERE C102 EXISTS AT 1:
AS C14 EQ 2311 HANSFORD* WH C411 EQ /COLLEGE OF WILLIAM AND MARY/:
LI BY ENTRY, C1, C2, C3, C101, C102, C7, C111, OB C2 WH C413
GT 06/01/1986 AND (C412 IN (MA, MBA, MS, PHD)).
LI C1, C2, C3 WH LAST NAME CONTAINS MAC:
LI C2, C3, C10, OB C2 WH C10 CONTAINS THE CHARACTERS 100*199 WITH
MATCH ON 3 CHARACTERS FROM POSITION 7 THRU LAST :
PR C1, C2 WH LAST NAME IN (SMITH, JONES):
PR C1, C2 WH LAST NAME CTNSIN (MC, SON, TON):
Rules
Abbreviations:
CHARACTERS = CHARACTER or CHAR
CONTAINS = CONT, CONTAIN, or CONTAINING
EXISTS = EXIST or EXISTING
FAILS = FAIL or FAILING
HAS = HAVE or HAVING
NON-KEY = NK
SAME = SA
SPANS = SPAN or SPANNING
WHERE = WH
-
You must have W-authority for components specified in a where-clause.
-
In some forms of the INSERT TREE and MOVE TREE commands, you need the
keywords BEFORE or AFTER instead of WHERE.
-
You can also use symbols for the following operators:
Operator Symbol
EQ =
GE >= or => or ^< or !<
GT >
LE <= or =< or ^> or !>
LT <
NE ^= or !=
AND &
OR |
NOT ^ or !
Without symbols, the software reads a blank on either side of an
operator to separate it from other syntactic units. However, with
symbols, blanks are not required for separation. Any blanks encountered
following a symbol are considered part of the value. For example, these
two where-clauses are equivalent:
WHERE C1 EQ ABC AND C2 GT DEF:
WHERE C1=ABC&C2>DEF:
If component names contain any of the symbols, use the component
numbers. Also, if you change the system separator to be any of the
symbols, syntax errors could occur if you were to specify that symbol in
the where-clause.
-
Parentheses control the order of processing, and they take precedence
over operators.
-
Operator precedence is as follows: AT, HAS, AND, OR.
-
When all conditions are joined by the same operator, key-conditions are
processed first from right to left. Non-key conditions are processed
later.
-
When a value includes any syntactic unit (such as the command
terminator, the system separator, OR, AT, AND, NOT, or a right
parenthesis), you must enclose the value with delimiters. The current
delimiter must not occur in a value enclosed by a delimiter.
-
You can use only items with the unary operators EXISTS and FAILS.
-
When comparing two items with a binary operator, both items must belong
to related schema records, and both must be either numeric or
nonnumeric. The system separator must follow each specified item.
-
Use a Collect File item only as the right-hand term of an item-to-item
comparison.
-
You cannot specify a range of values for the IN and CTNSIN operators.
All characters between the commas are treated as a single value.
-
For ternary operators, the low value must be less than or equal to the
high value as determined by the collating sequence.
See Collating Sequence and Character Set
in Appendices .
-
If the conditions in a where-clause combined by AND or OR contain
components that are disjoint, you must use the HAS operator.
-
You can specify more than one AT operator if the operators are separated
by parentheses.
-
If two AT operators are given, one must be AT 0.
-
You must specify the keyword NON-KEY to change a key condition into a
non-key condition.
-
To specify the SAME operator in a command, you must first issue a QUEST
command with a where-clause. You cannot use SAME if it is joined with
an unindexed expression by the binary operator OR.
See SAME IS .
-
Under Security by Entry, the first or only condition in the where-clause
must be a key-condition with the EQ operator. If the condition
specifying the Entry Key item is not the only condition in the
where-clause, it must be joined to the other condition or expression
with the AND operator.
-
The software guarantees that floating point values are precisely
compared. "Fuzzy" logic does not creep into where-clause logic. If you
do not know the precise value stored in the database, use the SPANS
operator to locate a range of imprecise values.
Back to Top of Page