Example: A school wants to rank the entire student body by grade point index. This application simply requires selecting the two relevant fields out of all the fields in the student records and, then, sorting on the Grade Point Index field. (The Input Record layout is given in the figure Input Record Layout.)
The following figure shows the input record after INREC processing.
Explanation: Specifying the two relevant data fields--the Social Security Number (1,9) and the Grade Point Index (74,2)--on the INREC statement provides the sort with necessary data for the application and eliminates the fields that are not relevant to the application. INREC processing thus shortens each record to just a little under 14% of its original size.