On 10/30/13 10:38 AM, Charles Wilt wrote:
The system has no way of knowing how big the parm is defined in theA command-line invocation, from the Command-Entry panel [having
CL. That's the job of the *CMD object.
But default, character parms are passed as char(32) unless the value
has more than 32 characters; in which case the parm is passed at it's
However, trailing blanks are trimmed.
If you wanted to pass 'HI' as a char(1024), you'd need to pass: HI
followed by 1022 blanks followed by some non-blank character, for a
total of 1025 characters. The trailing non-blank character will never
be seen by your program.
Alternatively, the the "best" solution in IMHO is to define a *CMD
front end to your program.
pressed the F11="Display full" for the expanded-view, thus allowing
~1300 characters], simply requires the full 1024-bytes of data delimited
by the apostrophe as string-delimiter. There is no need to pass an
extra non-blank character in that case. However when a *CHAR _variable_
has been passed as an element of the PARM in the CALL statement [not
allowed in the *EXEC command-line environment], having been passed
through an additional iteration of the command interpreter, the extra
non-blank character would be required; e.g. for a request such as:
SBMJOB CMD(CALL PGM(pgmname) PARM(&C1024))
This mailing list archive is Copyright 1997-2013 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact