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: 7996
Location: Bellevue, IA

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: 2033
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: 10231
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
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm


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