|
Jim could you not define it in the following manner?
D ArrPtr S * INZ(%ADDR(FieldinRecord))
D D6 S 9 0 Dim(6) based(ArrPtr)
I think this would work for you. I do not have a connection to a 400 right
now to compile it but it should get you close.
______________________________________________
Eric N. Wilson
President
Doulos Software & Computer Services
2913 N Alder St
Tacoma WA 98407
----- Original Message -----
From: Jim Langston <jlangston@conexfreight.com>
To: <RPG400-L@midrange.com>
Sent: Tuesday, November 02, 1999 4:40 PM
Subject: DDS arrays
>
> I am converting a S/36 flat file to native. Within this file are an
> "array" of numbers.
> This is how it is defined in the program.
>
> E D6 6 9 0
>
> FCODEFL NS 05 1 C5
> F 70 123 D6
>
> (All other non-pertinent items not shown).
> As you can see, they are redefining the D6 field to be an 6 element
> array of length 9
> numbers with 0 decimal places.
>
> I would like to be able to do something in RPGIV similar to this, but
> the only way I
> can think to do it would be to define D6 as a single filed, then create
> a DS with an
> array pretty much like it is done here, something I don't like to do.
> The field at this
> point would become non self documenting, and just looking at the field
> itself wouldn't
> give a clue as to how to use it. I guess I could put some comment in
> the COLHDG
> describing it COLHDG('6 ele array of len 9 numbers') but I don't like
> that idea.
>
> Any ideas?
>
> What I am thinking about doing is creating D61, D62 D63 etc... and
> "break out" the
> numbers from their array, but then I am going to have to change the
> logic in the programs
> where it is dealing with them as arrays. Although I might go ahead and
> make a DS and
> have it as an array of 6 then just move them in, although I don't like
> this idea either. something
> like:
>
> Codekey CHAIN CodeFL 99
> IF NOT *IN99
> EVAL D6(1) = D61
> EVAL D6(2) = D62
> etc...
>
> but that is clunky too.
>
> Anyone have an elegant way of doing this?
>
> Regards,
>
> Jim Langston
>
>
>
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
david@midrange.com
> +---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.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.