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 

assign value to variable in SET command

 
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
gildan2020
Beginner


Joined: 07 Dec 2006
Posts: 17
Topics: 8

PostPosted: Tue Jan 22, 2008 7:01 pm    Post subject: assign value to variable in SET command Reply with quote

Hi there,

I have a scenario here that is a bit complicated.

How can I retrieve the contents of a file and assign it as a variable value?

Say I have file AAA containing value "01", I would like to assign it to a SET command as...
Code:
//   SET   VAR=01

Pls take note that the file AAA's content changes all the time, it could be any number. Any ideas?
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Wed Jan 23, 2008 12:36 am    Post subject: Reply with quote

gildan2020,

check the below links.

http://www.mvsforums.com/helpboards/viewtopic.php?t=9135&highlight=set

http://www.mvsforums.com/helpboards/viewtopic.php?t=4770&highlight=pass+value+jcl
Back to top
View user's profile Send private message Send e-mail
gildan2020
Beginner


Joined: 07 Dec 2006
Posts: 17
Topics: 8

PostPosted: Wed Jan 23, 2008 2:18 am    Post subject: Reply with quote

vkphani wrote:
gildan2020,

check the below links.

http://www.mvsforums.com/helpboards/viewtopic.php?t=9135&highlight=set

http://www.mvsforums.com/helpboards/viewtopic.php?t=4770&highlight=pass+value+jcl


Thanks for your reply, but the file is not a PDS. It's a sequential dataset.
I can't use PROCLIB JCLLIB ORDER for this.

Any ideas?
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Wed Jan 23, 2008 7:32 am    Post subject: Reply with quote

The symbolic substitution in JCL is completed before the job starts.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Wed Jan 23, 2008 7:33 am    Post subject: Reply with quote

read your file and retrieve the data
read the jcl and assign the data into the correct place in your jcl
write the jcl out to the internal reader

This has been discussed many times
A search on internal reader should give you an idea
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
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