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
- Valid only within a CL program or ILE CL procedure. There are no parameters for this command.
Parameters
No parameters.
Examples
SELECT / WHEN COND(&NAME *EQ *CMD) THEN(DO) / ENDDO / ENDSELECT
The ENDSELECT command ends an active SELECT command group.
Generated from os/cl/catalog/ENDSELECT.json and os/cl/help/ENDSELECT.json.