As the activity in the 'old' thread has died, I just want to say, to all of
you, who has responded, and probably were offended by some of my replies,
that troubleshooting is a difficult and precise art.
It is not easy to help without seeing all the facts,
I take the reality as it is. I can not 'make up' disturbing events, or use
nonexistent code to explain how my code works or why it might fail.
'--The Program------------------------------------------
This is intended to be a high speed/high capacity worker.
Therefore there is only ONE possible instance of the program on a physical pc.
There is only ONE possible thread per fileoperation as every file is read from BOF to EOF
and every byte (and byte position) is significant, and you cannot do more than one
action at the time,(if duplicating a file you write the same data to more than one file
but that is consecutive Put$-instructions)
Normally this pc-s are in a locked room and rarely accessed by a human hand
There are 5 diffrent DLL-s in my converion-suit, They all heavyly relay on the
Replace-instruction. It is around 2000 files per day that is manipulated.
All this five DLL-s is bulid in a similar manner. (There is not many ways to read
a file from BOF to EOF.)
All fails in the same way. Partly translated buffers. But it is only in two of this
DLL-s I can detect it, when it happens.
'--The Problem-------------------------------------------
In this particular case it is a single Replace-instruction that fails.
Replace any ASCII with EBCDIC in Buffer$
If Buffer after this instruction is part EBCDIC and part ASCII. That can only
mean that replace-instruction is not carried out to the end.
This is described by me as a failing Replace-instruction.
Many suggestions around this has been "it is not Replace that is failing it is
something else, perhaps other strings involved are changed.."
I wrote "I have never seen a trashed buffer" that means: The characters in the
buffer are all valid (and correct placed) Ebcdic-characters or original ASCII-characters.
Powerbasic staff can verify that if this happened (EBCDIC and ASCII strings were not the
same size etc, would have produced a 'very easy to identify' pattern in the Buffer$
'--The conclusion----------------------------------------
Whatever is causing Replace to end prematurely it is the responsibility of compiler-
generated code to handle that situation.
My code is not involved in any string-housekeeping on behalf of Replace-instruction.
My code is not calling any system dll to perform this instruction. If that sort of
function is performed, and the compiler generate that sort of code, then this code
should also be responsible for checking that it is correctly executed.
'--The '****ing up'--------------------------------------
I will never be able to write code that to 100% will run on every single computer in
the world. I don't expect Powerbasic to write a bug free-compiler either.
But I do expect Powerbasic to give me a correct answer on a direct question
'---
This is the direct question to [email protected]
Is there any way to detect if Replace Any fails?
What value in Err-variable?
What value in ErrApi-variable?
'--The final plea---------------------------------------
I have taken a quick look att Semen's replacement for Replace-instruction.
I am also making an inventory of Replace-commands in all my 'sensitive' code.
It is unbeliveable how often it is used..
I have to benchmark it as well to verify if Semens result is applicable to 'my'
environment.
'--New facts from the test-line-------------------------
All NT4-units have been taken out of production and been replaced by WIN98SE
For 5 days this WIN98-units have been working without one single error (normal)
'--New testequipment------------------------------------
One new fresh NT4 has been installed with SP4 and run for 2 hrs.
First it was installed with Novell latest Client 4.7
Just one testfile have been feed through Translated-retranslated-Translated-retranslated etc.
The same file fails not everytime, but about every third translation.
That means that 2 seperate DLL-s is failing in the same sort of code.
One of those is the ASA_To_PCC-DLL you have seen, the other one is PCC_To_ASA-DLL.
'--
Then Novell client was replaced by Microsoft client
Same result as with Novell client
'--Other installed programs in NT-----------------------
Hedit Pro and TextPad4 InterNet Explorer 4.01
Nothing else
'--What to do next--------------------------------------
Rewrite Replace-instruction (thank you Semen..) and test again
-------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
you, who has responded, and probably were offended by some of my replies,
that troubleshooting is a difficult and precise art.
It is not easy to help without seeing all the facts,
I take the reality as it is. I can not 'make up' disturbing events, or use
nonexistent code to explain how my code works or why it might fail.
'--The Program------------------------------------------
This is intended to be a high speed/high capacity worker.
Therefore there is only ONE possible instance of the program on a physical pc.
There is only ONE possible thread per fileoperation as every file is read from BOF to EOF
and every byte (and byte position) is significant, and you cannot do more than one
action at the time,(if duplicating a file you write the same data to more than one file
but that is consecutive Put$-instructions)
Normally this pc-s are in a locked room and rarely accessed by a human hand
There are 5 diffrent DLL-s in my converion-suit, They all heavyly relay on the
Replace-instruction. It is around 2000 files per day that is manipulated.
All this five DLL-s is bulid in a similar manner. (There is not many ways to read
a file from BOF to EOF.)
All fails in the same way. Partly translated buffers. But it is only in two of this
DLL-s I can detect it, when it happens.
'--The Problem-------------------------------------------
In this particular case it is a single Replace-instruction that fails.
Replace any ASCII with EBCDIC in Buffer$
If Buffer after this instruction is part EBCDIC and part ASCII. That can only
mean that replace-instruction is not carried out to the end.
This is described by me as a failing Replace-instruction.
Many suggestions around this has been "it is not Replace that is failing it is
something else, perhaps other strings involved are changed.."
I wrote "I have never seen a trashed buffer" that means: The characters in the
buffer are all valid (and correct placed) Ebcdic-characters or original ASCII-characters.
Powerbasic staff can verify that if this happened (EBCDIC and ASCII strings were not the
same size etc, would have produced a 'very easy to identify' pattern in the Buffer$
'--The conclusion----------------------------------------
Whatever is causing Replace to end prematurely it is the responsibility of compiler-
generated code to handle that situation.
My code is not involved in any string-housekeeping on behalf of Replace-instruction.
My code is not calling any system dll to perform this instruction. If that sort of
function is performed, and the compiler generate that sort of code, then this code
should also be responsible for checking that it is correctly executed.
'--The '****ing up'--------------------------------------
I will never be able to write code that to 100% will run on every single computer in
the world. I don't expect Powerbasic to write a bug free-compiler either.
But I do expect Powerbasic to give me a correct answer on a direct question
'---
This is the direct question to [email protected]
Is there any way to detect if Replace Any fails?
What value in Err-variable?
What value in ErrApi-variable?
'--The final plea---------------------------------------
I have taken a quick look att Semen's replacement for Replace-instruction.
I am also making an inventory of Replace-commands in all my 'sensitive' code.
It is unbeliveable how often it is used..
I have to benchmark it as well to verify if Semens result is applicable to 'my'
environment.
'--New facts from the test-line-------------------------
All NT4-units have been taken out of production and been replaced by WIN98SE
For 5 days this WIN98-units have been working without one single error (normal)
'--New testequipment------------------------------------
One new fresh NT4 has been installed with SP4 and run for 2 hrs.
First it was installed with Novell latest Client 4.7
Just one testfile have been feed through Translated-retranslated-Translated-retranslated etc.
The same file fails not everytime, but about every third translation.
That means that 2 seperate DLL-s is failing in the same sort of code.
One of those is the ASA_To_PCC-DLL you have seen, the other one is PCC_To_ASA-DLL.
'--
Then Novell client was replaced by Microsoft client
Same result as with Novell client
'--Other installed programs in NT-----------------------
Hedit Pro and TextPad4 InterNet Explorer 4.01
Nothing else
'--What to do next--------------------------------------
Rewrite Replace-instruction (thank you Semen..) and test again
-------------
Fred
mailto:[email protected][email protected]</A>
http://www.oxenby.se
Comment