exists command - resolution
Kenneth Brody
kenbrody at bestweb.net
Tue Dec 7 14:43:50 PST 2004
Dennis Malen wrote:
[...]
> Problem: The header was not being created only the info on the file. The
> header was suppose to run first then the info on the file.
Actually, the _symptom_ was that the header record wasn't in the file. Why
it wasn't there was the reason for the previous thread.
> Resolution: It was only after numerous communications with the list that Brian
> White indicated he had a similar problem once. That was that the header was
> being over written. Upon further investigation and implementation that is
> exactly what had occurred. The "exists" command was working fine.
I don't see how an exported record can be overwritten without closing and
re-opening the file. Perhaps what you were doing was filling in the export
fields twice, rather than exporting two records?
> I redefined the import command using a different file identifier (export ASCII
> ???? =). That allowed me to open and close two different definitions (export
> commands) and write to the same file while remaining in the same record..
>
> Remember, because I had to write a header (one time when the file did not
> exists or upon creation) I was making two passes while in the pertinent
> record. The two different definitions avoided the header from being
> overridden.
Exporting a header record is a very common task, and it does not need
you to use two separate exports. Simply export two records the first
time through.
[...]
--
+-------------------------+--------------------+-----------------------------+
| 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