View previous topic :: View next topic
|
Author |
Message |
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Look at ISPEXEC ERRORS
google is your friend |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
Thanks enrico |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|