Discussion
|
 |
Procedures are stored in the Proc-file.
Before using any of the QUERY procedure commands, you must specify
the name of the Proc-file. This definition stays in effect until changed
with the PROC-FILE = or DEFINE command or until execution terminates.
If the file name does not exist, QUERY issues a message and opens and
saves a disc file of size n with the specified file name using
a file code of 1070.
Once a Proc-file has been declared, QUERY always uses that file when
executing any of the commands listed in the following table. If you have
not specified the Proc-file before entering one of these commands,
QUERY prints an error message.
The following table shows the commands which are used to modify
procedures and those which are used to execute procedures. All
of these commands operate on the current Proc-file.
MODIFICATION | EXECUTION |
---|
ALTER
CREATE
DESTROY
DISPLAY
RENAME
|
FIND procedure
JOIN procedure
MULTIFIND procedure
REPORT procedure
SUBSET procedure
UPDATE procedure
|
Examples
|
 |
Example 1
In the following example DISPLAY LIST is used to list the procedures
in the current Proc-file. MANPROC contains five procedures.
>PROC-FILE =MANPROC
>DISPLAY LIST
FIND1 FIND2 UPD1 REP4 REP5
Example 2
You can create a Proc-file with the PROC-FILE = command. If you do not
specify the number of records QUERY creates a file with 126 records.
>PROC-FILE =PROCX
FILE DOES NOT EXIST, BEING CREATED
|