× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2024 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.