- Check your OpenESQL Assistant configuration and be sure that the
Use SQL TYPE check box is unchecked. This is necessary because the compiler does not support OCCURS clauses defined with SQL TYPE host variables.
- In the IDE, open the project that contains the program that contains the SELECT (cursor) query you want to modify.
- Open the appropriate program in your program editor.
- Locate the FETCH statement in the code generated for SELECT (cursor) statements.
- Remove the comments that appear before and between the PERFORM and END-PERFORM statements.
- Place your cursor between the PERFORM and END-PERFORM statements.
- In the OpenESQL Assistant, click the
Auxiliary Code tab.
- Click
Host Variables.
- In the
Host Variable Array Size field, type the number that represents the maximum number of rows you want returned for each array FETCH.
- Click
Insert Query into Current Program.
Note: If you decide to code the PERFORM without using code generated by OpenESQL Assistant, you should either define the index variable
IDX or modify the code to use a variable that has been already defined to process the array loop.