Handling external errors in Rexx? 
Author Message
 Handling external errors in Rexx?

I have a Rexx script that relies on an external, unmodifiable, OS/2
program to format and convert data files. Essentially:

do
'convert ' InputFile OutputFile
'del ' InputFile
end

The problem is that sometimes, because the input file is defective, the
"convert" program exits with a SYS3175 and a warning box that must be
dismissed before the next file can be handled.

Now, I know that I could disable the error messages globally through
config.sys, but I'd rather not since the machine is used both for
processing and for new development.

Is it possible to handle such an error from the Rexx program? Signal/call
don't seem to be able to do it since the error pops out before control is
returned to Rexx.

TIA

Pierre
--
Pierre Jelenc              Know what's weird? Day by day nothing seems to


                    http://www.*-*-*.com/ ~pcj1/



Sun, 08 Aug 1999 03:00:00 GMT  
 Handling external errors in Rexx?


 PJ> do
 PJ> 'convert ' InputFile OutputFile
 PJ> 'del ' InputFile
 PJ> end

 PJ> The problem is that sometimes, because the input file is
 PJ> defective, the "convert" program exits with a SYS3175 and
 PJ> a warning box that must be dismissed before the next file
 PJ> can be handled.

 PJ> Is it possible to handle such an error from the Rexx program?

Not directly, I guess... How about calling CONVERT.CMD instead of
CONVERT.EXE ? Perhaps you can use a temporary semaphore file, or
use CONVERT.CMD to return a success value to the calling *.CMD.

So if CONVERT.EXE fails, nothing is returned, or a semaphore
file isn't created by CONVERT.CMD.

Ave,

Andre Doff



Mon, 09 Aug 1999 03:00:00 GMT  
 Handling external errors in Rexx?

Quote:

> I have a Rexx script that relies on an external, unmodifiable, OS/2
> program to format and convert data files. Essentially:

> do
> 'convert ' InputFile OutputFile
> 'del ' InputFile
> end

> The problem is that sometimes, because the input file is defective, the
> "convert" program exits with a SYS3175 and a warning box that must be
> dismissed before the next file can be handled.

> Now, I know that I could disable the error messages globally through
> config.sys, but I'd rather not since the machine is used both for
> processing and for new development.

> Is it possible to handle such an error from the Rexx program? Signal/call
> don't seem to be able to do it since the error pops out before control is
> returned to Rexx.

Handle it from CONFIG.SYS (SUPPRESSPOPUPS=d where 'd' is the *letter*
for the drive you want the popups written to. Then, if you don't have an
OutputFile after a convert, check for a POPUPLOG.OS2, parse it to see if
CONVERT.EXE failed, and re-issue what doesn't work.

--

.-~-.-~-.-~-.-~-.-~-.-  J e r o m e   Y u z y k  -~-.-~-.-~-.-~-.-~-.-~-.-~-.

          Edmonton, Alberta  Canada | http://www.tgx.com/bridge



Sat, 28 Aug 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Handling external errors in Rexx?

2. Handling external errors in Rexx?

3. REXX handling of % char when passed to external environment

4. Handling external errors

5. Calling an external prog - timeout and error-handling in Expect

6. Error Handling In Vx-Rexx

7. External link errors when using external Catalyst SocketTools Library Edition 2.15 dll

8. Passing REXX stems to external REXX functions -Reply

9. Passing REXX stems to external REXX functions

10. sharing external functions between cms rexx programs and xedit rexx programs

11. external rexx function calls (OS/2 REXX)

12. External Rexx DLL in C and VX-REXX

 

 
Powered by phpBB® Forum Software