
You can specify a CL compiler option to see the nesting level for all types of DO commands as well as SELECT commands.
Changing CL source code with many levels of DO command or SELECT command nesting can be difficult. You must correctly match each type of DO command with a matching ENDDO command. You also must match each SELECT command with a matching ENDSELECT command.
The CL compiler provides an option to show the nesting levels for Do (DO), Do For (DOFOR), Do Until (DOUNTIL), Do While (DOWHILE), and Select (SELECT) commands on the CL compiler listing. Specify *DOSLTLVL for the OPTION parameter on the Create CL Program (CRTCLPGM) command, Create CL Module (CRTCLMOD) command, or Create Bound CL Program (CRTBNDCL) command to have the nesting level appear in the compiler listing. If you do not want to see this nesting level information, you can specify *NODOSLTLVL for the OPTION parameter.
