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

Handling Multiple ISPF Panels in rexx


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Thu Mar 29, 2007 3:28 pm
Reply with quote

i am having two panels at present and after typing the input in the first panel it will display the second panel then the input should be given in the second panel to proceed further ....... if i press f3 from the second panel it is proceeding further but i want it to go back to the first panel from the second after pressing f3.... can anyone help me out?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 29, 2007 3:32 pm
Reply with quote

Check the return codes after the panel has been displayed.

They are different for pressing enter and for pressing PF3.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Thu Mar 29, 2007 3:37 pm
Reply with quote

if i dont want to continue the process means then i would be able to come back.... for that i need to exit from the panels in the ordered manner.... what can i do for that
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 29, 2007 3:52 pm
Reply with quote

Well, after checking the return code from the panel displays, you will need to code your REXX/CLIST accordingly.

If Enter then do this ELSE do that.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Thu Mar 29, 2007 4:23 pm
Reply with quote

i checked the return code i coded as
if rc>0 then exit
else say"invalid value"
but when i press the pf3 key it is saying invalid value but i want it to move to the previous panel and not to exit from the whole set up.....
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 29, 2007 4:40 pm
Reply with quote

From what you are saying, you get a RC=0 when you hit PF3 rather than when you hit enter. This doesn't sound right to me.

In fact I've just tested it, and it isn't right.
When I pressed enter the RC was 0, but using PF3 the RC was 8.

So you will need to code your logic to react to the RC from the panel entries, processing to continue if RC=0, loop back to start of program if RC=8.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Mar 29, 2007 5:05 pm
Reply with quote

You can design you panel as a pop-up window; ISPF will take care of the rest.

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

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Thu Mar 29, 2007 5:08 pm
Reply with quote

ya but i am getting the return code 0 while hitting pf3 key
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Thu Mar 29, 2007 5:08 pm
Reply with quote

how to design it as pop up window?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Mar 29, 2007 5:16 pm
Reply with quote

Nowhere in this entire discussion has the O/P mentioned what command is mapped to the PF3 key. It's not pressing the key that sets the return code. It's what command is issued as a result that does.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 29, 2007 5:18 pm
Reply with quote

This always gives me an RC8 when I hit PF3.
Am I missing something here because I thought that PF3 always gave an 8 as RC icon_confused.gif

Code:

"ISPEXEC DISPLAY PANEL(TEST9999)"   
SAY "RETURN CODE WAS " RC           
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Mar 29, 2007 5:19 pm
Reply with quote

Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaak, superk,

What an excellent point.
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Fri Mar 30, 2007 9:37 am
Reply with quote

Code:

"DISPLAY PANEL(ITPAN1)"     
  M=RC                         
  SAY RC                       
  IF M=0 THEN                 
  ADDRESS ISPEXEC "VGET (A)"   
  ADDRESS ISPEXEC "VGET (ZPFKEY
  SELECT                       
  WHEN A='A' THEN             
  CALL DISPAPP_PARA           
  WHEN A='B' THEN             
  CALL ADDAPP_PARA             
     EX_PARA:     
   EXIT

............ this is my code but in panel itpan1 when i press f3 it is showing rc as 8 and calling dispapp_para... i want to return back to the program again.......wat to do?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Mar 30, 2007 12:44 pm
Reply with quote

That's because your logic doesn't have any logic for treating RC8 .......

It's a program. YOU have to write it to do what it's supposed to do. The P in ISPF does not stand for "Pyschic".
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Mar 30, 2007 6:20 pm
Reply with quote

This is what I would do:

Code:

/* REXX */                               
Call PANEL1                               
Call EXIT                                 
                                         
PANEL1:                                   
Do Forever                               
  Say PANEL1                             
  "ISPEXEC DISPLAY PANEL(ISR@PRIM)"       
  rc1 = rc                               
  If rc1 = 0 Then Call PANEL2             
  If rc1 >= 8 Then Leave                 
End                                       
Return                                   
                                         
PANEL2:                               
Do Forever                           
  Say PANEL2                         
  "ISPEXEC DISPLAY PANEL(ISR@PRIM)"   
  rc2 = rc                           
  If rc2 = 0 Then Call EXIT           
  If rc2 >= 8 Then Leave             
End                                   
Return                               
                                     
EXIT:                                 
Say DONE                             
Exit 0                               
Back to top
View user's profile Send private message
rohitcognizant

New User


Joined: 13 Feb 2007
Posts: 54
Location: Pune India

PostPosted: Mon Apr 02, 2007 9:59 am
Reply with quote

thank you for ur help suoerk
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top