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
 

 

Passing the user id to the jcl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Passing the user id to the jcl
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 6:28 pm    Post subject:
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    Post subject: Reply to: Passing the user id to the jcl
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 6:35 pm    Post subject:
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    Post subject: Reply to: Passing the user id to the jcl
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 6:45 pm    Post subject:
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    Post subject: Reply to: Passing the user id to the jcl
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 7:01 pm    Post subject:
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    Post subject: Reply to: Passing the user id to the jcl
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 06, 2009 7:17 pm    Post subject:
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    Post subject:
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: 401
Location: Mumbai

PostPosted: Fri Aug 07, 2009 1:58 am    Post subject:
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    Post subject: Reply to: Passing the user id to the jcl
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts SORT - E15 and E35 using same user ex... Abhi Nature DFSORT/ICETOOL 12 Mon Oct 03, 2016 4:33 pm
No new posts User exit in COBOL programs ganasrinivasan PL/I & Assembler 0 Thu Aug 18, 2016 12:48 pm
No new posts Data set is allocated to another job ... Seppe CLIST & REXX 2 Wed Aug 03, 2016 4:31 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm


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