View previous topic :: View next topic
|
Author |
Message |
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Check the return codes after the panel has been displayed.
They are different for pressing enter and for pressing PF3. |
|
Back to top |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can design you panel as a pop-up window; ISPF will take care of the rest.
O. |
|
Back to top |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
ya but i am getting the return code 0 while hitting pf3 key |
|
Back to top |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
how to design it as pop up window? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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
Code: |
"ISPEXEC DISPLAY PANEL(TEST9999)"
SAY "RETURN CODE WAS " RC |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaak, superk,
What an excellent point. |
|
Back to top |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
rohitcognizant
New User
Joined: 13 Feb 2007 Posts: 54 Location: Pune India
|
|
|
|
thank you for ur help suoerk |
|
Back to top |
|
|
|