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 to do PF3 to exit the panel in rexx?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Thu Jul 24, 2014 8:52 pm    Post subject: How to do PF3 to exit the panel in rexx?
Reply with quote

Hi ,

I think i opened topic before but i can't find . I have to re-open this question.

Now i got the panel and i want to press F3 to exit the progrom , but now i press F3 it not exit the progrom but operation as you hit enter. I don't know why and how to correct this problem ?? Thanks
Code:
MYARG=userid()                                   
call WHO                                         
name=result                                       
ADDRESS ISPEXEC                                   
PANELLIB='TTAT.TSP.TU14.DR'                       
"ISPEXEC LIBDEF ISPPLIB DATASET ID('"PANELLIB"')"
rc=4                                             
DO FOREVER                                       
"DISPLAY PANEL (PANEL)"                           
  SELECT                                         
    WHEN option='1' THEN rc=REX2CA()             
    WHEN option='2' THEN rc=REX2CRP()             
    WHEN option='3' THEN rc=REX2DIF()             
    WHEN option='4' THEN rc=REX2FAST()           
    WHEN option='5' THEN rc=REX2JCLP()           
    WHEN option='6' THEN rc=REX2PKZ()             
    WHEN option='7' THEN rc=REX2SS()             
    WHEN option='R' THEN rc=REXRMAIN()           
     WHEN option='M' THEN rc=REXXMORE()
     WHEN option='X' THEN LEAVE       
     OTHERWISE  "SETMSG MSG(ISPP195)" 
   END                                 
 END                                   
 return rc                             
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: Thu Jul 24, 2014 9:00 pm    Post subject:
Reply with quote

Look at some of the code already on the forum. I'm sure you will find the answer.

A little clue, post the code
SAY RC

directly after your line
ISPEXEC DISPLAY PANEL(PANEL)

and see what happens when you
a) Press ENTER
b) Press PF3
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Jul 24, 2014 9:07 pm    Post subject: Reply to: How to do PF3 to exit the panel in rexx?
Reply with quote

Quote:
I think i opened topic before but i can't find . I have to re-open this question.



from the forum home page, after the login
You can click on view your posts
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Jul 24, 2014 9:07 pm    Post subject: Reply to: How to do PF3 to exit the panel in rexx?
Reply with quote

Quote:
but now i press F3 it not exit the progrom but operation as you hit enter

Got a language barrier here - I do not understand what you are saying.
Code:

DISPLAY PANEL
DO WHILE RC = 0
   do something
   DISPLAY PANEL
END
IF RC <> 8 /* Not PF3 hit */
THEN do something

or
Code:

DISPLAY PANEL
IF RC = 0
   do some things
ELSE do other things

Use the model command instead of documentation. It documents the various return codes.
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: Thu Jul 24, 2014 9:09 pm    Post subject:
Reply with quote

Also, please show us the effort that you have made prior to posting on the forum.

We are here to help, but NOT be used as a free training program.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 51
Location: Switz

PostPosted: Fri Jul 25, 2014 2:59 pm    Post subject:
Reply with quote

jackzhang75, you still don't seem to have grasped that PF3 causes a RC=8, so your code has to handle that condition. What you pasted at the top doesn't. Various contributors here have advised you what to do, so it's pointless re-posting the same query if you won't do as they suggest.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Fri Jul 25, 2014 6:00 pm    Post subject: Answer,
Reply with quote

Thanks for everyone's answer!
With your help, i found where is the problem.
The reason is if use Do forever , when you press F3 , it won't work.
I need to use Do while R=0 and if RC<>8 , this works perfect !

Again , i want to thanks everyone for your help!
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Jul 25, 2014 11:55 pm    Post subject: Reply to: How to do PF3 to exit the panel in rexx?
Reply with quote

That's not true, I use that construct regularly:

Code:

Do Forever
  "ISPEXEC DISPLAY PANEL(mypanel)"
  If rc > 0 Then Leave
  If Strip(zcmd) = "some value" Then ...
End
Exit 0
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Mon Jul 28, 2014 1:47 pm    Post subject: Reply to: How to do PF3 to exit the panel in rexx?
Reply with quote

F12 also will exit . if you use rc

you could also use &VPFK = .PFKEY in the panel definition
then check the VPFK 's value icon_cool.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Mon Jul 28, 2014 1:50 pm    Post subject:
Reply with quote

Just a side remark:
The "DO FOREVER" is only one method amongst others, it does not have to be.
This method works as well:
Code:
DISPLAY PANEL
DO WHILE RC = 0
   do something
   DISPLAY PANEL
END
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Mon Jul 28, 2014 6:14 pm    Post subject:
Reply with quote

Remember that the P in PFK stands for programmable! Do not assume that PFK3 always means 'exit'. It can mean whatever the user has defined it to mean.

PFK3 as END is only a convention; it is not a rule.

It is the END command that causes the RC=8. The user could just as easily assign PFK1 to the END command, or type 'END' on the command line.

My advice to dialog developers is to use the return code and the ZVERB field to determine what action is to be performed when a PFK is struck.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Jul 28, 2014 9:46 pm    Post subject: Reply to: How to do PF3 to exit the panel in rexx?
Reply with quote

I agree with Don: you should _not_ check which key was actually pressed, but rather check the command verb itself.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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