IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error handling for CALL statement


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Mon Feb 13, 2012 11:08 am
Reply with quote

When I use CALL to call another REXX code named ABCDEF, if can not find the ABCDEF , message shown below then REXX will end
Code:
    17 +++ CALL ABCDEF                       
Error running DIS, line 17: Routine not found


I want to handle this call error and don't want to end my REXX end , how can I do with this ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 13, 2012 12:50 pm
Reply with quote

Not have too many manuals where you are ?

Code:
SIGNAL ON SYNTAX NAME whatever

whatever:
YOUR ERROR HANDLING CODE
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Mon Feb 13, 2012 1:06 pm
Reply with quote

expat wrote:
Not have too many manuals where you are ?

Code:
SIGNAL ON SYNTAX NAME whatever

whatever:
YOUR ERROR HANDLING CODE


Thank you expat , I read the manuals and tried
Code:

CALL ON ERROR NAME trapname
CALL ON AILURE NAME trapname
CALL ON HALT NAME trapname

SIGNAL ON  ERROR NAME trapname
SIGNAL ON AILURE NAME trapname
SIGNAL ON HALT NAME trapname

but I missed the SIGNAL ON SYNTAX NAME trapname ......
SIGNAL ON SYNTAX NAME trapname worked for me , thank you !
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 13, 2012 2:00 pm
Reply with quote

I usually use SIGNAL ON SYNTAX as it picks up on all the other error types too.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Mon Feb 13, 2012 2:04 pm
Reply with quote

expat wrote:
I usually use SIGNAL ON SYNTAX as it picks up on all the other error types too.


I learned another trick from you , Thanks !
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top