Years ago when I was working with ASSET, we had the same problem with the
length of parms.

Like you said, we had to put a non-blank character at the end of our parm.
Usually a period, "."



Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516

"DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/16/2007 11:26 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>

"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>

RE: Send Email from the AS400 - quit working!

There's a FAQ on this:

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).


-----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!

What is the issue on this? I am sending a parm that can be up to 50
characters long.

from: "Michael Ryan" <michaelrtr@xxxxxxxxx>
Are you sending the parms into the CL via a command? Beware of the >32
character issue with parms.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by 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 on our policy page. If you have questions about this, please contact [javascript protected email address].