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
 

 

Execution of Macro at Command Line on a Mainframe Logon

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

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Mon Dec 22, 2014 7:47 pm    Post subject: Execution of Macro at Command Line on a Mainframe Logon
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

Senior Member


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

PostPosted: Mon Dec 22, 2014 7:58 pm    Post subject: Reply to: Execution of Macro at Command Line on a Mainframe
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: 331
Location: USA

PostPosted: Mon Dec 22, 2014 8:07 pm    Post subject: Reply to: Execution of Macro at Command Line on a Mainframe
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    Post subject:
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: 331
Location: USA

PostPosted: Mon Dec 22, 2014 8:37 pm    Post subject: Reply to: Execution of Macro at Command Line on a Mainframe
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    Post subject:
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: 17
Location: USA

PostPosted: Mon Dec 22, 2014 9:34 pm    Post subject:
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 User


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

PostPosted: Mon Dec 22, 2014 9:57 pm    Post subject:
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: 331
Location: USA

PostPosted: Tue Dec 23, 2014 12:17 am    Post subject: Reply to: Execution of Macro at Command Line on a Mainframe
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

Senior Member


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

PostPosted: Tue Dec 23, 2014 3:00 am    Post subject: Reply to: Execution of Macro at Command Line on a Mainframe
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    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. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm


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