Command reference / CL
ENDDO
End Do Group
Marks the end of a group of CL commands started by a DO command. Each DO needs its own ENDDO, and each level of nested groups needs one too. Extra ENDDO commands cause a message and stop the program from being created.
Allowed environments: *BPGM, *IPGM.
Use within a CL program.
Positional parameters: 0.
Restrictions
- Only valid inside a CL program or ILE CL procedure.
Parameters
No parameters.
Examples
IF &SWITCH DO : (group of CL commands) ENDDO
Runs the enclosed group only if &SWITCH is '1'; otherwise execution resumes after the ENDDO.
Generated from os/cl/catalog/ENDDO.json and os/cl/help/ENDDO.json.