DISPLAY PROCEDURE command: Procedure text

From m204wiki
Jump to navigation Jump to search

Summary

Privileges
Any user
Function
Displays the text of procedures

Syntax

DISPLAY [PROCEDURE] [(display-option [,display-option]...)] {ALL | [NAME]={procnumber | procname} [,procnumber... | ,procname...] | PCLASS=pclass [,pclass]...}

Where:

display-option is one of the following:

Option Lists...

ALIAS

Aliases for each of the specified procedures in addition to the other information requested.

COMPACT

Procedures in compressed format. Each procedure begins printing following the end of the previous procedure. If COMPACT is not specified, each new procedure begins on a new page.

LABEL

Official names of each of the specified procedures in addition to the other information requested.

If LABEL is specified in the context of a group with multiple procedure files, then display format for each procedure begins with the line:

IN FILE filename PROCEDURE procname

Otherwise, Model 204 precedes the first line of each procedure with the line:

PROCEDURE procname

It follows the last line with:

END PROCEDURE

If the procedure has a procedure security class and you can display the procedure, the procedure class is also listed when LABEL is specified.

NOUSE

Procedures on your terminal even if a USE command precedes the DISPLAY command. Any alternate device is not used, but remains open.

procnumber is the number of an existing temporary procedure to be displayed; it can be zero or a negative number.

procname is the name of an existing procedure to be displayed. If the NAME specification is not included, neither procnumber nor procname is specified; temporary procedure 0 is displayed.

pclass is the number of a procedure class associated with the procedure; the number is in the range 1 to 255. Procedures in this class are listed.

NUMBER

Procedure with numbered lines. Each line begins with a sequential line number, followed by an asterisk.

Syntax notes

The combination of ALIAS, LABEL, NUMBER, and any defaults determines the amount of information that is displayed for the specified procedures. Any of these options can be combined with COMPACT to compress the procedure output and with NOUSE to display the output on your terminal.

Parentheses are required around display options. Display options can be separated by commas or by one or more blanks.

Example

The following example displays in alphabetical order and in compressed format the names and text of all procedures:

DISPLAY PROCEDURE - (LABEL,COMPACT) ALL PROCEDURE ALLCLIENTS BEGIN CNT.RECS: FIND AND PRINT COUNT RECTYPE = DRIVER END FIND END END PROCEDURE PROCEDURE ALLMAKES BEGIN FIND.RECS: IN VEHICLES - FIND ALL VALUES OF MAKE PRINT.VALS: FOR EACH VALUE IN FIND.RECS PRINT VALUE IN PRINT.VALS END FOR END END PROCEDURE PROCEDURE ALLT3S BEGIN FIND.RECS: IN CLIENTS - FIND ALL RECORDS FOR WHICH INCIDENT = T3 END FIND FOR EACH RECORD IN FIND.RECS PRINT FULLNAME - WITH POLICY NO TO COLUMN 30 END FOR END END PROCEDURE

The following example displays in alphabetical order and in compressed format the names and text of procedures in the procedure classes specified. Because, in this case, multiple procedure files were specified for the group, the file name SALESBIZ in which the procedure is contained is displayed:

DISPLAY PROC (LABEL,COMPACT) - PCLASS=10,5 IN FILE SALESBIZ PROCEDURE ALLCLIENTS PCLASS = 10 BEGIN CNT.RECS: FIND AND PRINT COUNT RECTYPE = DRIVER END FIND END END PROCEDURE IN FILE SALESBIZ PROCEDURE ALLMAKES PCLASS=5 BEGIN FIND.RECS: IN VEHICLES - FIND ALL VALUES OF MAKE PRINT.VALS: FOR EACH VALUE IN FIND.RECS PRINT VALUE IN PRINT.VALS END FOR END END PROCEDURE IN FILE SALESBIZ PROCEDURE ALLT3S PCLASS=10 BEGIN FIND.RECS: IN CLIENTS - FIND ALL RECORDS FOR WHICH INCIDENT = T3 END FIND FOR EACH RECORD IN FIND.RECS PRINT FULLNAME - WITH POLICY NO TO COLUMN 30 END FOR END END PROCEDURE

Usage notes

This form of the DISPLAY PROCEDURE command displays the text of a user's procedure. The command lists procedures in the currently open file or group. If the current default is a group, a procedure file (PROCFILE) must have been defined for it. (See CREATE: File.)

If ALL is specified, Model 204 lists the text of all procedures to which you have display or USE access privileges. If NAME is specified, Model 204 displays only the requested procedures. If PCLASS is specified, Model 204 displays only procedures in the specified procedure classes. Procedures are listed in the format specified by the display options.

The output of the DISPLAY PROCEDURE command is sorted by procedure name whenever the ALL or PCLASS name list is specified. The procedure name does not appear on the output generated when ALL is specified unless the LABEL option is also specified. Indicating specific field or procedure names in the name list of the DISPLAY command continues to generate output in the order in which the field or procedure names appear in the name list.

See also