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
 

 

To terminate REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: To terminate REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sun Oct 19, 2008 1:34 pm    Post subject: Reply to: To terminate REXX
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: 2360
Location: Israel

PostPosted: Sun Oct 19, 2008 3:42 pm    Post subject:
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

Senior Member


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

PostPosted: Sun Oct 19, 2008 10:17 pm    Post subject: Reply to: To terminate REXX
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 http://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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Oct 20, 2008 6:37 pm    Post subject:
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    Post subject:
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    Post subject:
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: 2360
Location: Israel

PostPosted: Mon Oct 20, 2008 8:15 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Oct 20, 2008 9:30 pm    Post subject: Reply to: To terminate REXX
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Oct 21, 2008 12:48 pm    Post subject: Reply to: To terminate REXX
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Oct 21, 2008 1:14 pm    Post subject: Reply to: To terminate REXX
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Oct 21, 2008 1:28 pm    Post subject: Reply to: To terminate REXX
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

Senior Member


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

PostPosted: Tue Oct 21, 2008 9:34 pm    Post subject: Reply to: To terminate REXX
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 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
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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