I have look at the Select.brs program and added two lines:
10294 OPEN #5: "NAME=bridgetest.ida, replace,recl=128, KFNAME=bridgetest.idx, KPS=1,KLN=5",Internal, Outin,keyed
10296 Close #5
Now the bridge see's this and will quit. It works in BR but not using the Scripting Bridge, why? and how do I fix this seemly easy task?
Jamie Lowman
Trying to get around using File I/O in scripting bridge.
Moderators: Susan Smith, admin, Gabriel
-
- Posts: 291
- Joined: Fri Jun 19, 2009 9:01 am
- Location: Lawrence, Kansas
- Contact:
-
- Posts: 22
- Joined: Thu Aug 06, 2009 12:19 am
All i see wrong is that missing colon.
Also load and save the source in BR just to make sure you have any compile time errors.
You also need to run BR and proc the '.prc' files. That way you can debug at run-time.
As for the '.err' file, it is produced by BR's "stderr" output. The problem is that unattended mode produces it's own error whenever an error is encountered and BR goes into ATTN mode. So this overwrites anything useful in this file.
The logging files produces by BR's logging facility don't apparently produce anything to indicate the errors produced by a program so really there is no way to identify an error without writing your own error handlers or running the process in 'attended' mode.
I wish there was some way to log all errors to a file. If someone knows how to accomplish this I would like to know.
Also load and save the source in BR just to make sure you have any compile time errors.
You also need to run BR and proc the '.prc' files. That way you can debug at run-time.
As for the '.err' file, it is produced by BR's "stderr" output. The problem is that unattended mode produces it's own error whenever an error is encountered and BR goes into ATTN mode. So this overwrites anything useful in this file.
The logging files produces by BR's logging facility don't apparently produce anything to indicate the errors produced by a program so really there is no way to identify an error without writing your own error handlers or running the process in 'attended' mode.
I wish there was some way to log all errors to a file. If someone knows how to accomplish this I would like to know.
Chris,I wish there was some way to log all errors to a file. If someone knows how to accomplish this I would like to know.
I wonder if it would be possible to modify the program that the Bridge generates to have a statement at the beginning such as:
On Error goto BridgeErrorHandler
and include a BridgeErrorHandler function that writes the error number and line number to another debug output file.. That way if there's an error we could check that file to see which one it is instead of running the .prc file in attended mode to see it.
It would also be nice if the latest proc file had a standard name .. after creating it you could automatically copy it to testbridgecall.prc or something so that we can easily rerun the last test without having to look in Windows Explorer to see which one was the last one.
Ideally if we combine both of those ideas, then the real generated proc file would have the Error Handler and the test copy (testbridgecall.prc) would be missing the error handler.
This would make it easier to debug bridge programs.
Gabriel