|
Yes I am at v5r2, however it looks like I can't use the following three
keywords together...
dim(10) qualified dtaara(rm21da)
RNF3325E The keyword is not allowed following keyword DIM; keyword is
ignored.
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
J. Scott Carter
Programmer/Analyst
e-mail: Mailto:scarter@xxxxxxxxxxx
Phone: 214.583.0348
It's not the destination that counts in life it's the journey. The journey
with the people we love is all that really matters. Such a simple truth so
easily forgotten.
|---------+----------------------------->
| | Hans Boldt |
| | <boldt@xxxxxxxxxx>|
| | Sent by: |
| | rpg400-l-bounces@x|
| | idrange.com |
| | |
| | |
| | 08/01/2003 07:34 |
| | AM |
| | Please respond to |
| | RPG programming on|
| | the AS400 / |
| | iSeries |
| | |
|---------+----------------------------->
>--------------------------------------------------------------------------------------------------------------|
|
|
| To: rpg400-l@xxxxxxxxxxxx
|
| cc:
|
| 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
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:
>
_______________________________________________
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-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.