IBM i Control Language is a programming language created in 1993. The IBM i Control Language (CL) is a scripting language for the IBM's IBM i platform (previously called OS/400 when running on AS/400 systems) bearing a resemblance to the IBM Job Control Language and consisting of an ever-expanding set of command objects (*CMD) used to invoke traditional AS/400 programs and/or get help on what those programs do. CL can also be used to create CL programs (congruent to shell scripts) where there are additional commands that provide program-like functionality (IF/ELSE, variable declaration, file input, etc.) Although CL is a scripting language for system administration, it is used mainly to create compiled programs. The use of interpreted CL scripts through the SBMDBJOB command is in fact extremely limited. Read more on Wikipedia...
- the IBM i Control Language wikipedia page
- IBM i Control Language first appeared in 1993
- See also: jcl, pl-i, windows-powershell, unix, c
- Have a question about IBM i Control Language not answered here? Email me and let me know how I can help.
Example code from Wikipedia:
PGM (&IN &TYP) DCL &IN *CHAR 6 DCL &OUT *CHAR 8 DCL &TYP *CHAR 1 IF (&TYP = J) + DO CVTDAT DATE(&IN) TOVAR(&OUT) FROMFMT(*MDY) + TOFMT(*JUL) TOSEP(*NONE) ENDDO ELSE IF (&TYP = M) + DO CVTDAT DATE(&IN) TOVAR(&OUT) FROMFMT(*JUL) + TOFMT(*MDY) TOSEP(*NONE) ENDDO SNDPGMMSG MSG('IN=' || &IN || ' OUT=' || &OUT) + MSGTYPE(*COMP) ENDPGM
Last updated January 25th, 2020