<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Scott,<br>
<br>
Try looking at your export as a loop.<br>
<br>
Look at this:<br>
<br>
<br>
<font face="Courier New, Courier, monospace">:cn ne 2 'if
field 2 is the client num:xa="";gosub reset;cn(6,.0,g)=2<br>
'set cn to the same field edit as the client num:<br>
::'do your other porogramming here:<br>
::end:<br>
reset:cn eq "":return:<br>
::lookup clients k=cn i=a -nx:<br>
:clients:hb=clients(2) 'client name:<br>
::fa="/tmp/my_file.csv":<br>
again::export WORD mgr = (fa):<br>
:xa eq "":mgr(1)=cn;mgr(2)=hb;xa(1,,g)="x";goto again:<br>
:xb eq
"":mgr(1)="HEADER1";mgr(2)="HEADER2";mgr(3)="HEADER3";mgr(4)="HEADER4";xb<br>
(1,,g)="x";goto again:<br>
::p(8,.0,g)=p+"1":<br>
::mgr(1)="DATA1";mgr(2)="DATA2";mgr(3)="DATA3";mgr(4)="DATA4":</font><br>
<br>
Hope this helps,<br>
<br>
Richard<br>
<br>
On 9/24/2015 11:11 AM, scooter6--- via Filepro-list wrote:<br>
</div>
<blockquote
cite="mid:CADpQzqMN-LasMfRdUE6snXLyfvL8=74F1UQ+68GUJyBKa5mffQ@mail.gmail.com"
type="cite">
<pre wrap="">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: <a class="moz-txt-link-rfc2396E" href="http://mailman.celestial.com/pipermail/filepro-list/attachments/20150924/e7d0c2ae/attachment.html"><http://mailman.celestial.com/pipermail/filepro-list/attachments/20150924/e7d0c2ae/attachment.html></a>
_______________________________________________
Filepro-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com</a>
Subscribe/Unsubscribe/Subscription Changes
<a class="moz-txt-link-freetext" href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a>
</pre>
</blockquote>
<br>
</body>
</html>