Re: calling RPG ILE with parameter list from MI

"Rich Hart" <[email protected]> Fri, 7 Dec 2007 19:56:37 -0600
Newsgroups gmane.comp.lang.as400.mi
Message-ID <000501c8393d$91e80770$030fa8c0@NORIHART>
Yes, James is exactly correct.  If the RPG program is accepting just ONE 
parameter (no matter what size), you must define the Operand List in the MI 
program the same way; that is, with just one element (the pointer to the 
structure).

In the MI program, you can subdivide the structure using "subvariables" [to 
coin a term] with the DEF() POS() keywords; very similar to a data structure 
in RPG.  This is *Defined storage (we can now do a similar trick in CL, 
after all these years).

The MI language has certain limitations about INITializing objects.  I 
remember that when you define an operand list, the variables it refers to 
must be defined previous to the operand list itself, in the MI source. 
Perhaps the same is true with space pointers; I am not sure.  At any rate, 
the translator will catch you if you do it wrong!

Hope that helps,

Rich Hart

----- Original Message ----- 
From: "James Lampert" <jamesl-6/ELSmrcqeUu8xhjR5IN5AC/[email protected]>
To: "MI Programming on the AS400 / iSeries" <mi400-Zwy7GipZuJhWk0Htik3J/[email protected]>
Sent: Friday, December 07, 2007 7:53 PM
Subject: Re: [MI400] calling RPG ILE with parameter list from MI


> Denes L wrote:
>> Hello all,
>> I am trying to call an RPGLE pgm from MI passing parameters to it.
>
> Well, for one thing, if you're passing two parameters AS SEPARATE
> PARAMETERS, shouldn't you be accepting them that way?
>
> Also, I always define the field first, then the space pointer INITed to
> it. I've never heard of it working the other way around.
>
> -- 
> James H. H. Lampert
> Touchtone Corporation
>
> _______________________________________________
> This is the MI Programming on the AS400 / iSeries (MI400) mailing list
> To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/mi400
> or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/mi400.
>
> 

_______________________________________________
This is the MI Programming on the AS400 / iSeries (MI400) mailing list
To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/mi400
or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/mi400.