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



Hello all,
I am trying to call an RPGLE pgm from MI passing parameters to it.

OS V5R2M0, QRPGLESRC file member contains:

D DM_910 E DS EXTNAME(DML910)
D PREFIX(D910)
....
C *ENTRY PLIST
C PARM DM_910
....

DML910 *FILE A550AP PF Parameter data structure fo

Data Field Buffer Buffer Field Column
Field Type Length Length Position Usage Heading
P1PRDC CHAR 35 35 12 Both Item
P1QTY PACKED 15 3 8 64 Both Order Qty
.... (45 fields)


First I tried this:
DCL SPCPTR $P1PRDC INIT(P1PRDC);
DCL DD P1PRDC CHAR(35);
DCL SPCPTR $P1QTY INIT(P1QTY);
DCL DD P1QTY PKD(15,3);
....
DCL OL CALLEE($P1PRDC, $P1QTY, ... ) ARG;
....

but if I debug the RPG and display the parameter values:
D D910P1PRDC 35A EXTFLD (P1PRDC)
D D910P1QTY 15P 3 EXTFLD (P1QTY)

I get garbage instead of the actual values loaded in the MI vars which should now be in the RPG vars:
EVAL DM_910 : X 128
00000 40404040 40404040 40404000 00000000 - .....
00010 80000000 00000000 D91AD4CE 8100A100 - Ø.......R.Móa.~.
00020 40404000 00000000 00000000 00000000 - .............
00030 80000000 00000000 D91AD4CE 8100A120 - Ø.......R.Móa.~.
00040 40404040 00000000 00000000 00000000 - ............
00050 80000000 00000000 D91AD4CE 8100A140 - Ø.......R.Móa.~
00060 00000000 0F000000 00000000 00000000 - ................
00070 80000000 00000000 D91AD4CE 8100A160 - Ø.......R.Móa.~-
(these look like addresses instead of content at those addresses, hmm...)

If I change the OL to:
DCL OL CALLEE(P1PRDC, P1QTY, ... ) ARG;

and debug to display the vars again I get:
Pointer not set for location referenced.

I tried reading the available docs and mailing list msgs but no luck.
Does anybody know how can I accomplish this?.
Thanks,
Denes.

---------------------------------
Looking for a X-Mas gift? Everybody needs a Flickr Pro Account!

As an Amazon Associate we earn from qualifying purchases.

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