Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How Escape Top work if coded instead of Escape Bottom

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
richie

New User


Joined: 11 Jun 2005
Posts: 24

PostPosted: Mon Mar 05, 2007 12:59 pm    Post subject: How Escape Top work if coded instead of Escape Bottom
Reply with quote

Hi,

Please confirm my understanding on escape Bottom.
Escape Bottom executes the next line following the loop.

If i code an escape bottom between IF- ENDIF , then the statement after ENDIF would be executed.

So, in below ex MOVE *TIMN TO #TIME and below wud be excecuted .Please let me know if i understand it correctly.

Also how wud Escape Top work here if coded instead of Escape Bottom.


RD01.
READ (1) TABLE WITH KEY = #KEY

IF FLAG EQ #FLAG AND
TABLE EQ #TABLE AND
MOVE *ISN TO #ISN
ESCAPE BOTTOM
END-IF
*
MOVE *TIMN TO #TIME

IF #ISN=0
STORE A RECORD
ET

END-READ


Thankyou all for your help.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Mar 05, 2007 1:37 pm    Post subject:
Reply with quote

ESCAPE (TOP, BOTTOM & ROUTINE) can be coded only within a loop or routine. They are not valid within IF.

O.
Back to top
View user's profile Send private message
Raj Kiran

New User


Joined: 24 Aug 2007
Posts: 3
Location: Chennai

PostPosted: Fri Aug 24, 2007 4:25 pm    Post subject:
Reply with quote

Hi

the Escape bottom comes out of the IF-ENDIF(if the condition is true) and it wont execute the next statement

RD01.
READ (1) TABLE WITH KEY = #KEY

IF FLAG EQ #FLAG AND
TABLE EQ #TABLE AND
MOVE *ISN TO #ISN
ESCAPE BOTTOM
END-IF
*
MOVE *TIMN TO #TIME

IF #ISN=0
STORE A RECORD
ET

END-READ

in this code Escape bottom comes out of the Read and executes the next statement after the read

in the below example if u give escape top
RD01.
READ (1) TABLE WITH KEY = #KEY

IF FLAG EQ #FLAG AND
TABLE EQ #TABLE AND
MOVE *ISN TO #ISN
ESCAPE TOP
END-IF
*
MOVE *TIMN TO #TIME

IF #ISN=0
STORE A RECORD
ET

END-READ

it comes out of IF (if the condition is true) and again goes back to the read statement and doesn't go to the next statement(move statement)

and comes out of the read as u have given READ(1). if u have as READ it reads another record.


Hope u got it
Raj
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts What is the maximum number of sort wo... Pravina M SYNCSORT 2 Mon Mar 14, 2016 4:51 pm
No new posts JCL -> Rexx -> XMITIP : Doesnt ... enrico-sorichetti CLIST & REXX 2 Thu Aug 06, 2015 11:09 pm
No new posts Select Variable=string Rexx does not ... Csongor CLIST & REXX 11 Thu May 07, 2015 9:33 pm
No new posts Does FUNCTION NUMVAL work for alphanu... Venkata Ramayya COBOL Programming 8 Fri Mar 20, 2015 10:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us