|
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 SCarter@xxxxxxxxxxx wrote: > > I have a data area that is 1030 characters long with > the structure > marker1 3 0 > path1 100a > marker2 3 0 > path2 100a > marker3 3 0 > path3 100a > . > . > marker10 3 0 > path10 100a > > How do I create a ds to move the data area into an array so I can use code > like the following.... > /free > for x = 1 to 10; > if pdfloc.marker(x) = somevar; > path =pdfloc.path(x); > endif; > endfor; > /endfree > > this is how I think it would look but am unsure > d pathds ds based(@) qualified > d marker 3 0 > d path 100a > d > d ds > d pdfloc likeds(pathds) dim(10) > c > > does this look right: >
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.