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 

unload data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Wed Jul 18, 2007 10:44 pm    Post subject: unload data Reply with quote

Is it possible to unload data all the tables from the database into different files.

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Thu Jul 19, 2007 7:16 am    Post subject: Reply with quote

kingo,

Yes you can take full image copies. check this link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNUGH13/2.7.2.4?SHELF=&DT=20020826194002&CASE=

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Jul 19, 2007 7:40 am    Post subject: Reply with quote

No my question is that I have some hundreds of tables in my database I need to solve unload all of them into seperately is a not possible.so is it possible by any means so that all the tables in this database being unloaded.I have 30 such database.I need to do for evrything.Hope you got my problem.And I want my data of each table to be seperate and in readable form.
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Thu Jul 19, 2007 8:08 am    Post subject: Reply with quote

kingo,

Each unload job can unload upto 125 tables at a time and each table is unloaded to a different Dataset. So depending on how many tables you have divide the total no: of tables by 125 to come up with no: of unload jobs.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Jul 19, 2007 8:38 am    Post subject: Reply with quote

Yeah I know that.Its quite tedious to create cntl cards for all the tables.For ex I have a database with 140 tables.Its not that easy to create the control cards for all tables from that database.Is there are any alternative method which will build my unload job.
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12377
Topics: 75
Location: San Jose

PostPosted: Thu Jul 19, 2007 8:54 am    Post subject: Reply with quote

Quote:

Its quite tedious to create cntl cards for all the tables.For ex I have a database with 140 tables.Its not that easy to create the control cards for all tables from that database

kingo,

create the control cards using this sql

Code:

SELECT CHAR('SELECT * FROM ')       
      ,CHAR(CREATOR)               
      ,CHAR(SUBSTR(NAME,1,8))       
      ,CHAR(';')       
      ,CHAR(' ')           
 FROM SYSIBM.SYSTABLES             
WHERE DBNAME = 'your dbname'               
  AND TYPE   = 'T'         
 FETCH FIRST 125 ROWS ONLY
;                                   


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Thu Jul 19, 2007 10:21 am    Post subject: Reply with quote

I used koluso's query and mixed it up a little(with things I learned from this board). The results are strung in one column.

Code:

SELECT CHAR('SELECT * FROM ')  || RTRIM(CREATOR)|| ' ' || RTRIM(NAME)|| ' ;'       
       FROM SYSIBM.SYSTABLES             
WHERE DBNAME = 'YOUR DBNAME'               
  AND TYPE   = 'T'         
 FETCH FIRST 125 ROWS ONLY

_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Thu Jul 19, 2007 9:35 pm    Post subject: Reply with quote

Hi kolusu,


Thanks for u grt help.I have done a small modification which is now ready to use.

here it is

Code:

SELECT CHAR('SELECT * FROM ')   
      ,CHAR(CREATOR)             
      ,CHAR('.')                 
      ,CHAR(SUBSTR(NAME,1,8))   
      ,CHAR(';')                 
      ,CHAR(' ')                 
 FROM SYSIBM.SYSTABLES           
WHERE DBNAME = 'DB name'       
  AND TYPE   = 'T'               
 FETCH FIRST 125 ROWS ONLY       
;                               



Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Thu Jul 19, 2007 11:23 pm    Post subject: Reply with quote

why not use UNLOAD and LIST, TEMPLATE utility
it's easy to unload all tables in one database
Back to top
View user's profile Send private message
kingo
Intermediate


Joined: 01 Sep 2006
Posts: 167
Topics: 40
Location: chennai

PostPosted: Fri Jul 20, 2007 12:21 am    Post subject: Reply with quote

How to do that can you help me please?

Regds,
Kingo
_________________
IF YOU ARE NOT FOCUSSED ON GOAL ALL YOU SEE IS OBSTACLE.
Back to top
View user's profile Send private message Yahoo Messenger
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Fri Jul 20, 2007 7:17 pm    Post subject: Reply with quote

check the Utility Guide & Reference

Sample:

LISTDEF LS1 INCLUDE DATABASE db1

TEMPLATE UNLDREC DSN xxxx
UNIT SYSDA DISP (NEW,CATLG,CATLG) SPACE (x,x) CYL
TEMPLATE PUNCH1 DSN xxx
UNIT SYSDA DISP (NEW,CATLG,CATLG) SPACE(1,1) TRK

UNLOAD LIST LS1
PUNCHDDN PUNCH1
UNLDDN UNLDREC
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 -> Database 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