Operation Control Language was not considered "real programming" like RPG, so some other name was needed, in place of programs.
With the advent of ILE, the word procedure has a new meaning. More properly called sub-procedures, a CL program can call an ILE sub-procedure via the CALLPRC command:
CALLPRC PRC(rpglePrc) parm(&char10 &char20) rtnval(&char2)
There is a known issue having an ILE sub-procedure return a one character value back to a CL program. It is documented in several Midrange-L threads. There are two recognised solutions:
- Change the sub-procedure to use
EXTPROC(*CL: 'MYPROCNAME')(V5R1 and later)
- Declare the return value as
*CHAR 2in the CL and substring out the left-most character.