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

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.

IBM command documentation

Generated from os/cl/catalog/ENDDO.json and os/cl/help/ENDDO.json.