Hello,
I'm trying to write a CL that takes a system value to return and then returns the value. This is my code :
However, if the system value is character, IBM states the return variable must be the exact length of the system value:
Does anyone know how I can create my program without needing to have a huge SELECT for each system value or return value possible ? Something more dynamic.
Thanks!
I'm trying to write a CL that takes a system value to return and then returns the value. This is my code :
Code:
PGM PARM(&PSYSVAL &VALUE) DCL &PSYSVAL *CHAR 10 DCL &VALUE *CHAR 50 DCL &VALUEDEC *DEC 15 0 RTVSYSVAL SYSVAL(&PSYSVAL) RTNVAR(&VALUE) MONMSG MSGID(CPF0000) EXEC(RTVSYSVAL SYSVAL(&PSYSVAL) + RTNVAR(&VALUEDEC)) ENDPGM
For character and logical system values, the length of the CL variable must equal the length of the system value.
Does anyone know how I can create my program without needing to have a huge SELECT for each system value or return value possible ? Something more dynamic.
Thanks!
Comment