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



Never mind, I'm the one smoking it...I misread your reply..

Rob as Tommy says, if the CALLED program has 25 fields listed on the
PLIST, then your prototype needs 25 fields also.

HTH,

Charles

On Wed, Mar 31, 2010 at 2:41 PM, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:
Tommy,

I know you know better...whatever it is you're smoking I want some :)

Charles

On Wed, Mar 31, 2010 at 2:27 PM,  <Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx> wrote:
a DS is "considered" by the system as a single char field when passed as a
parameter.  that's the problem, the called program is expecting 25
different fields not a single one!  when the called program tries to
access one of the parameter fields that is not passed you'll get the
Pointer not set error.  pass the data as the 25 parms as the called
program expects and you'll be fine.  don't forget to also change your
prototype definition.  or if possible change the called program to accept
a DS and convert it to RPGLE.


Thanks,
Tommy Holden



From:   Robert Rogerson <rogersonra@xxxxxxxxx>
To:     "RPG programming on the IBM i / System i" <RPG400-L@xxxxxxxxxxxx>
Date:   03/31/2010 01:17 PM
Subject:        Calling OPM RPG with a datastructure...
Sent by:        rpg400-l-bounces@xxxxxxxxxxxx



I am attempting to call an OPM program from an ILE program but when I do I
get an

MCH0801 - Argument associated with external or internal parameter not
passed


and multiple (looks like almost as many as individual parameters)

Pointer not set for location referenced.

Basically I'm calling a prompt program which when called from another OPM
program uses a PLIST containing 25 fields.
I created as datastructure to replace the PLIST
     * JBA GL account prompt program parameters
    d GL317Ds         ds
    d  Glco00                        2a   Inz('KF')
    d                                     Overlay(GL317Ds)
    d  P@Actp                        2a   Inz('05')
    d                                     Overlay(GL317Ds : *next)
    d  P@Psti                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  P@Memo                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  P@Lgrt                        4a   Inz('****')
    d                                     Overlay(GL317Ds : *next)
    d  P@Txns                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  P@Curn                        3a   Inz('***')
    d                                     Overlay(GL317Ds : *next)
    d  P@Cbco                        2a   Inz('**')
    d                                     Overlay(GL317Ds : *next)
    d  P@Lgr                         3a   Inz('***')
    d                                     Overlay(GL317Ds : *next)
    d  P@Onel                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  P@Msid                        7a   Inz('ZPL0030')
    d                                     Overlay(GL317Ds : *next)
    d  P#Msgf                       10a   Inz('PLMSGF')
    d                                     Overlay(GL317Ds : *next)
    d  P#Accn                       12a   Inz
    d                                     Overlay(GL317Ds : *next)
    d  Pqactp                        2a   Inz('06')
    d                                     Overlay(GL317Ds : *next)
    d  Pqpsti                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  Pqmemo                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  Pqlgrt                        4a   Inz('****')
    d                                     Overlay(GL317Ds : *next)
    d  Pqtxns                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  Pqcurn                        3a   Inz('***')
    d                                     Overlay(GL317Ds : *next)
    d  Pqcbco                        2a   Inz('**')
    d                                     Overlay(GL317Ds : *next)
    d  Pqlgr                         3a   Inz('***')
    d                                     Overlay(GL317Ds : *next)
    d  Pqonel                        1a   Inz('*')
    d                                     Overlay(GL317Ds : *next)
    d  Pqmsid                        7a   Inz('ZPL0040')
    d                                     Overlay(GL317Ds : *next)
    d  P@Ftid                        7a   Inz('ZPL0050')
    d                                     Overlay(GL317Ds : *next)
    d  Pqftid                        7a   Inz('ZPL0060')
    d                                     Overlay(GL317Ds : *next)

I then created the prototype

     *  JBA GL account prompt program
    d GL317           PR                  Extpgm('GL317')
    d  parameterDs                        LikeDs(GL317Ds)

and call the program later in the program

     // Call the JBA GL account prompt program
     GL317(GL317Ds);

When I actually debugged GL317 only the first and second parameters (in
the
*ENTRY) had a value, the rest were
in error.

Can anyone see what I'm doing wrong?

Thanks,

Rob
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.