existing utility to convert filePro key to csv.
Chris Sellitto
sellich at guaranteedreturns.com
Thu Oct 10 07:28:39 PDT 2013
> -----Original Message-----
> From: filepro-list-
> bounces+sellich=guaranteedreturns.com at lists.celestial.com
> [mailto:filepro-list-
> bounces+sellich=guaranteedreturns.com at lists.celestial.com] On Behalf Of
> William J. McEachran
> Sent: Wednesday, October 09, 2013 2:02 PM
> To: filepro-list at lists.celestial.com
> Subject: existing utility to convert filePro key to csv.
>
> I seem to recall that someone here has a program to convert filePro
> key/data to csv using the map as the header line.
>
> Could they contact me off list and save me re-inventing that wheel.
>
> Thanks.
William,
This is a primitive way of doing it, but you could copy this to any filePro(r) file, and it should work.
::ct(6,.0,g)=ct+"1":
::z(3,.0)=numfield(-):
:ct eq "1":gosub wrthdr:
::gosub filedet:
::end:
:'*****************************************************************:'**************** W R I T E T H E F I L E ********************:
tofile:'write to file::
::ej=@fi{"_ALL_"{doedit(@td,"yymd"){mid(@tm,"1","2"){mid(@tm,"4","2"){mid(@tm,"7","2"):
::ec(78,allup,g)="c"{chr("92"){"e-mails"{chr("92"){ej{".csv":
::export ascii out=(ec) r=\n -xc:
::'export ascii out = (ec) r=\n F=, O=" C=":
::return:
wrthdr:'write the header record::
::gosub tofile:
::gosub gethdr:
::write out:
::return:
filedet:'write to file detail records::
::gosub tofile:
::gosub getdet:
::write out:
::return:
gethdr:::
::p(3,.0)="1";fo="":
nxtfnam:::
:p gt z:out(1)=fo;return:
::fa=chr("34"){fieldname(-,p){chr("34"):
:p lt z:fa=fa{",":
::fo=fo{fa:
::p=p+"1":
::goto nxtfnam:
getdet:::
::p="1";fo="":
nxtdet:::
:p gt z:out(1)=fo;return:
::fb=chr("34"){fieldval(-,p){chr("34"):
:p lt z:fb=fb{",":
::fo=fo{fb:
::p=p+"1":
::goto nxtdet:
Christopher Sellitto
More information about the Filepro-list
mailing list