Topic: Not enough Vedit resources for: (1 of 6), Read 35 times
Conf: Error messages, Crashes
From: Jock Blair
Date: Monday, September 10, 2007 04:25 AM

Hi All, I hope someone can help.

I have a large file 31 Meg ACCII text I'm trying to edit all my commands work on a small version of the file but when I try to run on the full file I get the error message "MACRO ERROR IN 100- NOT ENOUGH VEDIT RESOURCES FOR: IT(" OPENING PAYMENT",OVERWRITE)"
I have set over write mode to 1.
I have tried save as after each separate replace.
But nothing seems to work, hope someone can help.
Please note I have two line commented out just for testing purposes.
Regards,
Jock
This is my code.

Overwrite_Mode(1)
File_Open("C:\Temp\rep100.txt")
BOF
Replace("|<|H0D|H0A","",ALL+NoErr)
FILE_SAVE()
File_Close()
File_Open("C:\Temp\rep100.txt")
BOF
While(!At_Eof){
Search("QML100",ERRBREAK)
Line(-1)
Ins_Newline(1)
line(2)}
FILE_SAVE()
File_Close()
File_Open("C:\Temp\rep100.txt")
BOF
WHILE(!AT_EOF){
Search("QML100",ERRBREAK)
LINE(1)
C(2)
IT("MEMBER",OVERWRITE)
C(24)
IT("SURNAME ",OVERWRITE)
C(60)
IT("FACTORY",OVERWRITE)
C(7)
IT("DATE",OVERWRITE)
C(12)
IT("H&S ",OVERWRITE)
C(10)
IT("PAY",OVERWRITE)
C(5)
IT(" OPENING PAYMENTS",OVERWRITE)
C(1)
IT("DEBITS",OVERWRITE)
C(1)
IT("CREDITS DUES &",OVERWRITE)
C(3)
IT(" CLOSING",OVERWRITE)}
// INS_NEWLINE(1)}
FILE_SAVE()
File_Close()
File_Open("C:\Temp\rep100.txt")
BOF
WHILE(!AT_EOF){
Search("QML100",ERRBREAK)
LINE(2)
C(2)
IT("NUMBER",OVERWRITE)
C(92)
IT("CODE",OVERWRITE)
C(4)
IT("BIRTH JOIND",OVERWRITE)
C(33)
IT(" BALANCE ",OVERWRITE)
C(8)
IT(" ",OVERWRITE)
C(5)
IT(" ",OVERWRITE)
C(5)
IT(" ",OVERWRITE)
C(8)
IT(" ",OVERWRITE)
IT("BALANCE")}
BOF
DEL_LINE(1)
// File_Save()

 


Topic: Not enough Vedit resources for: (2 of 6), Read 33 times
Conf: Error messages, Crashes
From: Pauli Lindgren
Date: Monday, September 10, 2007 04:45 AM

On 9/10/2007 4:25:11 AM, Jock Blair wrote:
>
> "MACRO ERROR IN 100- NOT ENOUGH VEDIT RESOURCES FOR:
> IT(" OPENING PAYMENT",OVERWRITE)"

You get this error if you are near end of file and try to insert text with OVERWRITE mode.
Overwrite mode only replaces existing characters, so it does not allow writing past end of file.

Are you sure you should use overwrite mode?
Maybe you should use insert mode, or Replace() command?
If you use overwrite mode, you would need to check that there are enough characters to overwrite.

--
Pauli

 


Topic: Re: Not enough Vedit resources for: (3 of 6), Read 34 times
Conf: Error messages, Crashes
From: Ted Green
Date: Monday, September 10, 2007 12:50 PM

At 04:46 AM 9/10/2007, you wrote:
>From: "Pauli Lindgren"
>
>On 9/10/2007 4:25:11 AM, Jock Blair wrote:
>>
>> "MACRO ERROR IN 100- NOT ENOUGH VEDIT RESOURCES FOR:
>> IT(" OPENING PAYMENT",OVERWRITE)"
>
>You get this error if you are near end of file and try to insert text with OVERWRITE mode.
>Overwrite mode only replaces existing characters, so it does not allow writing past end of file.

Thank you for figuring this out; I also suspected this problem.
I will file this under "Bugs" as the error message is clearly wrong.

Ted.

 


Topic: Not enough Vedit resources for: (4 of 6), Read 39 times
Conf: Error messages, Crashes
From: Jock Blair
Date: Monday, September 10, 2007 08:54 PM

On 9/10/2007 4:45:53 AM, Pauli Lindgren wrote:

>On 9/10/2007 4:25:11 AM, Jock Blair

>wrote:

>>

>> "MACRO ERROR IN 100- NOT ENOUGH VEDIT RESOURCES FOR:

>> IT(" OPENING PAYMENT",OVERWRITE)"

>

>You get this error if you are near end

>of file and try to insert text with

>OVERWRITE mode.

>Overwrite mode only replaces existing

>characters, so it does not allow writing

>past end of file.

>

>Are you sure you should use overwrite

>mode?

>Maybe you should use insert mode, or

>Replace() command?

>If you use overwrite mode, you would

>need to check that there are enough

>characters to overwrite.

>

>--

>Pauli

>



Hi Pauli

This error is occurring about 1 third of the way into the file. The code works on a small file. Maybe I need to explain further. The file I'm working on is a txt file produced by exporting an Access report to txt, the problem with this export is that the heading on each page is incorrect when exported; I'm trying to use Vedit to repair the headings. If I produce a report of 80 pages my code works fine, but when I produce the full report of 3500 pages I keep getting this error on page 1200.

The report when exported has two problems.

1. There are extra blank lines added, I manage to get rid of them OK with Vedit on the first pass. [Open the file gets rid of the blank lines and save close the file].

2. The headings are incorrect this is when the error occurs. I put a copy of my code at the bottom of my report, not sure if this is of help.

As the code shows I have tried to save and reopen the file also used save-as because I had seen in one of the reports that this gets Vedit working in paging mode, to no avail.

I have tried to break the file up and use selection criteria to see where the problem occurs.
My code works on the file when it is 19582KB records 130604 after running the code file is 19544KB and records 101562.
My next file size is 23834KB records 158954 and the error message stops the code at record 62871.
Hope this helps.
Regards,

Jock


 


Topic: Not enough Vedit resources for: (5 of 6), Read 33 times
Conf: Error messages, Crashes
From: Pauli Lindgren
Date: Tuesday, September 11, 2007 04:32 AM

On 9/10/2007 8:54:23 PM, Jock Blair wrote:
>
> This error is
>occurring about 1 third of the way into
>the file. The code works on a small file.

As I suspected, it seems that the overwrite problem occurs not just at the end of file, but at the end of buffer, too.

I wrote the following test macro:

File_Open("C:\Temp\rep100.txt")
GP(EOB_pos-3)
IT("This is a test",OVERWRITE)

As soon as the file is larger that can fit in a buffer (around 120k), this gives the same error message you got. Only the first 3 letters in this case are written and then the error message is displayed.

So, I think this can be considered as a bug in Vedit's file buffering.

As a workaround, you can add code to first to go past the insertion location and then return to the correct location and then insert the text. This way, the next part of the file will be read in the buffer and overwrite is possible.
In the above test code, this could be done for example as follows:

File_Open("C:\Temp\rep100.txt")
GP(EOB_pos-3)
#2 = CP
Line(2)
GP(#2)
IT("This is a test",OVERWRITE)

--
Pauli

 


Topic: Not enough Vedit resources for: (6 of 6), Read 36 times
Conf: Error messages, Crashes
From: Jock Blair
Date: Tuesday, September 11, 2007 07:10 PM

Thanks Pauli,
That works a treat your blood is worth bottling. I just move forward 4 lines instead of 1 or 2 and then move back -3 or -2 and all is perfect again.
Regards,
Jock Blair.