Resources

Home   News   Version 1   Tech Support   Pubs   S2K Site Map



SYSTEM 2000 Quick Reference Guide System-Wide Commands



Changing Processors

The CONTROL, DEFINE, and QUEST commands call the CONTROL, DEFINE, and QUEST processors respectively, so that you can issue commands specific to that processor.

Syntax

CONTROL :

DEFINE :

QUEST : (or ACCESS :)

Example

USER, DEMO:
DBN IS EMPLOYEE:                  (automatically calls QUEST)
   .
   .  (QUEST commands)
   .
CONTROL:                                      (calls CONTROL)
   .
   .  (CONTROL commands)
   .
QUEST:                                          (calls QUEST)
   .
   .  (QUEST commands)
   .
EXIT:                      (closes database and ends session)

Rules

Back to Top of Page


COMMAND FILE IS

Immediately switches the software to start reading commands from an alternate Command File.

Syntax

[LOCAL] COMMAND FILE IS |INPUT    :
                        |fileref
LOCAL
directs the software to look for the Command File in your TSO region or CMS machine.

fileref
is the DDname of your alternate Command File. Do not use reserved file names. See Reserved File Names in Appendices .

Examples

COMMAND FILE IS MYCOM:

LOCAL COMMAND FILE IS COM1:

Rules

Back to Top of Page


DATA FILE IS

Tells the software to read data from an alternate Data File.

Syntax

[LOCAL] DATA FILE IS |INPUT    :
                     |fileref
LOCAL
directs the software to look for the Data File in your TSO region or CMS machine.

fileref
is the DDname of your alternate Data File. Do not use reserved file names. See Reserved File Names in Appendices .

Examples

DATA FILE IS MYDATA:

LOCAL DATA FILE IS DATA1:

Rules

Back to Top of Page


DELIMITER IS

Changes the where-clause delimiter. The where-clause delimiter encloses a value in any where-clause condition for QUEST commands, for the DEFINE language MAP command, and for the REPORT language GENERATE command.

Syntax

DELIMITER IS delimiter :
delimiter
is a single special character to be used as the where-clause delimiter. The delimiter cannot be used in values, and it cannot be the same as the current system separator or the command terminator. See Special Characters in Appendices .

Example

DELIMITER IS $:
   .
   .
   .
PRINT ENTRY WHERE C303 EQ $CHURCH AND SCHOOL$:
   .
   .
   .
DITTO WHERE C303 GT $SCHOOL/UNIVERSITY$:

Rules

Back to Top of Page


ECHO

Writes comments or commands to the Report File and directs the software to write input commands to the Message File.

Syntax

ECHO |ON                   :
     |OFF
     |delimiter string delimiter
delimiter
is a single special character to be used as the ECHO string delimiter. The delimiter cannot be the same as the current system separator or the command terminator. See Special Characters in Appendices .

string
defines a string of characters not containing the character used for the delimiter. The maximum is 249 characters. You can issue as many ECHO string commands as needed.

Examples

ECHO ON:
(echoes commands and results)
ECHO OFF:
(echoes results only)
ECHO/MAP:COMMAND FILE IS INPUT:/:
(writes MAP:COMMAND FILE IS INPUT: on the Report File)
ECHO/THIS IS A COMMENT/:
(writes THIS IS A COMMENT on the Report File)

Rules

Back to Top of Page


ENTRY TERMINATOR IS

Changes the entry terminator word. The entry terminator word signals the end of data for a data tree in a loader stream or in an update command.

Syntax

ENTRY TERMINATOR IS word :
word
is a name to be used as the entry terminator word. The name can be from 1 to 4 alphanumeric characters with no blanks. If you use a special character, it must be only one character, and it cannot be the same as the current system separator or the command terminator. See Special Characters in Appendices .

Example

ENTRY TERMINATOR IS FINI:
   .
   .
   .
IT C120*1*1*1 EQ 121*06/30/91*FINI* WH C1 EXISTS:

Rules

Back to Top of Page


EXIT

Closes the database and ends the session.

Syntax

EXIT :

Example

EXIT:

Rules

Back to Top of Page


IF...THEN...ELSE

Conditionally executes any sequence of CONTROL, DEFINE, or QUEST commands, and tests system variables.

Syntax

IF expression THEN commands ...

                [ELSE commands ...]

                ENDIF :
expression
|condition
|NOT expression
|(expression)
|expression [AND expression]
|expression [OR expression]

condition
|COMPLETE
|WARNING [OCCURRED]
|ERROR [OCCURRED]
|MESSAGE [NUMBER] binary-operator message
|MESSAGE [NUMBER] ternary-operator message * message
|[SELECTED] RECORDS binary-operator integer
|[SELECTED] RECORDS ternary-operator integer * integer
|DATA BASE CYCLE binary-operator integer
|DATA BASE CYCLE ternary-operator integer * integer
|PASSWORD binary-operator password
|PASSWORD ternary-operator password * password
|MASTER PASSWORD

binary-operator
LT, LE, NE, EQ, GT, or GE

ternary-operator
EQ, SPANS, or NE

message
is a Self-Contained Facility message number.

integer
is a positive number.

password
is a password of 1 to 4 alphanumeric characters with no blanks.

commands
are Self-Contained Facility commands. Each command must end with a command terminator.

Examples

IF MSG = 502 THEN RESTORE MYDATA FROM SAS1234:
              ENDIF:

IF W AND MSG EQ 81 THEN ...

IF COMPLETE THEN ...

IF WARNING OCCURRED THEN ...

IF E THEN ...

IF MESSAGE NUMBER EQ 507 THEN ...

IF MSG SPANS 300* 310 THEN ...

IF MSG > 799 THEN ...

IF SELECTED RECORDS =< 100 THEN ...

IF RECS EQ 4 THEN ...

IF MPW THEN ...

IF PASSWORD = ABC THEN ...

IF DB CYCLE GT 375 THEN ...

Rules

Back to Top of Page


Inserting Comments

A comment can be inserted after any CONTROL, DEFINE, QUEST, QUEUE, or REPORT language command. For example, comments can explain job streams or serve archival purposes.

Syntax

delimiter comment delimiter
delimiter
is a single special character to be used as the comment delimiter. The delimiter cannot be the same as the current system separator or the command terminator. Also, the beginning and ending delimiter must be the same. See Special Characters in Appendices .

comment
defines a string of 1 to 250 characters. It cannot contain the delimiter.

Examples

1*EMPLOYEE NUMBER (INTEGER 9999): &MUST BE FOUR DIGITS&

PRINT C1, C5:
   .
   .
   .
$NEXT COMMAND COMMENTED OUT FOR TEST RUN$
$MESSAGE FILE IS ABCCMT:$

Rules

Back to Top of Page


LOOKUP IS

Provides you some flexibility in changing from one processor to another. If processor lookup is activated and you issue a command that is not valid for the current processor, the software will try to switch you to the appropriate processor.

Syntax

LOOKUP [IS] |OFF :
            |ON

Examples

LOOKUP IS ON:

LOOKUP IS OFF:

Rules

Back to Top of Page


MESSAGE FILE IS

Tells the software to write messages and echoes of commands to an alternate Message File.

Syntax

[LOCAL] MESSAGE FILE IS |OUTPUT   :
                        |fileref
LOCAL
directs the software to look for the Message File in your TSO region or CMS machine.

fileref
is the DDname of your alternate Message File. Do not use reserved file names. See Reserved File Names in Appendices .

Examples

MESSAGE FILE IS MYMSG:

LOCAL MESSAGE FILE IS S2KMSG:

Rules

Back to Top of Page


PROMPT IS

Allows you to choose another system prompt during a session. Instead of the standard three dashes (- - -), the system prompt can be the name of the current processor. Or you can turn the prompt off.

Syntax

PROMPT [IS] |DASH      :
            |PROCESSOR
            |OFF

Example

---
USER, DEMO:
---
DBN IS EMPLOYEE:
---
PROMPT IS PROCESSOR:
QUEST>
LIST C1, C2, C3, C4 WHERE C4 GT 01/01/1988:
   (command output)
QUEST>
PROMPT IS OFF:
DESCRIBE:
   (command output)
PROMPT IS ON:
---

Rules

Back to Top of Page


REPORT FILE IS

Immediately switches the software to start writing retrieval command output to an alternate Report File.

Syntax

[LOCAL] REPORT FILE IS |OUTPUT  :
                       |fileref
LOCAL
directs the software to look for the Report File in your TSO region or CMS machine.

fileref
is the DDname of your alternate Report File. Do not use reserved file names. See Reserved File Names in Appendices .

Examples

REPORT FILE IS MYREPORT:

LOCAL REPORT FILE IS RPTOUT:

Rules

Back to Top of Page


SEPARATOR IS

Changes the system separator. The system separator separates labels from values and also marks the end of a value.

Syntax

SEPARATOR IS symbol :
symbol
is a single special character to be used as the system separator. The system separator cannot be used in values, and it cannot be the same as the current where-clause delimiter or the command terminator. See Special Characters in Appendices .

Example

SEPARATOR IS $:
   .
   .
   .
REMOVE TREE ENTRY $ 4:

PRINT ENTRY WHERE C1 SPANS 1100 $ 1251:

Rules

Back to Top of Page


SHOW

Writes system variables to the Message File.

Syntax

SHOW SYSTEM VARIABLES :

Example

SHOW SYS VARS:

Rules

Back to Top of Page


TIMING

Reports statistics about I/O requests and CPU utilization for commands.

Syntax

TIMING |OFF :
       |ON

Examples

TIMING ON:

TIMING OFF:

Rules

Back to Top of Page