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



Anything data structure that is passed in a parameter should be templated.

Start copy block

dcl-ds TD_Parm1 Qualified Template;
Field1 Char(1);
Field2 Char(2);
Field3 Packed(5:2);
end-ds

dcl-pr Call1;
PR_InMyDataStrucutre LikeDs(TD_Parm1) Const;
end-pr;

End copy block

dcl-proc Call1 Export;
dcl-pi *N;
InMyDataStructure LikeDs(TD_Parm1) Const;
end-pi;



On Thu, Jun 23, 2016 at 1:26 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

They can be David. Three levels good enough.

dcl-ds Level1 Qualified;
Level2 LikeDS(Level2_T);
AnyOldField char(5);
end-ds;

dcl-ds Level2_T Qualified Template;
Level3 LikeDs(Level3_T);
AnotherField char(20);
end-ds;

dcl-ds Level3_T Template;
AnotherField char(20);
YetOneMore Int(5);
AndOneMore Packed(7:2);
end-ds;

Jon Paris

www.partner400.com
www.SystemiDeveloper.com

On Jun 23, 2016, at 4:16 PM, David Gibbs <david@xxxxxxxxxxxx> wrote:

On 6/23/2016 2:09 PM, dlclark@xxxxxxxxxxxxxxxx wrote:
dcl-ds p1 qualified;
parm1 char (10);
parm2 char (10);
parm3 char (1);
end-ds;
dcl-ds p2 qualified;
parm4 char (10);
parm5 char (10);
end-ds;

dcl-pi *n;
p1 likeds(p1);
p2 likeds(p2);
end-pi;

Thanks! I was hoping that the DS's could be nested, but this is easy
enough.

david

--
David Gibbs
midrange.com

* IBM Power Systems Champion

IBM i on Power Systems: For when you can't afford to be out of business!

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (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.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


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.