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

To terminate REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Sun Oct 19, 2008 12:32 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Sun Oct 19, 2008 1:34 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Oct 19, 2008 3:42 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sun Oct 19, 2008 10:17 pm
Reply with quote

Some still follow the 1970's scheme where PF3=End means to back up to previous level.

But a new scheme from 1988 has PF3=Exit and PF12=Cancel, where Exit means stop all panels and get out of the entire application and Cancel means to back up to previous panel. This this scheme, exit means the same as RETURN did in old scheme. See publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F29BDG00/CCONTENTS?SHELF=CEESL002&DN=SC26-4583-00&DT=19921204095534
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Mon Oct 20, 2008 6:30 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Oct 20, 2008 6:37 pm
Reply with quote

How does your REXX code deal with the RC4.
You will need to post your code.
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Mon Oct 20, 2008 7:17 pm
Reply with quote

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
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Mon Oct 20, 2008 8:08 pm
Reply with quote

How can we "save the return-code from the DISPLAY service" ..??
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Oct 20, 2008 8:15 pm
Reply with quote

Right after the DISPLAY service,code something like SAVE_RC = RC

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

Global Moderator


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

PostPosted: Mon Oct 20, 2008 9:30 pm
Reply with quote

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
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue Oct 21, 2008 12:32 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Oct 21, 2008 12:48 pm
Reply with quote

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
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue Oct 21, 2008 1:08 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Oct 21, 2008 1:14 pm
Reply with quote

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
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue Oct 21, 2008 1:23 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Oct 21, 2008 1:28 pm
Reply with quote

did You read my previous post ??
reread the IPS manuals icon_biggrin.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Oct 21, 2008 9:34 pm
Reply with quote

Have you tried checking ZVERB or ZCMD?
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
Search our Forums:

Back to Top