AI, BI, CI...ZI


AI through ZI are index work variables for use in ILF statements. They are integer variables that can be used in computations which require only integers. Before setting these variables, any numbers with decimal places are automatically rounded up to the next higher integer. The range of values allowed is from –2,147,483,648 to +2,147,483,647, inclusive. These fields and their related fields, floating point variables A, B, C...Z, are the only fields that can be used in a CALC statement. Note that in the example below quantity and price are both rounded to integers as part of setting the variables AI and BI.

          SET      --- AI                         =  TAP INVOICE QUANTITY
          SET      --- BI                         =  TAP INVOICE PRICE
          CALC     CI = AI*BI

AI through ZI variables can also be used as index work variables in BEG LOOP/END LOOP and SET TEMP statements and in place of occurrence numbers and/or appearance numbers wherever such numbers occur. For example,

          BEG LOOP AI = 001 TO 010  STEP 001
          SET      TAP WORK COUNTER           AI  =      0
          END LOOP AI