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
 

 

REXX command to exit from the current TSO session

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

New User


Joined: 18 Nov 2008
Posts: 3
Location: Mumbai

PostPosted: Tue Jan 06, 2009 2:36 pm    Post subject: REXX command to exit from the current TSO session
Reply with quote

hi,
I want to close the current TSO session. Except the following way
1. =x
2. PF3
Any one knows the REXX command to close TSO session. Please help me.
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 06, 2009 2:51 pm    Post subject:
Reply with quote

Try this (at your own risk):
Code:

/* REXX */                                           
                                                     
ARG USER_ID                                         
IF USER_ID = '' THEN                                 
  USER_ID = USERID()                                 
                                                     
IF USER_ID ¬= USERID() THEN DO
  SAY 'Are you sure you want to cancel 'USER_ID '?' 
  PULL ANSWER                                       
  IF ANSWER = 'Y' | ANSWER = 'YES' |,               
     ANSWER = 'y' | ANSWER = 'yes' THEN             
    SIGNAL DOIT                                     
  ELSE                                               
    SIGNAL JUST_EXIT                                 
END                                                 
                                                     
DOIT:                                               
  SDSFCMD = "/C U=" || USER_ID                       
  "ISPEXEC SELECT PGM(ISFISP) PARM("SDSFCMD")"       
                                                     
JUST_EXIT:                                           
                                                     
EXIT                                                 
                                                     


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

New User


Joined: 18 Nov 2008
Posts: 3
Location: Mumbai

PostPosted: Tue Jan 06, 2009 5:36 pm    Post subject:
Reply with quote

ofer71 wrote:
Try this (at your own risk):
Code:

/* REXX */                                           
                                                     
ARG USER_ID                                         
IF USER_ID = '' THEN                                 
  USER_ID = USERID()                                 
                                                     
IF USER_ID ¬= USERID() THEN DO
  SAY 'Are you sure you want to cancel 'USER_ID '?' 
  PULL ANSWER                                       
  IF ANSWER = 'Y' | ANSWER = 'YES' |,               
     ANSWER = 'y' | ANSWER = 'yes' THEN             
    SIGNAL DOIT                                     
  ELSE                                               
    SIGNAL JUST_EXIT                                 
END                                                 
                                                     
DOIT:                                               
  SDSFCMD = "/C U=" || USER_ID                       
  "ISPEXEC SELECT PGM(ISFISP) PARM("SDSFCMD")"       
                                                     
JUST_EXIT:                                           
                                                     
EXIT                                                 
                                                     


O.



If possible, can you please explain the code? it seems you are purging the joblog in input que. it will terminate the session. But i need to close only one ISPF screen. Just give me the alternate way to '=X' or 'PF3' in REXX.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jan 06, 2009 5:38 pm    Post subject:
Reply with quote

I am cancelling the user... icon_lol.gif

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jan 06, 2009 5:45 pm    Post subject:
Reply with quote

Quote:
I want to close the current TSO session.
Terminology note: you are asking in this request to exit TSO; you are not asking to close one ISPF screen. You have been provided a way to do this.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Jan 06, 2009 10:07 pm    Post subject: Reply to: REXX command to exit from the current TSO sesion
Reply with quote

Quote:
But i need to close only one ISPF screen

Can you provide more details about what you want to do? What application is it? How was it started?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Tue Jan 06, 2009 10:58 pm    Post subject: Reply to: REXX command to exit from the current TSO session
Reply with quote

Quote:
I want to close the current TSO session. Except the following way
1. =x
2. PF3

what is wrong about using the standard approach ???s icon_evil.gif

such useless curiosities are just a waste of time

Quote:
But i need to close only one ISPF screen
if that is what You meant, why the title....
Quote:
... exit from the current TSO session


what do You want ?
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. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm


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