|
Why not using a coding schema and then generate the code to handle the evals and selects. The program logic is apart. E.g: d ds126 E DS prefix(P126) d p126fileda <--- Expanded d p126filedb <--- Expanded c r126 begsr c eval fileda=p126fileda c eval filedb=p126filedb c.... c endsr Break down the select using single digits test like: c select c when %substr(%editc(n:'Z'):1:1)='0' c exsr d10 c..... c endsl Extracting the common fields across ds is not a big problem. Just an idea Marco --- Buck Calabro <Buck.Calabro@xxxxxxxxxxxx> wrote: > Duane wrote: > > > I'm going to assume that each field is always the > >same size, no matter where it sits in your flat file. > > Yes, that's the case. > > >...don't put your fields in a data structure > >at all. Make each of them based. Set up a structure of > > >pointers that each field is based on. Set up an array > >with groups of pointers, with the addresses of each > layout > >already set up. For each record type, move in the > >correct set of pointers, and you're ready to go. > > > Very innovative, thanks Duane! I was hoping to avoid all > the explicit moves > (here, evals or possibly D spec INZ operations) but it > looks like that's > unavoidable. > --buck > _______________________________________________ > This is the RPG programming on the AS400 / 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.cgi/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. > __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.