×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




There are two ways you can deal with the trailing blanks problem.

1) Define your parameter to be 1 character longer that it needs to be and
then put a non-blank character in that last position.

2) Create a command with a single parameter (your 365 character string) that
calls MYPGM.

See Buck's email for a reference to the archives for more info.

Good luck!
Richard


-----Original Message-----
From: java400-l-bounces+casey_r=popmail.firn.edu@xxxxxxxxxxxx
[mailto:java400-l-bounces+casey_r=popmail.firn.edu@xxxxxxxxxxxx]On
Behalf Of P.Goovaerts@xxxxxxxxxx
Sent: Thursday, March 20, 2003 11:35 AM
To: java400-l@xxxxxxxxxxxx
Subject: Re: JAVA400-L Digest, Vol 1, Issue 631


Thank you all!

although I got another problem now:
When I execute
        stmt.executeUpdate("CALL MYPGM('parm1')";
where
        parm1="xxxxxxxxxx               "
it seems that the trailing spaces are left out at execution_time....

The CL/RPG program receives: "xxxxxxxxxx???????????????"
where ??...?? is 'rubbish' in stead of spaces.
Because the application checks if that part is blank
it goes wrong.

To be complete, the parameter is in fact a bit longer
(first 15 chars are filled, next 350chars are a list
of 10-35char fields which sometimes contain data, sometimes not!



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

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