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

REXX command to exit from the current TSO session


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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: 2358
Location: Israel

PostPosted: Tue Jan 06, 2009 2:51 pm
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
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: 2358
Location: Israel

PostPosted: Tue Jan 06, 2009 5:38 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jan 06, 2009 5:45 pm
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

Global Moderator


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

PostPosted: Tue Jan 06, 2009 10:07 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jan 06, 2009 10:58 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top