|
Hi, Dan: Here is a little RPG program for finding out what parameters are passed to an OPM program (I got this from someone, many years ago; I cannot remember who, or exactly when): =============================================== H 1 IPIDS SDS 500 I *PARMS #PARMS I *PROGRAM PGMNAM C *ENTRY PLIST C PARM PARM01225 C PARM PARM01255 C PARM PARM04255 C PARM PARM05255 C* . . . C* code at least as many PARMs as expected; use DSPPGM on C* the program you are analyzing, and look at the minimum and C* maximum number of parameters shown on the second screen. C* C DUMP C SETON LR C RETRN =============================================== Compile this program, then put it in a library ahead of the *LIBL, and rename it to the name of the program in question that you need to determine the parameters. Examining the RPG "Dump" spool file should help you to see exactly what is going on. Regards, Mark S. Waterbury ----- Original Message ----- From: "Dan Bale" <dbale@samsa.com> To: <mi400@midrange.com> Sent: Friday, August 09, 2002 11:59 AM Subject: RE: [MI400] Re: Trying to retrieve *ENTRY parms from OPM RPG dumps, part II > Thanks for the reply, Barbara! > > The interesting thing is that, in all my testing, I had called the programs > from the command line, with hardcoded (literal?) parameters. But you're > saying that the offsets for the parameters are determined by the calling > program's parameters? I'll have to play around with that a bit. > > What about the fields that overlaid the parameter fields? Did you have any > insight for that? And the difference in the *Entry parameter offsets > between the two programs? > > - Dan Bale > (I am *NOT* "Dale" > http://archive.midrange.com/midrange-l/200105/msg00281.html ) > > bmorris@ca.ibm.com wrote: > <snip> > > Dan, I'm not sure you can get the order of the parameters from this > dump. I think the offsets reflect the location of parameters in the > calling program. You must be passing parameters in order. I just > ran a little experiment with the following two programs. I named > the parameters in reverse alphabetical order in the called program, > and in the calling program, I passed parameters that were > a) in order, b) out of order, c) the same. > <snip> > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/mi400 > or email: MI400-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. >
As an Amazon Associate we earn from qualifying purchases.
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.