On 9/19/2014 12:57 PM, Kevin Cully wrote:
Hello Fox Experts!
I'm writing a quick utility to manipulate a text file. Here's the
(simplified) program I've got so far:
sGedCom = "Gedcom1.ged"
CREATE CURSOR c_GedCom (cType C(7), sF1 C(200), sF2 C(200) )
APPEND FROM (sGedCom) TYPE SDF
REPLACE ALL cType WITH "1 _CENN" FOR cType = "2 _CENN"
sGedCom = FORCEEXT( sGedCom, "GED1" )
COPY TO (sGedCom) TYPE SDF
The Gedcom1.ged has almost a million records but it only takes about 3
seconds to load the file, do the replace, and export. Nice.
MY PROBLEM: the exported file has the trailing spaces on each line
while doing the SDF export. I basically want each line to be
ALLTRIM'd. I can't find the right setting or parameter to make that
happen.
I can always do a FWRITE() for each line, but I figure there's a built
in way to do this.
Thanks!
Kevin: SDF is column specific. Hopefully all of your records are the
same length. I do this all the time and add a field called blank##
where ## is the number of blank spaces. So if there are 10 blanks at
the end of each record just create a blank10 field and ignore it.
HTH
-- Jeff Jeff Johnson [email protected] SanDC, Inc. (623) 582-0323 SMS
(602) 717-5476 Fax 623-869-0675 Visit our forum at
www.san-dc.com/forum Register and join in the discussion
www.san-dc.com www.cremationtracker.com www.agentrelationshipmanager.com
_______________________________________________
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.