Lists a procedure which is stored in the current Proc-file.
Syntax |
 |
D[ISPLAY] procedure name [,m [,n] ,file name] |
For example:
Where procedure name = PROCA, m = 2, n = 4
Where procedure name = GETIT
Where procedure name = REP4, file name = FILEB
Parameters |
 |
- procedure name
is the name of a procedure in the current Proc-file.
Refer to Table 2-2 “Procedure Commands” for a list of commands which
can be used in procedures.
- m and n
are the first and last line of the procedure (respectively)
to be displayed. m must be an integer less than or equal to n and greater than or equal to 1.
- file name
is the name of an MPE ASCII file into which the
displayed procedure is to be written.
Discussion |
 |
When you use this command, QUERY searches the current Proc-file
for the named procedure. If the procedure does not exist or if no
Proc-file has been declared, you are informed and prompted for another
command.
If the procedure does exist, it is listed with line numbers
for reference when editing the procedure with the ALTER command.
If line numbers (m,n) are included in the DISPLAY command, only those
lines specified will be listed. If only m is included, the procedure will be listed from line m to the end of the procedure.
Displaying to a File |
 |
If a file name is included in this command, QUERY writes the procedure
statements (excluding line numbers and header which appear as part
of the procedure listing) to the specified file. The entire procedure
must be transferred. Any existing information in the file is overwritten.
If you have access to save files and file name does not exist in your log-on group, QUERY creates
a new file using file name as the formal designator (name of the file). The
file size will be 200 records. The maximum Proc-file record size
is 125 words. The following message is printed when this situation
occurs.
FILE DOES NOT EXIST, BEING CREATED |
Example |
 |
>DISPLAY FIND1,FINDSET >DISPLAY FIND1 PROCEDURE: FIND1 001 FIND 002 CUSTOMER.ACCOUNT IS "" 003 END |
In the example above, the FIND1 procedure is written to file
FINDSET. Then FIND1 is listed on the terminal.
>OUT=LP >D FINDCH >OUT=TERM >D FINDCH PROCEDURE: FINDCH 001 FIND CHAIN 002 CUSTOMER.ACCOUNT,SALES.ACCOUNT 003 IS "" END |
When OUTPUT=LP, the list is printed on the QSLIST device.
When OUTPUT=TERM, the list is printed on the terminal.
>D FINDCH,2 PROCEDURE: FINCH 002 CUSTOMER.ACCOUNT,SALES.ACCOUNT 003 IS "" END |
A single line or a range of lines can be displayed.