Dim arrays & mapping fields
Walter Vaughan
wvaughan at steelerubber.com
Thu Jul 29 06:26:34 PDT 2004
Butch Ammon wrote:
> Long story short and main question: Does a DIM array absolutely have to be in
> sequential order when mapping fields?
A single array? Yes. That's what it is by definition AFAIK.
Can you fix the problem? Very To Extremely Difficult.
What you would need is a perl script that will open up all your
processing tables and replace any instance of numeric fields with the
field names.
Where you get screwed is reports. Bah. Perhaps there could be a script
writtten that would replace field placement on a report.
Then you need to create a new file that has the fields in the order you
want with the same field names as the original. And if you want to keep
all the system maintained fields you'll need to use alias filePro files
built on each's key segment that will allow you to read and write as
needed the 20 byte record header.
As a difficulty I'd rate it as 9 stars out of 10. Doable, but very labor
intensive.
What would be a *MUCH* better long term solution, it to normalize the
data, and use a header/detail structure.
What you are doing is trying to fake a header detail structure, why not
just do it for real.
Still labor intensive, but if three years from now you need to have 20
more material fields who cares? Let'em have a thousand material fields.
Reporting on what uses what type of material will be much easier as well.
I'd rate moving to header/detail as 3.5 out of 10 in difficulty.
--
Walter
More information about the Filepro-list
mailing list