Tom,

Yes, it is the same system which nothing so far as fixed. But when I
changed the parm in the cl to only be 32 characters, it works and is VERY
fast! An RPG program is calling a CL, passing the address (50) subject(20)
and message (200) to a cl. The cl then calls SNDDST.

from: Tom Liotta <qsrvbas@xxxxxxxxxxxx>
subject: Re: Send Email from the AS400 - quit working!

Jim Waymire wrote:

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

Jim:

The issue is that you're not sending 50 characters. You're only
sending 27 characters -- [ jwaymire @ tallyhosystems . com ]. What
can you imagine is sitting in memory in positions 28 through 50 when
your program finally starts?

Try this instead:

==> call sndemail2
parm('jwaymire@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 'E-Mail2'
'Test from sndemail2')

...where 'b' is a blank. Note that the address value has been
manually padded out to (I think) 51 characters. I chose 51 just in
case I miscounted at 50, and I wanted to be sure I provided your
program with enough blanks. If your program expects 50 chars of
memory, you need to ensure that all 50 get initialized. i5/OS will
handle 32 chars automatically, just because. But there's no
reasonable way for it to handle random possibilities. Every program
you CALL can have different parms.

This is only important for "dynamic" CALLs, e.g., where a CALL
command is directly executed from a command line as you did with
this or through the CMD() parameter of a SBMJOB. Generally, when the
CALL is compiled into a program and the parms are from declared
variables, there is no problem.

(Ummm... also, is this on the same system where your SMTP jobs are
possibly busy relaying someone else's e-mail? Maybe your tests don't
work because SMTP hasn't gotten around to it yet.)

Tom Liotta

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


--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone 253-872-7788 x313
253-479-1416
Fax 253-872-7904
http://www.powertech.com



------------------------------

This thread ...

Follow-Ups:

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

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