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

Execute Rexx at TSO session end


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Biswajit Pattanayak
Currently Banned

New User


Joined: 24 Apr 2013
Posts: 15
Location: India

PostPosted: Thu Feb 06, 2014 12:16 pm
Reply with quote

I have written a rexx tool I want this rexx tool to execute at end of TSO session.

I don't know if this is possible or not.

Please help me on this.

Thanks
Biswajit
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Feb 06, 2014 12:19 pm
Reply with quote

Quote:
end of TSO session.


Could you please explain that??
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Feb 06, 2014 1:03 pm
Reply with quote

if it is a tool endorsed by Your organization speak to Your support,

if it is not , no reason to use forum advices to tweak Your organization standards.

PS...
Pandora, most probably the TS meant ...
after ISPF termination and before logoff.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Feb 06, 2014 1:58 pm
Reply with quote

enrico-sorichetti wrote:

Pandora, most probably the TS meant ...
after ISPF termination and before logoff.


Yeah Enrico that was my wild guess as well
Just was waiting if I was in same page with TS .. Thanks Enrico anyway icon_smile.gif
Back to top
View user's profile Send private message
Biswajit Pattanayak
Currently Banned

New User


Joined: 24 Apr 2013
Posts: 15
Location: India

PostPosted: Thu Feb 06, 2014 2:31 pm
Reply with quote

Thanks for the quick reply.

This tool is not endorsed by our organization .
I have developed this little tool that is intended to automatically triggered when user logs off.

But if anything major needs to be changed to implement this then first I will seek for the permission of our support group.

Without the permission of our mainframe support group I am not going to tweak anything.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Feb 06, 2014 8:15 pm
Reply with quote

Assuming you are working in your own sandbox...

1. The TSO/E Customization manual mentions a logoff exit (IKJEFLD2). If you have an authorized library, I think you can use TSOLIB to make the exit active for you. Use the exit to invoke your rexx program

2. Separate from #1, the search order is execs and then load modules. Name your rexx exec 'LOGOFF'. When you try to end your session by logging off, your exec will be called. Exiting might be tricky... you might get into a recursive loop.
Back to top
View user's profile Send private message
chaoj

Active User


Joined: 03 Jun 2010
Posts: 103
Location: Dalian

PostPosted: Sat Mar 15, 2014 9:14 am
Reply with quote

I think you could write EXEC 'XXXXX.XXXX(REXXPGM)' in the Command line of the log on panel
Back to top
View user's profile Send private message
Ramsee

New User


Joined: 06 Jan 2011
Posts: 53
Location: Chennai

PostPosted: Tue Mar 18, 2014 12:55 pm
Reply with quote

Hi,
There are two ways to execute your REXX code,
1.Explicit Run
--> EXEC 'HLQ1.PDSNAME.MEMBER(REXPGM)' EXEC
--> EX against the REXXPGM element inside the HLQ1.PDSNAME.MEMBER
2.Implict Run
--> START --> 6 --> TSO ALTLIB ACTIVATE (Press Enter)
--> type "EXEC" (Press Enter)
--> enter the PDS details ('HLQ1.PDSNAME.MEMBER')
2.a. How to execute your REXX Code:
--> Start --> 6 --> REXXPGM (press enter)

Still if you have any issues kindly let us know.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Tue Mar 18, 2014 1:41 pm
Reply with quote

Ramsee wrote:
Hi,
There are two ways to execute your REXX code,
1.Explicit Run
--> EXEC 'HLQ1.PDSNAME.MEMBER(REXPGM)' EXEC
--> EX against the REXXPGM element inside the HLQ1.PDSNAME.MEMBER
2.Implict Run
--> START --> 6 --> TSO ALTLIB ACTIVATE (Press Enter)
--> type "EXEC" (Press Enter)
--> enter the PDS details ('HLQ1.PDSNAME.MEMBER')
2.a. How to execute your REXX Code:
--> Start --> 6 --> REXXPGM (press enter)

Still if you have any issues kindly let us know.


I think the TS want to execute his REXX when he logoff from mainframe session...
Back to top
View user's profile Send private message
Biswajit Pattanayak
Currently Banned

New User


Joined: 24 Apr 2013
Posts: 15
Location: India

PostPosted: Wed Mar 19, 2014 2:35 pm
Reply with quote

Yes TheMFKid, you are right , I want to execute the rexx at logoff. Not at logon or by using command exec..

Thanks
Biswajit
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Wed Mar 19, 2014 8:56 pm
Reply with quote

When you logon to the system do you land automatically in ISPF.
If yes on your logon panel specify

Command ===> ex 'xxx.yyy(xxx)' and you will achieve the desired results
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Mar 20, 2014 3:44 am
Reply with quote

All this fascination with the command line and logon whereas the request was for information after leaving ISPF!

If, after leaving ISPF, you have a READY prompt then you can execute a rexx or clist program using the format specified - EX library(member)
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Mar 20, 2014 12:40 pm
Reply with quote

The command ====> is not in ISPF it is on the logon Panel. This will do exactly what the poster wants, assuming by LOGON he lands directly in ispf.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Mar 20, 2014 2:28 pm
Reply with quote

I agree with nevilh - but then that depends on the log-on procedure in place as he has mentioned about if the OP lands "automatically" in ISPF. I vaguely recall that even with such a log-on procedure, I was never given access to "command ====>", while logging-off (and this is what OP has asked for -- command to execute on log-off not on log-on)... so does the question stil remains?

Hopefully I've not misunderstood.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Mar 20, 2014 2:38 pm
Reply with quote

At LOGON time you need to set the COMMAND ====> value. If your Logon Proc puts you automatically in ISPF, when you leave ISPF the Command specified at LOGON time will be executed.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Mar 20, 2014 6:25 pm
Reply with quote

Some of you are equating exiting ISPF with logging off. It is not the same thing. You can leave ISPF and get to TSO READY prompt and do stuff there then get back into ISPF.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Mar 20, 2014 6:50 pm
Reply with quote

On one system that I use the command entered on the logon panel is executed at logon time which meant that I had to remove my 'logoff' command from there as I got logged off before getting into IPSF. And a lot of places do not have the default logon panel.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Mar 20, 2014 7:46 pm
Reply with quote

Quote:
On one system that I use the command entered on the logon panel is executed at logon time which meant that I had to remove my 'logoff' command from there as I got logged off before getting into ISPF

I repeat if at logon time you are automatically put into ISPF the command on the logon panel will be executed on leaving ISPF. If this is not happening then either ask your SYSPROG what he has changed or complain to IBM.
The default logon Panel is an SMP maintained load module in the LPALIB it is very unlikely that a site does not have it. To check from READY type in the command LOGON "USERID" and you should always get the Logon Panel
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Mar 20, 2014 7:52 pm
Reply with quote

Quote:
And a lot of places do not have the default logon panel.


Our shop does not have COMMAND line on our Logon panel.

Our's is customized requesting 'other' infoirmation.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Mar 20, 2014 8:20 pm
Reply with quote

Ouch I didn't see that one coming. I must admit I had interpreted
Quote:
do not have the default logon panel
as the Panel had been removed not as someone had modified it. If the Command line has been removed naturally you are well and truly stuffed .
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 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
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top