There's a FAQ on this:
http://faq.midrange.com/index.pl?_highlightWords=32%20bytes&file=70
In a nutshell, when OS400 is reading your command string, it has to determine the number and types of the parameter values, allocate storage for those parms, load the parameter data to those storage locations, then execute the call (which passes the parameter values by reference). Where things go wrong is the allocation of memory for character parms larger than 32 bytes.
By default, all character parms are allocated as 32 bytes, with blanks padding the right. The command interpreter always trims blanks before trying to figure out how long the parm is. If the trimmed length of the parm is larger than 32 bytes, then the command interpreter will allocate up to the trimmed lenght of the parm data.
One common workaround that can be easily tested from the command line is to sepcify your 50 byte parm value with 51 characters, with the last character being a non-blank value. This forces the command interpreter to allocate 51 bytes (50 bytes of real data, and one byte that never gets read by your called program).
Eric
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Jim Waymire
Sent: Tuesday, October 16, 2007 12:12 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Send Email from the AS400 - quit working!
Michael,
What is the issue on this? I am sending a parm that can be up to 50
characters long.
Jim
from: "Michael Ryan" <michaelrtr@xxxxxxxxx>
Are you sending the parms into the CL via a command? Beware of the >32
character issue with parms.
As an Amazon Associate we earn from qualifying purchases.