I will certainly get some use out of the nested DS declaration in my
spreadsheet generation programs. I'll be able to simplify the below
declaration by moving the intermediate templates into the regular
declaration. It will make things much more readable and easier to
maintain.


dcl-s CurCol uns(3) template;
dcl-s ColHdr_t varchar(40) template;
dcl-s ColWid_t uns(3) template;

/////////////////////////////////////
//Tab 1 layout
/////////////////////////////////////
dcl-ds Fam1CD_t qualified template;
Col like(CurCol) INZ;
Wid like(ColWid_t) inz(10);
Hdg1 like(ColHdr_t) inz('Product');
Hdg2 like(ColHdr_t) inz('Family');
end-ds;

dcl-ds Fac1CD_t qualified template;
Col like(CurCol) INZ;
Wid like(ColWid_t) inz(10);
Hdg1 like(ColHdr_t) inz('Dekko');
Hdg2 like(ColHdr_t) inz('Facility');
end-ds;

// Ultimately defines column order
dcl-ds T1 qualified;
TtlSiz;
Fam likeds(Fam1CD_t) inz(*likeds) overlay(TtlSiz);
Fac likeds(Fac1CD_t) inz(*likeds) overlay(TtlSiz:*next);
arr likeds(Fam1CD_t) dim(T1Cnt) pos(1);
end-ds;

dcl-c T1Cnt %div(%size(T1.TtlSiz):%size(Fam1CD_t));






From: Barbara Morris <bmorris@xxxxxxxxxx>
To: rpg400-l@xxxxxxxxxxxx
Date: 02/14/2017 02:22 PM
Subject: Spring 2017 enhancements for RPG
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



RPG has some enhancement PTFs coming up soon for 7.2 and 7.3, timed with
the spring TRs.

- nested data structures in free-form declarations
- %MAX and %MIN built-in functions
- ALIGN(*FULL) for data structures

See this RPG Cafe blog entry:
http://ibm.biz/spring_2017_rpg_72_73_enhancements


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.