Is that valid in CL program?
Page 1 of 1
Is that valid in CL program?
Is the following command valid in CL program?
CALL PGM(PGMA) PARM(SOMEVALUE)
You might be wondering that Why is there NO & on the beginning of SOMEVALUE?
The above is valid CALL that SOMEVALUE is not a variable, but a character literal. If we do not prefix & then it will considered as a character literal by the CL compiler. So the following are are the same :
1) CALL PGM(PGMA) PARM(SOMEVALUE)
2) CALL PGM(PGMA) PARM('SOMEVALUE')
3) CALL PGM(PGMA) PARM(SOMEvalue)
Having said that no need to keep the char literal within quote a) if the literal does not have blanks and b) the value needs to be as uppercase letters.
CALL PGM(PGMA) PARM(SOMEVALUE)
You might be wondering that Why is there NO & on the beginning of SOMEVALUE?
The above is valid CALL that SOMEVALUE is not a variable, but a character literal. If we do not prefix & then it will considered as a character literal by the CL compiler. So the following are are the same :
1) CALL PGM(PGMA) PARM(SOMEVALUE)
2) CALL PGM(PGMA) PARM('SOMEVALUE')
3) CALL PGM(PGMA) PARM(SOMEvalue)
Having said that no need to keep the char literal within quote a) if the literal does not have blanks and b) the value needs to be as uppercase letters.
Similar topics
» Lower level program error handled in Higher level program
» %SUBSTR is valid in STRDBG too
» Program Temporary Fix
» Module Vs Program
» Compling CL Program
» %SUBSTR is valid in STRDBG too
» Program Temporary Fix
» Module Vs Program
» Compling CL Program
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|