The below example says how to use IFTHEN in sort card. IFTHEN will be used reformatting INREC or OUTREC.
Using IFTHEN clauses, you reformat different records in different ways by specifying how BUILD or OVERLAY items are applied to records that meet given criteria.
IFTHEN clauses let you use sophisticated conditional logic to choose how different record types are reformatted. You can use any INCLUDE logical expression to specify the criteria. You can use any BUILD or OVERLAY items to reformat the records that
meet those criteria.
You can also apply BUILD or OVERLAY items to all records, or only to records that do
not meet any of the criteria.
Here’s an example of reformatting with INREC and IFTHEN clauses:
One of the interview question is, IFTHEN is used for conditional logic.