Setting variables

You can temporarily store input records in the variable area, and use them for data processing. Because the values stored in the variable area are retained, you can store multiple record values in that area and use them to conduct numeric computations. You can also store previously loaded record values in the same area, and compare them to or use them to judge the values of subsequent records.

You can set variables in the Variable Settings screen in the Data Processing Settings screen.

The following figure shows how the variable area is processed. In this example, the variable area is used to sort input data records into even number records and odd number records, and then output them in separate files. The variable (judgment flag) used to determine whether a record number is odd or even is specified, and numeric computations are performed each time an input record is loaded.

Figure 4.15 Setting variables