Another export question
Matthew Williams
matthew.d.williams at gmail.com
Mon Jan 17 08:42:20 PST 2005
This question follows up on what I had previously written last week
about dynamically naming the export file based off a record field.
What I need to do:
I have a file with a bunch of records sitting on them, they are sorted
by "RepCode", a simple 3 digit code. In a single output process I
would like to:
Look at the first record and copy its "RepCode" into a variable.
Execute the export command using that variable as the output filename
Export any records that belong to that RepCode into the file until all
records are exported that belong to that RepCode
When I reach a record that has a new RepCode it jumps back to the
beginning and copies the new RepCode into the variable, runs the
export again with the new filename and dumps all corresponding
records.
So when the process is finished running I will have a dozen or so
outputted delimited files (filename matching the RepCode) each with
however many records correspond to them
I think that makes sense. I'm just not familiar with how I would
write the loop?
Then: aa(3,*,g)=3;goto export
new
If: aa ne 3
Then: aa=3;goto export
export
Then: export invoice = /upss/(aa).txt <arguments>
dump
Then: invoice(1)=1.........
If: aa ne 3
Then: goto new
Then: goto dump
Ugly code, I know but I need to start somewhere.
Any ideas on the propper way to do this? Help would be appreciated!
Thanks,
-Matt Williams
Hale Mfg.
More information about the Filepro-list
mailing list