Adding an SQLJ iterator declaration clause to an SQLJ file

You can use a wizard to add an SQLJ iterator declaration clause to an SQLJ file. An SQLJ iterator declaration clause declares a positioned iterator class or named iterator class in an SQLJ application program.

Prerequisite: The SQLJ file must be open in the SQLJ editor.

You can insert an SQLJ iterator declaration clause anywhere in an SQLJ file that a Java class definition can appear in a Java program.

To add an SQLJ iterator declaration clause:

  1. In the open SQLJ file, place the cursor at the location in the code where you want to add the SQLJ iterator declaration clause.

  2. Right-click at the insertion point, and then click SQLJ Assist > Insert Iterator Declaration on the pop-up menu.

  3. On the SQLJ Iterator Declaration page, provide the information for the iterator declaration clause, and then click Next.

  4. On the Review SQLJ Clause page, click Finish.

The SQLJ iterator declaration clause is added to the code at the insertion point.

 

Parent topic

Developing SQLJ applications

 

Related tasks

Adding an SQLJ connection declaration clause to an SQLJ file
Adding an SQLJ assignment clause to an SQLJ file
Using a positioned iterator in an SQLJ application
Using a named iterator in an SQLJ application

Related reference
SQLJ iterator-declaration-clause
SQLJ Iterator Declaration page