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

RPGLE parameters

475 views
Skip to first unread message

Martin Crangle

unread,
Jul 1, 1999, 3:00:00 AM7/1/99
to
Why can't i use a field that has a data structure associated with as a
parameter when calling another RPGLE program.

Also when i'm debugging an RPGLE program and i pass in a numeric *ENTRY
parameter, i get a "pointer or parameter error", the way i rectify this is
either by using another program to call the problem program or by putting a
break point before the field is used and use the eval operation to make the
field the value i've already given it when passing parameters.

Hope this makes some sense....

Bob Cozzi

unread,
Jul 1, 1999, 3:00:00 AM7/1/99
to
You can use a data structure. You just can't define the parameter as a data
structure, use character instead.

Your second problem may be a PTF situation, or you may be passing a value
that is not in the format defined on your *ENTRY PLIST parameter. Usually,
if this is the problem, people have a Zoned vs Packed conflict.

It depends were the parameter field is defined. On the Calc specs, it is
Packed. On the Definition specs, it is Zoned, unless you explicitly include
the "P" data type value.

In CL, the default decimal format is packed, in fact, it is the only format.
From command entry, all numeric fields are passed as Packed(15,5) values. So
the target would have to be Packed(15,5) as well.

If this doesn't help, what is the language that is calling your RPG program?

--

Bob Cozzi
www.rpgiv.com


Martin Crangle <mcra...@landis-lund.co.uk> wrote in message
news:7lfei1$oni$1...@lure.pipex.net...

Gary Guthrie

unread,
Jul 1, 1999, 3:00:00 AM7/1/99
to
From the sounds of it, my guess is that the program is being called from
the command line when the problem occurs, not from another program, and
the parameter is a packed numeric. Presuming this is the case, you must
use hexadecimal notation for the parameter when calling from the command
line. For instance, to pass the number 123 in a 7-byte packed number
you'd use:

Call Pgm( MyPgm ) Parm ( X'0000123F' )

Gary Guthrie
Editor, The RPG Source at http://www.news400.com/TheRPGSource
Technical Editor, NEWS/400 at http://www.news400.com

Chris

unread,
Jul 9, 1999, 3:00:00 AM7/9/99
to
mcra...@landis-lund.co.uk (Martin Crangle) wrote in
<7lfei1$oni$1...@lure.pipex.net>:

>Why can't i use a field that has a data structure associated with as a
>parameter when calling another RPGLE program.
>
>Also when i'm debugging an RPGLE program and i pass in a numeric *ENTRY
>parameter, i get a "pointer or parameter error", the way i rectify this
>is either by using another program to call the problem program or by
>putting a break point before the field is used and use the eval
>operation to make the field the value i've already given it when passing
>parameters.
>
>Hope this makes some sense....
>
>
>

Can't answer the first question. I had the same problem with the second
today. Either pass the numeric as a character and scrub it or try
passing it as a 15,4 decimal field in the parm. On the old OPM stuff
that used to work.

0 new messages