|
Actually, my first thought was in normalizing the data, but a few things held me back. 1. This "array" is very short. 2. The only reason these are arrays is because that's how the programs use them. I would be just as happy if the programs used them as individual values. 3. We are not going to be using this database file for very long. It is soon to be obsolete. 4. I would have to do a lot of changes to the original programs in order to normalize this, and there are a lot of programs that use it. 5. I wanted to keep the record format the same as the original flat file, so that I didn't have to change any S36 programs that are going to go hasta la bye bye soon anyway. 6. I'm too lazy. Regards, Jim Langston Alan Campin wrote: > Normalize the record. Any time you have an array in a record, it clearly is > an unnormalized record and needs to normalized. > > -----Original Message----- > From: Jim Langston [mailto:jlangston@conexfreight.com] > Sent: Tuesday, November 02, 1999 5:41 PM > To: RPG400-L@midrange.com > 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 > +--- +--- | 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-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.