View previous topic :: View next topic
|
Author |
Message |
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
I am designing a REXX tool which displays a panel with options.
and when 'Enter' is pressed, it will automatically creates a dataset with options given on panel and it will be open in edit mode.
The problem is when he tries to close the screen (By pressing 'X') control is returned back to REXX and the main panel is displayed again. Instead of this 'when he closes the screen REXX should terminate. How can we acheive this..?
Thanks,
Lokesh |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
The problem is when he tries to close the screen (By pressing 'X') control is returned back to REXX and the main panel is displayed again. Instead of this 'when he closes the screen REXX should terminate. How can we acheive this..?
|
are You invoking panel a a selection panel or from a "DISPLAY PANEL"
inside Your rexx ?
Anyway the ergonomics is as it should be ..
it follows the panel hierarchy backtracing step by step
it' a bad interface/interaction behavior to skip levels |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can save the return-code from the DISPLAY service, and test it. If RC=8 then you can end your REXX.
O. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
It doesn't seem to work as RC is 4 when the screen is closed by giving 'X' and when returned to REXX module. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
How does your REXX code deal with the RC4.
You will need to post your code. |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Actually there is no condition I will be checking for RC = 4
Here is the code
Code: |
SECOND:
DO
IF MAINOPT = 1 THEN
DO
SELPANEL = 'SORTPANE'
CALL PANEL_DISPLAY -> Displays panel
IF PFKEY = 'PF03' THEN -> Exit completely when he presses 'PF3'
EXIT(0)
..
..(Sort JCL will be created based on the parameters given by him)
..
ADDRESS TSO "DELETE '"USERID()".TEMP.NEW'"
ADDRESS TSO "ALLOC F(OUTFILE) DA('"USERID()".TEMP.NEW'),
NEW SPACE(80,10)",
"RECFM(F,B) LRECL(80) BLKSIZE(800)";
ADDRESS TSO "EXECIO * DISKW OUTFILE (FINIS STEM SORT.)
ADDRESS TSO "FREE F(OUTFILE)";
ADDRESS ISPEXEC
"ISPEXEC EDIT DATASET('"USERID()".TEMP.NEW')" -> OPENED in edit mode
CALL SECOND -> Here I will be calling second so when he presses PF3 while the dataset in edit mode the panel should be displayed so that he can continue |
The problem is when he presses 'X' while in edit mode an presses enter..
I need to terminate the REXX module.. how can I acheive it |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
How can we "save the return-code from the DISPLAY service" ..?? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Right after the DISPLAY service,code something like SAVE_RC = RC
O. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
The problem is when he presses 'X' while in edit mode an presses enter. |
Can you clarify what you mean by edit mode? |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
1) I will display a panel
2) When he presses 'Enter', a dataset wil be created and open in edit mode from the panel itself
3)He can press 'X' for closing the screen.
4) But when he presses 'X' control is returned to REXX module and I cannot also check RC because RC is 4 when he presses either 'PF3' or (Presses 'X' and enter).
5) When he presses 'PF3' the panel should be displayed again
6) When he presses 'X' and enter the REXX module should be terminated
What cab be the solution..??? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
in ISPF terminology PF3 and X are synonyms ,
the command "=X"will take You to the top the hierarchy
look at the ispf manuals for the meaning of the return codes after
a "DISPLAY PANEL"
... 4 means PF3
... 8 means "=X" |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
Can you please explain of what you told. "Take you to the top of hierarchy means..???"
I am invoking dataset in edit mode by
ADDRESS ISPEXEC
"ISPEXEC EDIT DATASET('"USERID()".TEMP.NEW')"
After that I have coded
SAY RC
Here I am getting 4 when I press 'PF3' or by closing the screen by 'giving = x'
and I am not getting 8 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
after an EDIT ( IIRC )the return code will tell You nothing about the panel navigation flow
only about the result of the editing session, data saved, data not saved
do some testing by displaying the return code after the edit command |
|
Back to top |
|
|
lokeshwar_manoharan
New User
Joined: 22 Sep 2008 Posts: 49 Location: Chennai,Tamilnadu
|
|
|
|
How can I able to know that he has pressed 'PF3' in the dataset.. Is there any variable from which I can get or any other clue.
I don't know how to test after the panel is displayed. How can I get the last ISPF command he has issued? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
did You read my previous post ??
reread the IPS manuals |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Have you tried checking ZVERB or ZCMD? |
|
Back to top |
|
|
|