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

jcl for changing datalibs`


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jagjit

New User


Joined: 28 Dec 2006
Posts: 18
Location: india

PostPosted: Mon Aug 23, 2010 4:13 am
Reply with quote

Hi,

As part of testing we got bunch of mainframe jobs consists of teradata SQLs for fastload, multiload etc to temporary as well as permanent tables. So as normal cycle we need to move rundecks(containing JCL), proclibs and datalibs(SQLs) to our environment. For execution, we are require to change some parameters and databases that fits to our environment. This eventually time taking and reoccurring task for my team. And we are not that familiar with mainframe but still I strongly feel that we can write an JCL which actual automate the process of updating proclib and datalib code lines where ever needed. Could you please suggest if this can be possible by developing a JCL. It will really cut down lots of work around.

Thanks,
Jagjit
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 23, 2010 5:28 am
Reply with quote

Hello,

No, what you want to do cannot be done via jcl if i understand what you want to do. If i understand, you want to change the content of various members using some kind of jcl.

JCL will only execute programs. These might be application code, utilities (like the sort and others), or rexx to name a few.

What is the content of the member(s) that you want to change (post examples). Show what you have and what you want to change it to.

The good news is that there are multiple examples of doing things like this in the forum.
Back to top
View user's profile Send private message
jagjit

New User


Joined: 28 Dec 2006
Posts: 18
Location: india

PostPosted: Wed Aug 25, 2010 3:46 am
Reply with quote

@Dick Scherrer,

Thanks for correcting me about JCL part I thought we can override from it.
For my team it is recursive work to keep changing the content of codes. For eg:
rundecks(consist of JCL), Proclib(nothing but part of JCL or as far I understand a function called by JCL) and Datalib(where teradata queries are written)

Now, when we move all these members to our environment we need to do some setting changes like database name change, library name change, parameter which we are passing etc.

To explain it more I would like to give an instance from datalib;
query is written as:

===============

database abc_zzzzz_syt;

sel
a,
b,
c
from xxx_aaa_syt.table1 t1,
inner join ttt_aaa_syt.table2 t2
on t1.p = t2.m

===============
In above datalib after moving to our environment we are suppose to change database name with other database name without opening the datalib in edit mode and making the changes manually.
This change I think we can do by writing some code. Could you please suggest me possible ways?

Thanks,
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 25, 2010 6:01 am
Reply with quote

Hello,

Quote:
This change I think we can do by writing some code. Could you please suggest me possible ways?
Yes, there are multiple topics that describe doing just this.

The 2 most common ways to do this are (1) using rexx to read all of the members and an "edit macro" to make the changes or (2) unload the members of the dataset, edit the file of unloaded members and then load them back into the partitioned dataset.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 25, 2010 3:02 pm
Reply with quote

to bad the datalib was created without any thought.

the database declaration
and the sql following
could have been two files/members.

then the jcl would have just used concatenation to create a database and query combination. then you would never have to modify the datalib.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts Tilde Characters Changing to COLONs i... CLIST & REXX 22
No new posts Changing Data Type SYNCSORT 4
No new posts Sort card to find duplicates, without... DFSORT/ICETOOL 15
No new posts Changing sort Card Dynamically DFSORT/ICETOOL 5
Search our Forums:

Back to Top