Haven't checked that they run but something like this ...
*- One possible
COPY TO (txtfile) delimited
lcHdr1 = "Hdr1,Hdr2,Hdr3,Hdr4,Hdr5,Hdr6,Hdr7"
lcHdr2 = "----------------------------------"
lcFile = FILETOSTR(txtFile)
=STRTOFILE(lcHdr1 + CHR(13) + lcHdr2 + CHR(13) + lcFile, "txtFile")
----------------
*- Another possible
lcHdr1 = "Hdr1,Hdr2,Hdr3,Hdr4,Hdr5,Hdr6,Hdr7"
lcHdr2 = "----------------------------------"
COPY TO (txtfile_tmp) delimited
lnFileIn = FOPEN(txtfile_tmp)
IF lnFileIn > 0
lnSize = FSEEK(lnFileIn,0,2)
=FSEEK(lnfileIn, 0,0)
lnFileOut = FCREATE(txtFile)
IF lnFileOut > 0
=FPUTS(lnFileOut, lcHdr1)
=FPUTS(lnFileOut, lcHdr2)
DO WHILE FSEEK(lnFileIn,0,1) < lnSize
=FPUTS(lnFileOut, FGETS(lnFileIn))
ENDDO
=FCLOSE(lnFileOut)
ENDIF
=FCLOSE(lnFileIn)
ENDIF
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Sytze de
Boer
Sent: Friday, 16 August 2013 2:58 PM
To: [email protected]
Subject: Delimited TXT file
Hi Folk
I wonder if anyone is around to assist me with a Friday matter
I have a table with (say) 7 fields
The routine concludes with
COPY TO (txtfile) delimited
Sofar all is well
My client now needs a delimited line at the TOP of this txt file which bears
no resemblance to the structure of the table that creates the txt file
How do I do that ?
--
Kind regards
Sytze de Boer
Kiss Software
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.