Parameter processing logic
The IF and ORIF parameters are used to create logical AND and OR conditions. Contiguous IF and ORIF parameters can be used to define sophisticated criteria. All selection parameters (IF, ORIF), limiting parameters (DROP, IN, OUT, SELECT), and action parameters (EDIT, EDITALL, MOVE, REPL, REPLALL, WRITE) are executed in the order they are entered.
Control parameters (such as FORM, KEY, etc.) should be coded before any selection parameters. See Function Descriptions for a chart listing parameters by their type.
Action, limiting, and print parameters may be coded before any selection parameters to act globally against all input records. However, if limiting or printing parameters are specified as global parameters, then the same parameter cannot be used again in the current control statement.
Selection parameter groups can be defined by coding contiguous selection parameters (IF, AND, ORIF) separated by action, limiting or printing parameters. Examples are provided in Coding Logical AND Conditions. Actions within a parameter group are applied, in order, when the selection criteria matches a record. Printing parameters in a parameter group operate until the number of selected records specified is reached. Once a printing parameter limit has been reached, no additional records are printed for a parameter group, but actions continue to be applied.
Limiting parameters (IN, OUT, SELECT, DROP) control action processing of the current function when used as global parameters. When used with parameter groups, they stop all action or print parameters associated with that selection. This does not apply to the IN parameter; it is always considered global and does not depend on meeting selection criteria.
Selection parameter groups are processed in the order that they are coded. As soon as the selection criteria matches a record, the action, printing, and limiting parameters coded after the selection, and before the next IF parameter, are processed. All following parameter groups are bypassed, and the next input record is read. The ALL function modifier (see ALL (A)) can be applied to most functions.
It forces File-AID to process all selection parameter groups for each input record. The TALLY and USER functions process all selection parameter groups by default.
The DROP function drops a record when a selection matches a record. Action, printing, and limiting parameters associated with the selection parameter group for dropping a record are processed. After a record is dropped, no further processing of any subsequent parameter groups is done until the next record is read.