system xtod on sco file size limit?

Kenneth Brody kenbrody at bestweb.net
Sun Jan 16 11:59:23 PST 2005


Nancy Palmquist wrote:
> scott at logicdatasystems.com wrote:
[...]
> > The ending file size is smaller than the original.  Of course, this
> > works fine from the command line.  Thinking it may be a timeing issue,
> > I tried sleep "10000" after, to no avail.  Small files are ok, but
> > the file testing starts as 19195 bytes and ends as 18618, and the data
> > is cut off.
[...]
> I have found on some systems it is a speed issue that the OS had not yet
> written all the records exported to the hard drive in time for the next
> function.

If it's truly a "speed issue", then your O/S is broken.

> After Export make sure you CLOSE the export to get everthing written.

This is a buffered I/O issue.  Any time a program uses buffered I/O (as
filePro does on EXPORT), you need to make sure the buffers are flushed
before passing that file to another program.  CLOSE will do that.

> You might try a short SLEEP here maybe SLEEP 100.

SLEEP will have zero effect on non-broken systems.  The data is available
to all programs immediately after being written, even if it's not yet
physically written to disk, but still in the O/S cache.

> Then do the SYSTEM xtod
> 
> But better yet - write the EXPORT so you don;t need to do xtod.
> 
> (I have found that if I do an EXPORT ASCII -x type export and just tack
> chr("13"){chr("10") to the end of the record, I can avoid this step.
> 
> SMALL NOTE:  I always format my EXPORTS to end with CR/LF - they always
> need to go to WINDOWS computers and it just saves time and trouble.

Note that using an ASCII transfer from *nix to Windows will convert the
file fron *nix's LF to Windows' CRLF convention.

> Then when you move this file to DISK, WINDOWS, etc, make sure you do not
> change the LF to CR/LF - some mechanisms do automatically.

True.  Using an ASCII transfer method from *nix to Windows on a file that
is already in Windows' CRLF format may end up with CRCRLF in the file.

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody/at\spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>



More information about the Filepro-list mailing list