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



Thanks all... I guess I HAD been in the habit of building commands to run the program but I certainly had forgotten that....

You folks also gave me some other approaches which I may check out, but wrapping it with a command was the easiest and it works great.

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java

On 2/11/2015 4:20 PM, Pete Helgren wrote:
I have spent too much time in the Java/JavaScript world apparently because I have been attempting to write what I thought was a simple RPGLE program which I can call from a command line. The problem is that the parameter, which is a character type, 256 in length, gets padded with "unexpected" contents beyond what I am submitting on the command line. If I submit it like so:

CALL PGM(MYPGM) PARM(This is a test') I see something like this when I view the contents in either debug or the receiving program:

This is a testRPGLESRC MYLIBRAY MYPGM ??*SRCMBRTXT ‑ 1? *HEX *JOBRUN1 0 *NEW 0*LIBCRTAUT1 *CURRENT0*NONE

I understand, from reading numerous posts, that this is normal behavior but my attempts to follow the directions to eliminate the issue seems for naught. I couldn't find an example program in all of MY libraries that does something similar without the side effects (I could have sworn I have written RPG programs like this before).

The program has these Prototypes/Procedure interfaces:

D mypgm pr extpgm('MYPGM')
D text 256A varying const options(*trim)

D mypgm pi
D text 256A varying const options(*trim)

I originally defined 'text' as 256A but saw the spurious characters. So I tried options(*varsize), same result. So I tried varying const options(*trim). No joy ( get a variable out of range error). It is a little early in the week to be going brain dead but apparently I have. I can't seem to sort this out.

I want to pass a character string of up to 256 characters into this program and only get the characters typed as the parameter value. What am I missing?



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.