This kind of PERFORM browse through each elements of multi-dimensional array. For this purpose, we can use PERFORM in below specified format (below is simplified syntax for 2-dimentional array look up)
Basic syntax:-
PERFORM [para-1 [{THRU/THROUGH} para-n]]
VARYING id-1 FROM id-2
BY id-3 UNTIL condition-1
AFTER VARYING id-4 FROM id-5
BY id-6 UNTIL condition-2
[statement-block END-PERFORM]
Where,
para-1, para-n are paragraph names which we want to call
id-1,id-4 can be numeric data item or index data item
id-2,id-5 can be numeric data item or index data item or literal
id-3,id-6 can be numeric data item or literal
condition-1, condition-2 is any conditional-expression which can return either true or false
[statement-block END-PERFORM] is used for Inline PERFORM.
Example:-
Suppose we have data stored in our array (table) in below format