Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
jcl for changing datalibs`

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: jcl for changing datalibs`
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

Site Director


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

PostPosted: Mon Aug 23, 2010 5:28 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Aug 25, 2010 6:01 am    Post subject:
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: 6970
Location: porcelain throne

PostPosted: Wed Aug 25, 2010 3:02 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am
No new posts Problems in File-Aid / DB2 Spufi whil... amitc23 CLIST & REXX 6 Fri Feb 12, 2016 1:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us