|
Hello Jim, The API you are using IS the correct way to determine the number of parameters. You are getting a range returned because RPG does not require you to pass all the parameters defined on the *ENTRY PLIST. This feature of RPG has existed since RPG III on System/38 (but I don't know the first release). It is a useful way of extending a programs function without breaking any existing code. Not all HLL's support this feature e.g., CL. The range of parameters returned should be 0 to 'n'. (The maximum value of 'n' is 256 but as I recall 'n' should be set to the number of parameters defined on the *ENTRY PLIST.) Most RPG programs are written to assume that the number of parameters defined on *ENTRY PLIST will be the number of parameters passed. In this case you could assume that the maximum value in the range is the number of parameters expected by the program. You still need to worry about the type of parameters since they are all passed by reference. If you are writing RPG programs that make use of this feature then you check the program status data structure for the number of parameters passed (*PARMS for RPG III and %PARMS for RPG IV -- although *PARMS will work here too). Regards, Simon Coulter. «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«» «» FlyByNight Software AS/400 Technical Specialists «» «» Eclipse the competition - run your business on an IBM AS/400. «» «» «» «» Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 «» «» Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au «» «» «» «» Windoze should not be open at Warp speed. «» «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«» //--- forwarded letter ------------------------------------------------------- > X-Mailer: Internet Mail Service (5.5.2232.9) > Date: Fri, 09 Apr 99 08:39:01 -0700 > From: "Jim Knight" <jknight@rei.com> > To: "'Midrange Users list'" <MIDRANGE-L@midrange.com> > Reply-To: MIDRANGE-L@midrange.com > Subject: RE: DSPPGM API > > Great, thanks. > How about from a CL or C program? > I have a C socket that can call multiple programs > or commands. The socket needs to know how many > parms the program being called requires. > > Jim > jknight@rei.com > > > > -----Original Message----- > > From: Kevin Watkins [SMTP:kevinw@hurtcompanies.com] > > Sent: Friday, April 09, 1999 8:11 AM > > To: MIDRANGE-L@midrange.com > > Cc: jknight@rei.com > > Subject: Re: DSPPGM API > > > > *PARMS in the SDS or %PARMS (built-in function)??? > > > > > > ----- Original Message ----- > > From: Jim Knight <> > > To: 'Midrange Users list' <MIDRANGE-L@midrange.com> > > Sent: Thursday, April 08, 1999 4:11 PM > > Subject: DSPPGM API > > > > > > Does anyone know of a way to retrieve the actual number of entry parameters > > for an RPGILE program? We are using the QCLRPGMI API, but it returns a > > range of parameters instead of the actual number. > > > > Thanks in advance > > > > > > > > +--- > > | This is the Midrange System Mailing List! > > | To submit a new message, send your mail to MIDRANGE-L@midrange.com. > > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. > > | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. > > | Questions should be directed to the list owner/operator: > > david@midrange.com > > +--- > +--- > | This is the Midrange System Mailing List! > | To submit a new message, send your mail to MIDRANGE-L@midrange.com. > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. > | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.