Export Syntax

Bruce Easton bruce at stn.com
Fri Jul 27 10:22:33 PDT 2007


Scott Walker Friday, July 27, 2007 1:01 PM:
> Bruce Easton wrote:
> Sent: Friday, July 27, 2007 11:59 AM
> To: filepro list
> Subject: RE: Export Syntax
> 
> Scott Walker wrote Friday, July 27, 2007 11:08 AM:
> > 
> > I am exporting an ascii file on a SCO Unix system.  The file will
> > actually be used on a windows system so I want the record separator to
> > be a CR/LF.  
> > 
> > I'm using:
> > 
> > 	export ascii banner=(mv) r=chr("10")&chr("13") f=, o=" c="
> > 
> > but that bombs on syntax check.
> > 
> > How do I tell fp to use CR/LF as record separator?
> > 
> > Thanks.
> > 
> > Scott Walker
> 
> 
> Bruce said:
> 
> Scott, try r=10&13
> 
> 
> 
> Scott replys:
> 
> I tried that as specified in the STN filePro Plus Developers Reference
> Manual but it bombs on the syntax check.
> 
Yeah - I don't know where that came from.  That sub-section in the manual 
does not have an external reference, but it is very explicit about 
how to apply it.  I checked a couple of our programs, and I've only 
found where we've applied it as one of Ken's solutions prescribes - 
appending chr("13") to the end of each line or modifying the line 
with sed.

(We also have a fair number of places where we work with 
the input/output file on a temporary basis and use a system 
command using sed to modify the line endings [and other things] as 
necessary.  But I see this is usually for imports  [and always] when 
bringing data into a *nix system.  A lot of that complexity, I'm sure, 
can be avoided if, as Ken says, one makes use of xtod or transfering 
in text-mode, if you're not trying to do anything but modify the 
line endings.)

Bruce

Bruce Easton
STN, Inc.


More information about the Filepro-list mailing list