"Garbage" added at end of file

"Garbage" added at end of file

Post by N! Xa » Wed, 09 Jul 2003 05:01:48



Hello,

I use Paradox 4.0 to open some text files, add information and save them in
text format still.
For some reason, my Paradox program adds some "garbage", exactly one line at
the beginning and one line at the end of each file.

Here is the relevant code for the import script:
...
{Tools} {ExportImport} {Import} {ASCII} {AppendDelimited} {filename}
...
and for the export script:
...
{Report} {Output} {ScriptName} {1} {File} {destination_filename} {replace}
...

Thanks for help
N! Xau

 
 
 

"Garbage" added at end of file

Post by Tony McGuir » Wed, 09 Jul 2003 05:09:05


If you examine the end of the file, you probably have a carriage return and
linefeed.  That is normal.

You may also have a null character, end-of-file marker.

--
--
Tony

"I woke up and was able to get myself out of bed.
Being that fortunate, what's to complain about?"
_____________

 
 
 

"Garbage" added at end of file

Post by N! Xa » Wed, 09 Jul 2003 05:25:49



Quote:

> If you examine the end of the file, you probably have a carriage return
and
> linefeed.  That is normal.

> You may also have a null character, end-of-file marker.

No, Tony, it's a sequence of 7-10 garbage characters, like ?-?? and similar.
Not always the same, they vary.
And, again, it appears at the end and also at the begin of the file.

bye
N! Xau

 
 
 

"Garbage" added at end of file

Post by Tony McGuir » Wed, 09 Jul 2003 05:25:57


"Here is the relevant code for the [import/export] script:"

I'd say you should post the IRrelevant code.

It appears that you are appending to the file.  What's in the file to begin
with, and what makes you think the export/import routines are what are
adding those characters?

--
--
Tony

"I woke up and was able to get myself out of bed.
Being that fortunate, what's to complain about?"
_____________


:


: >
: > If you examine the end of the file, you probably have a carriage return
: and
: > linefeed.  That is normal.
: >
: > You may also have a null character, end-of-file marker.
:
: No, Tony, it's a sequence of 7-10 garbage characters, like ?-?? and
similar.
: Not always the same, they vary.
: And, again, it appears at the end and also at the begin of the file.
:
: bye
: N! Xau
:
:

 
 
 

"Garbage" added at end of file

Post by Steven Gree » Wed, 09 Jul 2003 06:05:17



> For some reason, my Paradox program adds some "garbage", exactly one line at
> the beginning and one line at the end of each file.

like Tony said.. the import/export process isn't adding the data to the file..
either the file itself is damaged, the source table is damaged, or your code is
doing it.. the import/export is *not* doing it..

--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------

 
 
 

"Garbage" added at end of file

Post by Dave Porte » Wed, 09 Jul 2003 06:55:05


Quote:> and for the export script:
> ...
> {Report} {Output} {ScriptName} {1} {File} {destination_filename} {replace}

You are probably getting a printer control code string at the top of your
report and a printer reset string at the end...
goto:
{Report} {Change} {ScriptName(actually table name)} {Settings}{Setup}
and snoop around there, maybe something in CCP
goto:
alt-spacebar {Utilities} {Custom} {Reports} {Printer Setup}

pick the standard printer which should not have any set up strings

Dave

 
 
 

"Garbage" added at end of file

Post by Steven Gree » Wed, 09 Jul 2003 07:10:22



> You are probably getting a printer control code string at the top of your
> report and a printer reset string at the end...

yes.. I missed that one..

--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------

 
 
 

"Garbage" added at end of file

Post by Dave Porte » Wed, 09 Jul 2003 07:55:18


Quote:> Here is the relevant code for the import script:
> ...
> {Tools} {ExportImport} {Import} {ASCII} {AppendDelimited} {filename}
> ...

With this import script.... why are you not

{Tools} {ExportImport} {Export} {ASCII} {Delimited}

Or for that matter:

FILEREAD "myfile" TO a    ; only if you need to read whats in there

FILEWRITE APPEND "myfile" FROM stringtowrite

or

EDITOR OPEN "myfile"
CTRLPGDN
EDITOR INSERT stringtowrite

Dave

 
 
 

1. "End-to-end" paper

For those of you who have missed it, here

http://www.google.com/search?q=cache:web.mit.edu/Saltzer/www/publicat...

is the paper some of us mention, "END-TO-END ARGUMENTS IN SYSTEM DESIGN"
by Saltzer, Reed, and Clark.

The abstract is:

    This paper presents a design principle that helps guide placement of
    functions among the modules of a distributed computer system. The
    principle, called the end-to-end argument, suggests that functions
    placed at low levels of a system may be redundant or of little value
    when compared with the cost of providing them at that low level.
    Examples discussed in the paper include bit error recovery, security
    using encryption, duplicate message suppression, recovery from
    system crashes, and delivery acknowledgement. Low level mechanisms
    to support these functions are justified only as performance
    enhancements.

It was written in 1981 and is undiminished by the subsequent decades.

Nathan Myers

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command

2. Record/DB integrity during network drop

3. files ending "wpw"

4. SMP Question - Help...

5. Is it the "end of log" or "end of log file"?

6. How do you change the collation on a sql 2000 database?

7. max of ("...","...","..")

8. Year 2000 is a LEAP Year!!

9. ErrorLog: "End Stack Trace"

10. Job in "executing" status doesnt end

11. "At beginning/end of table"

12. ORA "End of communication channel" error

13. FMP5 Server password "front end" needed