View previous topic :: View next topic
|
Author |
Message |
heraltin
New User
Joined: 06 Aug 2009 Posts: 6 Location: India
|
|
|
|
How to pass userid in the jobcard through rexx |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And where would we like to pass it to.
What are you trying to achieve, Why are you required to do this.
These questions will help us help you from experience. |
|
Back to top |
|
|
heraltin
New User
Joined: 06 Aug 2009 Posts: 6 Location: India
|
|
|
|
To pass the user id from rexx to the jcl. The jobcard should have userid |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
OK,
so what is your REXX doing,
how is the JCL constructed - ISPF skeletons or build on the fly |
|
Back to top |
|
|
heraltin
New User
Joined: 06 Aug 2009 Posts: 6 Location: India
|
|
|
|
"SUBMIT ('"TEST.DIATOOL.REXX"("TOOLFST")'"
the TEST.DIATOOL.REXX(TOOLFST) should be passed the userid. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
If your JOB card has NOTIFY=&SYSUID the value will be substituted automatically. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
So you have a library with what I guess are tools in it.
You submit the job via a submit command, but want to put the submitters user id in the jobcard.
a) As part of the jobname
b) For the notify parameter
OK, next tooth pull ............. How is the JCL written, is it in ISPF skeleton format, or are we looking for a parsing program to make these substitutions - but may depend on the answer to the previous question. |
|
Back to top |
|
|
heraltin
New User
Joined: 06 Aug 2009 Posts: 6 Location: India
|
|
|
|
The jobcard also should have the userid. I can't get as what you told abt ISPF skeletons.The notify parameter has &sysuid.How to pass the userid |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
So you only have NOTIFY=&SYSUID, and you do not want to substitute the userr id as part of the jobname ?
If so, please read the post by Bill above. |
|
Back to top |
|
|
heraltin
New User
Joined: 06 Aug 2009 Posts: 6 Location: India
|
|
|
|
The notify parameter has &SYSUID. I wanted to know how to pass the jobcard also with the same user id.
//USERID JOB (0000,0006),'TOOL',
// CLASS=D,
// MSGCLASS=X,
// NOTIFY=&SYSUID
I want USERID to be the user id of whom submitted the job.. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Unless you use ISPF file tailoring services to substitute variables, you will need to write your own parse routine to exchange USERID with the user id of the submitter. Write the amended JCL into a new dataset and then submit it.
Code: |
//USERID JOB (0000,0006),'TOOL', |
Your jobcard is not a good idea, as it will be the same as your TSO user id and when you submit any jobs thay will not run whilst you remain logged onto TSO, as only one of many jobs, started tasks, or TSO logons with the same name can process at any given time. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
Depending on your default JOB parameters, you could remove the JOB card and let SUBMIT generate one for you. Each submitter will be prompted for a 1 character value to be appended to their USERID to form the JOBNAME. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
The phrase "pass something to JCL" is used here frequently and has no meaning. You can not pass something to JCL. JCL is not a general purpose programming language and it does not accept parameters.
You can change the data that programs called by JCL read (notice that the JCL doesn't 'know' anything about that) or you can rewrite the JCL to have whatever changes you need. In your case you need to rewrite the jobcard and then add the rest of the job to your new job card and then submit the new JCL that you have created.
The ways to do that are mentioned above but they are to write the new JCL directly to a file using EXECIO or similar, to use ISPF skeletons to generate your JCL or to let the site submit exit generate the job card for you.
Also, simply adding a USER= parameter to a jobcard without a PASSWORD= will cause your job to fail if you don't have special authority to submit jobs on behalf of other users. |
|
Back to top |
|
|
heraltin
New User
Joined: 06 Aug 2009 Posts: 6 Location: India
|
|
|
|
Thanks for your valuable suggestions. I will try it. |
|
Back to top |
|
|
|