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, "."



Thanx,

Nick



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



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


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

Subject
RE: Send Email from the AS400 - quit working!






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.


This thread ...

Replies:

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

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