19
ProvideX Session
The ProvideX environment comprises a Command mode and an Execution mode. When in
Command mode, ProvideX will be waiting for a directive or statement to be entered.
Execution mode begins once a RUN or a CALL directive is used to execute a program.
By default, ProvideX initializes in Command mode; as indicated by the Command mode
prompt '->'.
Directives can be entered in Command mode. If a directive does not include a leading
line number, it is executed immediately; otherwise, the statement is used in the
construction of a program. When a statement is inserted into a program, the prompt
changes from '->' to '-:' to indicate that the program has been changed but not saved.
When ProvideX is in Execution mode, it receives and executes all the statements that
constitute a program. The program remains in Execution mode until completed (via the
STOP or END directive), an error occurs, or it is interrupted via a BREAK or ESCAPE
instruction. The ProvideX session can be terminated using BYE, QUIT, or RELEASE.
These concepts are discussed in further detail in the ProvideX User's Guide.
Directives and Statements
In ProvideX, all processing is controlled by the use of directives commands that tell the
system what task is to be performed. Each program statement (line of code) consists of
one or more directives. When ProvideX executes a program, it executes all directives
contained in a statement from left to right, then proceeds to the next line. Some directives
provide the ability to alter the normal flow of execution.
The general format of a program statement includes a unique line number (optional), the
directive indicating the operation to perform, parameters, and comments. Parameters
are syntax elements, keywords, operators, and arguments that can be used to further
define a directive's operation. For example, the complete syntax for the CLOSE directive
appears as follows: CLOSE (chan[,ERR=stmtref])[,(chan[,ERR=stmtref])...]. Depending
on the statement, it is possible to exclude all but the mandatory parameters from the
directive, as in CLOSE (14).
See Chapter 2. Directives, p.27, for the complete list of directives and the details of
their mandatory or optional parameters.
System Functions
A ProvideX system function consists of a three-character function name followed by
an open parenthesis, the parameter(s) for the function, an optional error transfer, and
finally a close parenthesis, e.g., AND(A$,B$,ERR=0300). The number and type of
parameters vary from function to function. All may include the ERR= option (even
those where an error is unlikely). System functions are listed and described in