MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » August 2014

Re: SQL performing a CALL with parms...



fixed

Hi

Not knowing anything else, watch out for things past 32 characters that are passed to &parm2 - how are you calling the program? from a command line, using SBMJOB with the CMD parameter, calling QCMDEXC? All of those can put junk after position 32.

HTH
Vern

On 8/27/2014 2:55 PM, Gqcy wrote:
we are executing a one line SQL script:

CALL SYS001C PARM('parm1', 'parm2')

the parms are varying length on the input sql...

on the CL I have identified parm1 as 18 char (was 10 char), and parm2 as 64 char (was 32 char).

we have recently been changing the CL to accept different length parms,
and it appears that we are still receiving the old lengths...
and....
won't accept the longer length parms...
I get a "conversion error" 9 -- Truncation when mapping a variable or constant to a character or binary parameter on a CALL statement, or when using a character or graphic variable in a GET DESCRIPTOR or SET DESCRIPTOR statement.



on my dumpclpgm:


&parm1 *CHAR 18 'parm1 parm2val'
&parm2 *CHAR 64 'parm2value '










Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 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