PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Is that valid in CL program?

Go down

Is that valid in CL program? Empty Is that valid in CL program?

Post  maran Tue May 28, 2013 9:47 pm

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.


maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum