Call (CALL) Command Parameter Conversions

When you call a program from a CL command line, the parameters you pass on the Call command are changed, depending on how you state the parameters. Table 1 shows how parameters are converted.

Table 1. Call (CALL) Command Parameter Conversions
Conversion Rules Examples Conversion Results
String literals are passed with a null terminating character. CALL PGM(T1520REP) PARM(abc) ABC\0 (converted to uppercase; passed as a string)
Numeric constants are passed as packed decimal digits. CALL PGM(T1520REP) PARM('123.4') 123.4 (passed as a packed decimal (15,5))
Characters that are not enclosed in single quotation marks are:
  • Folded to uppercase
  • Passed with a null character
CALL PGM(T1520REP) PARM(123.4) 123.4\0 (passed as a string)
Characters that are enclosed in single quotation marks are not changed. Mixed case strings are supported, and are passed with a null terminating character. CALL PGM(T1520REP) PARM('abc') and CALL PGM(T1520REP) PARM('abC') abc\0 (passed as a string) and abC\0 (passed as a string)
The REXX interpreter treats all REXX variables as strings (without a null terminator). REXX passes parameters to IBM® i which then calls the ILE C/C++ program. Conversion to a packed decimal data type still occurs, and strings are null terminated.
Note: These changes only apply to calling a program from a command line, not to interlanguage calls. See Using ILE C/C++ Call Conventions for information on ILE C/C++ calling conventions.