MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Passing Value from a file to JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
karthikbabudh
Beginner


Joined: 29 Apr 2005
Posts: 10
Topics: 6

PostPosted: Tue Sep 30, 2008 2:27 am    Post subject: Passing Value from a file to JCL Reply with quote

Hi,

Let me know whether there is anyway to read a file from JCL and pass the file content to JCL which will be used as a parameter in the JCL.

For ex:
In the below statement instead of hard coding the *, I need to read a file and then put that value here.

//SYSPRINT DD SYSOUT=*
_________________
Regards,
Karthik Babu.
Back to top
View user's profile Send private message
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Mon Oct 26, 2009 4:53 pm    Post subject: Reply with quote

No, you cannot do this directly.

What you can do is generate "new" jcl with the dynamic info resolved and submit this generated jcl thru the Internal Reader. Talk to someone on your system to learn how this is done on your system.
_________________
All the best,

di
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue Oct 27, 2009 1:53 pm    Post subject: Reply with quote

If your file can be in the form of a JCL INCLUDE statement, you can use it to set the "class" when your job is submitted.

Your file:
Code:
//   SET MYCLASS='*'


Your JCL:
Code:
//MYPROCS  JCLLIB ORDER=(your.PDSfile.name)           
//*                                                 
//*                                                 
//* INCLUDE STATEMENT EXAMPLE - FETCHED FROM JCLLIB
//*                                                 
//STEP01  EXEC PGM=IEFBR14                           
//        INCLUDE MEMBER=yourmembername                   
//SYSPRINT DD SYSOUT=&MYCLASS

_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group