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

Passing the user id to the jcl


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
heraltin

New User


Joined: 06 Aug 2009
Posts: 6
Location: India

PostPosted: Thu Aug 06, 2009 6:23 pm
Reply with quote

How to pass userid in the jobcard through rexx
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 06, 2009 6:28 pm
Reply with quote

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
View user's profile Send private message
heraltin

New User


Joined: 06 Aug 2009
Posts: 6
Location: India

PostPosted: Thu Aug 06, 2009 6:33 pm
Reply with quote

To pass the user id from rexx to the jcl. The jobcard should have userid
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 06, 2009 6:35 pm
Reply with quote

OK,
so what is your REXX doing,
how is the JCL constructed - ISPF skeletons or build on the fly
Back to top
View user's profile Send private message
heraltin

New User


Joined: 06 Aug 2009
Posts: 6
Location: India

PostPosted: Thu Aug 06, 2009 6:39 pm
Reply with quote

"SUBMIT ('"TEST.DIATOOL.REXX"("TOOLFST")'"

the TEST.DIATOOL.REXX(TOOLFST) should be passed the userid.
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Aug 06, 2009 6:44 pm
Reply with quote

If your JOB card has NOTIFY=&SYSUID the value will be substituted automatically.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 06, 2009 6:45 pm
Reply with quote

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
View user's profile Send private message
heraltin

New User


Joined: 06 Aug 2009
Posts: 6
Location: India

PostPosted: Thu Aug 06, 2009 6:54 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 06, 2009 7:01 pm
Reply with quote

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
View user's profile Send private message
heraltin

New User


Joined: 06 Aug 2009
Posts: 6
Location: India

PostPosted: Thu Aug 06, 2009 7:13 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 06, 2009 7:17 pm
Reply with quote

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
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Aug 07, 2009 1:24 am
Reply with quote

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
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Fri Aug 07, 2009 1:58 am
Reply with quote

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
View user's profile Send private message
heraltin

New User


Joined: 06 Aug 2009
Posts: 6
Location: India

PostPosted: Fri Aug 07, 2009 10:36 am
Reply with quote

Thanks for your valuable suggestions. I will try it.
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 the system or user abend SF0F R=NULL COBOL Programming 0
No new posts RABBIT HOLE NEEDED - "Live"... All Other Mainframe Topics 0
No new posts Setting CA7 user variable from data s... CA Products 7
No new posts Passing parm from JCL to Assembler, b... PL/I & Assembler 2
No new posts user exits in Column Map procedures IBM Tools 0
Search our Forums:

Back to Top