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
 

 

Handling Multiple ISPF Panels in rexx

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

New User


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

PostPosted: Thu Mar 29, 2007 3:28 pm    Post subject: Handling Multiple ISPF Panels in rexx
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 29, 2007 3:32 pm    Post subject:
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: 55
Location: Pune India

PostPosted: Thu Mar 29, 2007 3:37 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 29, 2007 3:52 pm    Post subject:
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: 55
Location: Pune India

PostPosted: Thu Mar 29, 2007 4:23 pm    Post subject: Re: panels in rexx
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 29, 2007 4:40 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Thu Mar 29, 2007 5:05 pm    Post subject:
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: 55
Location: Pune India

PostPosted: Thu Mar 29, 2007 5:08 pm    Post subject:
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: 55
Location: Pune India

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

how to design it as pop up window?
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: Thu Mar 29, 2007 5:16 pm    Post subject: Re: panels in rexx
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 29, 2007 5:18 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 29, 2007 5:19 pm    Post subject:
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: 55
Location: Pune India

PostPosted: Fri Mar 30, 2007 9:37 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 30, 2007 12:44 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Mar 30, 2007 6:20 pm    Post subject: Re: Handling Multiple ISPF Panels in rexx
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: 55
Location: Pune India

PostPosted: Mon Apr 02, 2007 9:59 am    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 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


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