Logic Flowcharts › PostSORT Processing
PostSORT Processing
If there is a SORT statement, CA JARS Wizard performs the following steps:
- Reads a record from the file of sorted records. If there is no SORT, it reads directly from the input file.
- Resets all the work fields to zero or to their initial values in the DEFINE statement, except for the work fields that were defined with the DEFINE(K) statement.
- Executes the COMPUTE(U) statements.
- Evaluates the SELECT(S) and REJECT(S) statements.
If the SELECT(S) conditions are met or the REJECT(S) conditions are not met, the record is processed further.
- Performs the DECODE, COMPUTE, EXCEPTION, and CALL statements.
There can be multiple statements for each of these control functions. CA JARS Wizard strings all the statements that are of the same function and executes the series of instructions as if they were one statement. The strung instructions execute in the chronological order in which they appear in the input job stream.
- Calculations for any CALENDAR report are performed.
- Evaluates the SELECT(L) and REJECT(L) statements. If the SELECT(L) conditions are met and the REJECT(L) conditions are not met, then the record is processed further.
- Prints the detail lines as specified in the LIST statement.
- At the end of the file, CA JARS Wizard loops through the steps above and after printing the highest level control break, it executes the series of COMPUTE(G) statements. It prints the horizontal grand total line as defined by the LIST or LIST(SUM) statement and the vertical grand total line as specified by the suffixes (T), (Tn) and (TG). Finally, it prints the run statistics and terminates.
|
Copyright © 2012 CA.
All rights reserved.
|
|