appending export
Richard D. Williams
richard at appgrp.net
Mon Oct 5 16:53:30 PDT 2015
Scott,
Try looking at your export as a loop.
Look at this:
:cn ne 2 'if field 2 is the client num:xa="";gosub reset;cn(6,.0,g)=2
'set cn to the same field edit as the client num:
::'do your other porogramming here:
::end:
reset:cn eq "":return:
::lookup clients k=cn i=a -nx:
:clients:hb=clients(2) 'client name:
::fa="/tmp/my_file.csv":
again::export WORD mgr = (fa):
:xa eq "":mgr(1)=cn;mgr(2)=hb;xa(1,,g)="x";goto again:
:xb eq
"":mgr(1)="HEADER1";mgr(2)="HEADER2";mgr(3)="HEADER3";mgr(4)="HEADER4";xb
(1,,g)="x";goto again:
::p(8,.0,g)=p+"1":
::mgr(1)="DATA1";mgr(2)="DATA2";mgr(3)="DATA3";mgr(4)="DATA4":
Hope this helps,
Richard
On 9/24/2015 11:11 AM, scooter6--- via Filepro-list wrote:
> I'm trying to write an export that will make first record the client name
> pulled from a variable
> Then append that file and make the next line the column headers for my csv
> file
> Then append again to same file with data from the records selected...
>
> I'm doing export ascii hdr=(file) f=, o=" c=" r=\n to write the header,
> then I say in processing goto part2
>
> part2 is export ascii col -A=(file) f=, o=" c=" r=\n then do column
> headings using -A flag to append export
> then goto part3
>
> part3 is export ascii jmg -A=(file) f=, o=" c=" r=\n then assign data from
> about 10 fields
>
> There are 13 records that get selected, but when it runs all I get is the
> hdr data populated on 13 different lines.....no column headings or data....
>
> What is wrong with the -A syntax I'm using??
>
> thanks
>
> Scott Ullmann
> PDM
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20150924/e7d0c2ae/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20151005/3e891084/attachment.html>
More information about the Filepro-list
mailing list