Re: CLEARFORMAT


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Jeff Cinelli on November 14, 2008 at 05:51:14:

In Reply to: Re: CLEARFORMAT posted by Barbara Brazil on November 13, 2008 at 15:04:32:

Does the number 375 mean anything to you? OK, you're not gonna believe this stuff. I hope you can reproduce this. I've been working this morning to strip away all the excess, and come up with a basic test program that fails. Here's the code:

LENGTH 200 & LOCAL A$,B$
LENGTH 175 & LOCAL C$
DS1O: FORMAT A$;B$
DS1ID: FORMAT C$
CLEAR
!
CLOSE (10) & OPEN (10) '#TEST'
INQUIRE (10,DS1ID) KEY='*'
MSGBOX('ABOUT TO CLEAR')
CLEARFORMAT DS1O
MSGBOX('CLEAR OK')
RUN 'QMONITOR'

Here's whats happening: If I read a data (even blank data) out of a file who's record length is 375 bytes, the clearformat command (in this case) creates an IO Buffer Overflow Error. ???. If the file is 375 bytes or more, the clearformat command works correctly. I know this sounds extremely strange. Please try this:

1. Create a program, and put the above code in it
2. Create a file called #TEST on a directory, recordlen=375, klen=35.
3. Put a blank record in the file, with a key of *
4. Compile and run the above program. It should work correctly.
5. Erase #TEST
6. Create #TEST again, recordlen=374, klen=35
7. Run the above program again and watch what happens. In my case, in this program, I'm getting an error 44.




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]