Logic flow
The sequence that follows shows the order in which PRL statements are processed.
Those steps that are noted as optional are user dependent. If the PRL described in an optional step is used, it should be written as sequenced.
- (optional) Set the titles and size of your report.
(optional) Set any variables that you want as constants.A value assigned to a variable before a SELECT statement does not change unless the variable is used again after the SELECT statement.
- Select the record types as input to your report using the SELECT statement.
- (optional) Qualify record selection with a WHERE statement.
- (optional) Evaluate data with a COMPUTE statement.
- Specify the data to be reported with a USING statement.
- (optional) Sort the data with ORDER BY.If DETAIL or SUMMARY is specified, the first variable of ORDER BY must be the same as the first variable of the USING statement. The records are selected and ordered until end of file, and then reported.
- (optional) Tabulate the data with DETAIL or SUMMARY.DETAIL or SUMMARY causes a break in the reporting whenever the first variable of the USING statement changes. A summary is computed at each break.
- Report each selected record using the REPORT statement.Any variables defined after a SELECT statement and before a REPORT statement are assigned a specified value every time a record is reported and a new record selected, until end of file.
(optional) Print footnotes, calculated variables, or comments after all records are reported using the PRINT statement.
- End the PRL program (the END statement).
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*