Call Cl Program From Rpgle

You can pass packed numeric from CLLE to RPGLE without issue. The issue is that when calling any program from the command line or submitting a program to run in batch via SBMJOB cmd(CALL MYPGM), The IBM i command processor will pass numeric literals as packed(15,5). Call mypgm parm(10 15) will require that both parameters be defined as packed(15,5). It doesn't matter if MYPGM was written in CL, CLLE, RPG, RPLE, or COBOL. A related issue is that character literals are passed as char(32) unless the literal value is longer than 32, then it's passed as a character variable of the given size. Cannibal corpse website.
The reason for this is that parameters are passed by reference to/from programs. Meaning the caller sets aside storage for the data, and the address of that storage is what's actually passed; not the actual value. So the command processor creates the storage needed and initializes it the given values.
Should I pass packed numeric fields when calling RPGLE from CLLE? Or convert them to character pass them and convert them back to numeric in the RPG. Passing packed numeric field when calling RPGLE from CLLE? If you have a decimal variable in your CL program, you can pass it directly to a packed variable defined the same way in your RPG. Bakugan battle brawlers samehadaku. Jul 13, 2015 - I tried simple program but is shows the error like 'Pointer. C PARM FNAME 10 C CALL 'CPROMPT' PLIST1 C *ENTRY PLIST C PARM ERROR. And it seems as if you're somehow expecting your CL program to modify it.
Since the command processor has no way of knowing the size of the parameters defined in the program, it uses the defined defaults and it's up to the writer of the called program to conform to the rules. This leads to all sorts of silly work-a-rounds call mypgm parm('0010' x'000F' 'AB x') the above • passes a 4 digit number as char(4) • passes a 2 byte integer as char(2) via hexadecimal literal • passes a 40 character string as char(41) However the best solution, is to simply create a command front end for any program you want to call from the command line or via SBMJOB CMD(). With a command defined, the command processor will know exactly what the types and sizes of the program's parameters are.

Mycmd parm1(10) parm2(15) parm3('AB') More information in the.