How to suppress error messages in REXX?



IBM's Command List programming language & Restructured Extended Executor

How to suppress error messages in REXX?

Postby Mirco » Thu Feb 25, 2010 9:44 pm

Hello all,
The problem seems to be simple. I use EXECIO command to write something into a PDS file. When there is no space, I get RC of 20 and three lines of error messages:
IRX0250E System abend code E37, reason code 00000004.
IRX0255E Abend in host command EXECIO or address environment routine TSO.
IRX0671E EXECIO error while trying to close a DD.

This would be OK, but it doesn't look good, so I'd like to suppress these messages and just evaluate the return code and issue my own, prettier message. But how to do it? I tried MSG('OFF') and OUTTRAP('something.'), both with no effect - the messages keep being displayed. I have set ADDRESS TSO, which should be all right (didn't work under ISPEXEC either).

Is there any way to suppress this type of messages?

Thanks.
Mirco
 
Posts: 11
Joined: Thu Feb 11, 2010 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to suppress error messages in REXX?

 

Re: How to suppress error messages in REXX?

Postby MrSpock » Thu Feb 25, 2010 10:58 pm

No, there isn't.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: How to suppress error messages in REXX?

Postby Mirco » Fri Feb 26, 2010 1:31 pm

Thank you, sir!
Mirco
 
Posts: 11
Joined: Thu Feb 11, 2010 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to suppress error messages in REXX?

Postby Pedro » Thu Mar 11, 2010 10:42 am

I am not sure about those particular messages... but try setting your OUTTRAP in one rexx program, then calling another rexx program to do EXECIO.

Also, try ON ERROR or ON FAILURE (or other recovery routines)
Pedro Vera
User avatar
Pedro
 
Posts: 571
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 40 times

Re: How to suppress error messages in REXX?

Postby BILLKOS » Sun Apr 04, 2010 9:23 am

IF USERID() <> "YOURID" THEN DO;
SIGNAL ON SYNTAX NAME ERRORMSG;
SIGNAL ON HALT NAME ERRORMSG;
SIGNAL ON NOVALUE NAME ERRORMSG;
SIGNAL ON ERROR NAME ERRORMSG;
SIGNAL ON FAILURE NAME ERRORMSG;
END;

The above works for us.
BILLKOS
 
Posts: 1
Joined: Sun Apr 04, 2010 9:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to suppress error messages in REXX?

Postby gc1958 » Sat May 22, 2010 9:22 pm

gc1958
 
Posts: 4
Joined: Sat May 22, 2010 1:27 am
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post