|
Hi Rick, You can use the inz keyword to initialize individual fields in a data structure or you could do something like this D DSName DS Qualified D Arr 1 Dim(10) D 10 Inz('abcdefghij) D Overlay(DSName) HTH Paul Tuohy ----- Original Message ----- From: "Chevalier, Rick" <Rick.Chevalier@xxxxxxxxxxxxxxx> To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> Sent: Friday, August 01, 2003 2:31 PM Subject: RE: Qualified Data Area array > This may really be a new topic but I have a related question. > > Is there a way to populate the pathds data structure at compile time? Maybe > with the CTDATA keyword? I was struggling with this recently and couldn't > come up with a way to make it work for me. > > Rick > > -----Original Message----- > From: Hans Boldt [mailto:boldt@xxxxxxxxxx] > Sent: Friday, August 01, 2003 7:34 AM > To: rpg400-l@xxxxxxxxxxxx > Subject: Re: Qualified Data Area array > > Are you on V5R2? If so, code it as: > > ======================================================== > d pathds ds dim(10) qualified > d marker 3 0 > d path 100a > /free > for x = 1 to %elem(pathds); > if pathds(x).marker = somevar; > path = pathds(x).path; > endif; > endfor; > /endfree > ======================================================== > > Cheers! Hans > > . > _______________________________________________ > 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/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. > >
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.