Need code assistance (export from yesterday)
Matthew Williams
matthew.d.williams at gmail.com
Tue Jan 18 08:22:24 PST 2005
This is a follow up to the thread I started yesterday on exporting a
bunch of text files based upon a field value in the record. Working
off of Brian Whites example code this is where i'm at below:
At this point the process runs however I got no file output of
anykind. Without the end on line 4 I get stuck at the output process
screen and am forced to kill the process manually.
Thanks a lot!
-Matt
Hale Mfg.
1 ------- - - - - - - - - - - - - - - - -
If: rc{"" ne 1{"" and rc ne ""
Then: close rep
2 ------- - - - - - - - - - - - - - - - -
If: rc{"" ne 1{"" and rc ne ""
Then: rc(3,*,g)=1 ; of = "upss/invoices"{1{".txt"; gosub exp '
This does the export and writes the header
3 ------- - - - - - - - - - - - - - - - -
If:
Then: rep(1)=1;rep(2)=2;rep(3)=3;rep(4)=4;rep(5)=5;rep(6)=6;rep(7)=7
......
4 ------- - - - - - - - - - - - - - - - -
If:
Then: end
20 ------- - - - - - - - - - - - - - - - -
exp If:
Then: export word rep = (of) -r=\n -f=,
21 ------- - - - - - - - - - - - - - - - -
If: ' Export file header
Then: rep(1)="SalesPerson";rep(2)="OrderNumber";rep(3)="AccountNumber"
22 ------- - - - - - - - - - - - - - - - -
If:
Then: write;return 'Return back to write records to the file
More information about the Filepro-list
mailing list