Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Rexx Macro - Hiding error screen

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Jul 20, 2011 1:16 pm    Post subject: Rexx Macro - Hiding error screen
Reply with quote

Hi,

I am trying to do some error handling. I have written the below code

Code:

/* REXX */                                 
"ISREDIT MACRO (N) NOPROCESS"               
ISREDIT "(MX)=LINENUM .ZLAST "             
IF LENGTH(N)=0 THEN N=7                     
ISREDIT "PROCESS RANGE C"                   
ISREDIT "(L)=LINENUM .ZFRANGE "             
ISREDIT "(MX)=LINENUM .ZLRANGE "           
ISREDIT "LABEL "L"=.A "                 
ISREDIT "LABEL "MX"=.B "                 
IF L == MX THEN                             
DO                                         
   ZEDSMSG='BLOCK STATEMENT MISSING'       
   ADDRESS ISPEXEC "SETMSG MSG(ISRZ000)"   
   EXIT                                     
END                                         
ISREDIT "C "N" ' ' '*' ALL .A .B"     
EXIT                                       


The code is working fine but when I enter some wrong parameters like
Code:

Command ===> CMM                     
000067                               
cc0068         01 WS-LITERALS.       
000069            05 WS-SELECT-LIT   
000070            05 WS-UPDATE-LIT   
c00071            05 WS-OPEN-LIT     


It display the below error screen...
Code:

 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
                           ISPF Edit Macro Error                               
 Command ===>                                                                   
                                                                               
 ******************************************************************************
 *                                                                            *
 * Command in error . : PROCESS RANGE C                                       *
 *                                                                            *
 * Command conflict                                                           *
 * "C" conflicts with a previous "CC" command. Delete one.                    *
 *                                                                            *
 *   Error message ID . : ISRE046                                             *
 *                                                                            *
 *   Last return code . : 16                                                  *
 *                                                                            *
 *   Macro executing  . : CMM                                                 *
 *                                                                            *
 * Press ENTER key to terminate the macro.                                    *
 *                                                                            *
 *                                                                            *
 *                                                                            *
 ******************************************************************************


My question is how can we bypass this error screen?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 20, 2011 1:29 pm    Post subject:
Reply with quote

Look at ISPEXEC ERRORS

google is your friend
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Wed Jul 20, 2011 2:05 pm    Post subject: Reply to: Rexx Macro - Hiding error screen
Reply with quote

the manuals will tell all You might want to know about
ISPEXEC "CONTROL ERRORS RETURN"

here for ISPF
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/ISPZPM70
and here for REXX
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90

not the latest but more that enough for Your needs
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Jul 20, 2011 2:43 pm    Post subject:
Reply with quote

Thanks enrico
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2086
Location: Silicon Valley

PostPosted: Wed Jul 20, 2011 9:08 pm    Post subject: Reply to: Rexx Macro - Hiding error screen
Reply with quote

Code:
IF L == MX THEN                             
DO                                         
   ZEDSMSG='BLOCK STATEMENT MISSING'       
   ADDRESS ISPEXEC "SETMSG MSG(ISRZ000)"   
   EXIT                                     
END                                         
ISREDIT "C "N" ' ' '*' ALL .A .B"     


It looks like you detect an error condition, but follow it with your regular processing. I think you are missing an ELSE statement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us