Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Arrays as PARMS in RPGIV and CLP

788 views
Skip to first unread message

Steve

unread,
Jul 19, 2002, 1:41:46 PM7/19/02
to
I'm using an array as a parameter in an RPGLE program that is 899
characters long with 1000 elements. I can simulate a run of it by
using another RPGLE to call it, but I would like to use a CLP program.
There is a restriction on the DCL statement that says you can only
have a maximum length of 9999 for a character variable - does anyone
know how I can get around this & pass my full array to the RPGLE
program with the entire size via a CLP program????

Thanks!

Denny Davis

unread,
Jul 19, 2002, 6:15:52 PM7/19/02
to
I don't know if this will help you are not.

You can pass a large variable through a CL, but the CL cannot create
or use anything past byte 9999.

Example
PROGRAM1 RPG or some other language creates large array which
allocates the memory 899 * 1000.

It can then call PROGRAMCa CL and pass it the variable.

The CL can declare it as a *CHAR with a length of 1 or anything up to
9999. If the CL does anything to the variable, it can only access the
CL's declared size.

The CL can do it's thing and then call PROGRAM3 and pass the variable
to it.

As long as PROGRAM3 defines the variable the same as PROGRAM1, then
it works.

Remember you are actually passing a pointer to a memory location, not
actually passing the data. So the CL can receive a pointer and then
hand it over to someone else.

If you do this, you had better have a good reason and document it or
the people how inherit your code will say very bad things about you,
try to "fix" the code and crash the system.

Denny

On 19 Jul 2002 10:41:46 -0700, stephe...@attcanada.com (Steve)
wrote:

0 new messages