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

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

Is that valid in CL program?

View previous topic View next topic Go down

Is that valid in CL program?

Post  maran on 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.


avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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