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



Pretty much what I figured I'd end up doing. It just makes for more code but not that much. I've had that many tests (or more) on other CPP's. Was hoping to have an iterative process for this one since they are repeating elements. Moving them into a data structure and then processing would just clutter it up I think.

Not the end of the world by any means.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power

--

From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Darren Strong <darren@xxxxxxxxx>
Sent: Friday, March 6, 2020 8:09 AM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Redefining input parms into an array

For each pointer coming into your program, you'll need a defined parm, and, PI doesn't allow overlaying data structures over those parms, so, you'll have to list each parm as you've done below, and then move each of those parms into a
datastructure if you want to process that way. All of the fancy stuff you can do with defining and passing datastuctures is out the window here because the command processor is not passing it like that.



-----Original Message-----

From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Roger Harman

Sent: Thursday, March 5, 2020 6:32 PM

To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxxxxxxxx>

Subject: Redefining input parms into an array



CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.





I have a command processing program I'm writing in RPG.  I have 3 fixed parms and then a recurring pair of parms (20 pair).



I'm having problems getting a redefine to work on the PR/PI.



dcl-ds dsParms_T  template;

  ParmIn   char(10);

  ParmOut  char(50);

end-ds;



dcl-pr (or pi)har(1);

  ReqdParm1 char(1);

  ReqdParm2 char(2);

  ReqdParm3 char(4);

  OptionalParm01_1  char(10);

  OptionalParm01_2  char(50);

     // repeat...

  OptionalParm20_1  char(10);

  OptionalParm20_2  char(50);

  dsParms likeds(dsParms_T) dim(20) pos(8); end-pr (or pi)



I'm getting RNF3748 - Keyword not allowed on the dsParms.  Does not like the POS() keyword.



I need to specify the individual parms as I'm using CEETSTA to determine which were passed.



Any suggestions?  I guess I could change the command to pass blanks or something if unspecified.



Thanks.

--

This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,

visit: https://lists.midrange.com/mailman/listinfo/rpg400-l

or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx

Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.



Please contact support@xxxxxxxxxxxx for any subscription related questions.



Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.