× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: DDS arrays
  • From: "Peter Dow" <pcdow@xxxxxxxxx>
  • Date: Tue, 2 Nov 1999 21:58:56 -0800

One solution is to use input specs to rename the external fields as array
elements:

ICODEFL    (must be the format name, not the file name)
I        D61        D6(1)
I        D62        D6(2)
.
.
.
I        D66        D6(6)

Note that you do not specify from-to positions, just the names.

Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- 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
> +---


__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.