Command reference / CL

ENDSELECT

End Select

Used with the SELECT command to select a group of commands to process. Specifies the end of the select group started by an associated SELECT command, and must be placed after the last WHEN or OTHERWISE command in that group. When select groups are nested, each group needs its own ENDSELECT. Every ENDSELECT must match a SELECT; if there are too many, a message is issued and the program is not created.

Allowed environments: *BPGM, *IPGM. Use within a CL program. Positional parameters: 0.

Restrictions

Parameters

No parameters.

Examples

SELECT / WHEN COND(&NAME *EQ *CMD) THEN(DO) / ENDDO / ENDSELECT

The ENDSELECT command ends an active SELECT command group.

IBM command documentation

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