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

Execution of Macro at Command Line on a Mainframe Logon


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Mon Dec 22, 2014 7:47 pm
Reply with quote

Hi,

I am providing a rexx macro on the command line on a mainframe logon screen (See screenshot).
The problem is that when I login, i.e. when I go to ISPF from TSO, the rexx script remains unexecuted.
But when I try to logoff the session, i.e. go back to TSO from ISPF then the script actually runs.

I am not sure what do I need to do for my script to be executed at logon time and not at logoff.

The rexx is a simple setup step to add library to SYSEXEC.

Please help so that my script runs each time I login.

Thanks
Rahul
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Mon Dec 22, 2014 7:58 pm
Reply with quote

I am sure the logon proc is already executing some setup execs, and that exec is starting ISPF. The exec you provide will be executed after the system logon exec, but the system exec does not finish until ISPF returns control.

You need to add your customization to the existing setup process.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Mon Dec 22, 2014 8:07 pm
Reply with quote

Thanks for the reply Pedro!

I was under impression that whatever rexx macro I give (at the command line) will run when I logon.

If it doesn't run when I login then what is the point in having a command line which is not able to run a macro.

Is it not working because it is a setup script ?

I'll really appreciate if you could clear my doubt.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Dec 22, 2014 8:18 pm
Reply with quote

It depends on the two(2) TSO user exits and how they are setup. It appears that your Rexx is exec at sign off and not at sign on and this how someone in your shop has decided that they want your ISPF sessions to function.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Mon Dec 22, 2014 8:37 pm
Reply with quote

Thanks Mickeydusaor!

That's more likely to be the cause. Is there any work around available for this problem?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Dec 22, 2014 8:59 pm
Reply with quote

talk to your Tech Support and have them change your TSO logon proc to the user exit that will execute your Rexx at sign on it they have one setup.
Back to top
View user's profile Send private message
James Halley

New User


Joined: 11 Apr 2012
Posts: 18
Location: USA

PostPosted: Mon Dec 22, 2014 9:34 pm
Reply with quote

The article at the following web address explains a popular method of accomplishing what you want:
Code:
http://www.tsotimes.com/articles/archive/winter03/enablingtsologon.html


We have implemented a similar methodology in our logon procs but we use a different naming convention for the user logon exec.

Beginning with z/OS 2.1 ISPF, the user may store commands in variable ZSTART for automatic execution immediately after ISPF starts. Commands can be also be stored in variables with names of the user's choosing but if that is done then the variable name must be specified, e.g. ISPF variable-name
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Mon Dec 22, 2014 9:57 pm
Reply with quote

As Pedro noted, many installations execute a startup script when you logon. This has nothing to do with the command you specify in the logon panel. The command in your logon panel executes after the installation logon script. The installation logon script is specified in the logon proc.
Code:
//OURLOGON EXEC PGM=IKJEFT01,REGION=64M,DYNAMNBR=100,
//         PARM='EX ''xxx'''
'xxx' is the specification for the installation logon script. Some logon scripts provide for a user logon script. One place where I used to work tested for userid.CLIST(userid) in their logon script and would run it if it was present. The installation logon script where I run now tests if there is a logon script in the logon panel and runs it. For some reason I have never quite understood many installation logon scripts start ISPF.

Before you do anything you should discuss this with your support and find out if there is some alternate. Your installation's logon script may already do what you want!
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue Dec 23, 2014 12:17 am
Reply with quote

Thanks All for your responses. As you all have mentioned, the best thing would be to talk to Tech support. Let's see what they say.

Thanks again for your time.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Dec 23, 2014 3:00 am
Reply with quote

I think the situation is that you have two methods to customize your logon: 1) executed by logon proc and
2) specified in logon panel.

The system tries to run both, serially. The only problem is that the first method involves a long process (ISPF) and so the second method does not run on a timely basis.

You have two choices to resolve:
1) move your customization to the logon proc executed exec. or,
2) move the ISPF start from the logon proc executed exec to your logon panel specified exec. This will cause the second exec to execute before you start ISPF.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Routing command Address SDSF to other... TSO/ISPF 2
Search our Forums:

Back to Top