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
 

 

Loading selected portion of production database to test data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Wed Jul 19, 2006 11:30 pm    Post subject: Loading selected portion of production database to test data
Reply with quote

Hi,

We want to refresh our test region databse so that we can get the
image copy of production database in test region.But in this case we are not having sufficient space so that we can load complete production databse. Please let me know if there is any way to load only a small version of prod databse to test region.

Thanks in advance.

Regards,
Amol
Back to top
View user's profile Send private message

umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Thu Jul 20, 2006 12:19 am    Post subject: Re: Loading selected portion of production database to test
Reply with quote

Here suppose production database is having 10000 records I want to upload only 1000 Records in Test region so please let me know how can we achive this.
Back to top
View user's profile Send private message
Muthukumar.PLindia

New User


Joined: 03 Jul 2006
Posts: 51
Location: Chennai

PostPosted: Thu Jul 20, 2006 1:30 am    Post subject:
Reply with quote

Try with this query

Insert into test.table1
select * from prod.table1 fetch first 1000 rows only
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Jul 20, 2006 1:31 am    Post subject: Re: Loading selected portion of production database to test
Reply with quote

Amol,

How many tables are you talking about?

Can you do a selective UNLOAD of your Production Table(s), then LOAD to the Test system?

Dave
Back to top
View user's profile Send private message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Thu Jul 20, 2006 4:59 am    Post subject: Re: Loading selected portion of production database to test
Reply with quote

Hi,
yes Dave ,you are absolutely right.I want to do selective unload from
Production table and then want to upload the same records to the Test database. For this time I want to do it for 3/4 tables as initial basis. But I don't want to unload all the records from the table.I want some of them so that I can fulfill the space requirement for those in Test region.

Regards,
Amol
Back to top
View user's profile Send private message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Thu Jul 20, 2006 5:02 am    Post subject: Re: Loading selected portion of production database to test
Reply with quote

Hi,
I think now everyone is cllear with my problem.I just want to do selective unload from production database but I don't know how to do that
Can anyone tell me that. Thanks in advance.

Regards,
Amol
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Thu Jul 20, 2006 10:05 am    Post subject: Hi
Reply with quote

Can't you use DSNTIUAL utility specifying PARM as SQL and give SQL to fetch only limited or sleected records..Searc this forum if you want the JCL for this.

-Han.
Back to top
View user's profile Send private message
trevor_rebelo

New User


Joined: 18 Aug 2005
Posts: 17

PostPosted: Fri Jul 21, 2006 6:29 pm    Post subject:
Reply with quote

Hi,

Try using the INCURSOR option in LOAD jobs...

In the Cursor give the Query which will select data from production table and load to test table...
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Sat Jul 22, 2006 12:33 am    Post subject: hello
Reply with quote

TRy using QMF.

u can give the data records that have to be selected using
select * from
.........

when the qury runs u can store it in u r temp database (generally would be a vsam file allocated by the dba)
as
STORE DATA AS SQL1(the query that yoy would run be would be stored in the temp database as userid.sql1.
then u run another query to insert the retreived data into test using the query as

INSERT INTO table name
(SELECT * FROM T0666VR.sql1)
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts loading a Modified Mapset Susanta CICS 2 Tue Mar 14, 2017 5:43 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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