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
 

 

Downloading a db2 table which contains 655k+ records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
hallecodec

New User


Joined: 05 Sep 2006
Posts: 30
Location: Philippines

PostPosted: Tue Mar 06, 2007 1:32 pm    Post subject: Downloading a db2 table which contains 655k+ records
Reply with quote

hi guys,

what utility would you suggest that is fast enough for downloading a db2 table which contains 655k+ records? thanks in advance for your replies.
Back to top
View user's profile Send private message

prav_06
Warnings : 1

Active User


Joined: 13 Dec 2005
Posts: 154
Location: The Netherlands

PostPosted: Tue Mar 06, 2007 2:40 pm    Post subject:
Reply with quote

hi ,
Try the below jcl

Code:
//STEP01 EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=0M
//SYSPUNCH DD DSN=SYSPUNCH.dataset,DISP=SHR   
//SYSREC00 DD DSN=UNLOAD.dataset,DISP=SHR     
//SYSPRINT DD SYSOUT=*                           
//SYSUDUMP DD SYSOUT=*                           
//SYSTSPRT DD SYSOUT=*                           
//SYSTSIN DD  *                                 
   DSN SYSTEM(DB2D)                             
   RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) -       
   LIB('DB2D.RUNLIB.LOAD')                       
/*                                               
//SYSIN DD *                                     
 TABLE NAME                               
/*

If u having more records in the table allocate sufficiant space for the data set in SYSREC00 DD name

And the parameters given inside the SYSTSIN would be varying according to installations.

Thamilzan.
Back to top
View user's profile Send private message
ballalsachin

New User


Joined: 22 Sep 2005
Posts: 15
Location: USA

PostPosted: Thu Mar 22, 2007 2:15 am    Post subject: Re: Downloading a db2 table which contains 655k+ records
Reply with quote

hi,
you can go to D;D;6;3.7 Option in ISPF.
This is Fileaid Db2 option: 'Extract and Load Tables '
There is an option to use batch or online mode.
use the batch mode to download the table in a dataset.
remember to allocate enough space for the dataset that you are downloading your table into..

Sachin Ballal
Back to top
View user's profile Send private message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Mon Mar 26, 2007 10:02 am    Post subject:
Reply with quote

But, if we want to do a selective download from the table,what to do?
can we write the query inside the sysin dd *?
please suggest a solution..............
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Mar 26, 2007 10:19 am    Post subject:
Reply with quote

Hi Lekshmi,

Yes we can write a query in SYSIN
Back to top
View user's profile Send private message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Mon Mar 26, 2007 10:41 am    Post subject:
Reply with quote

When i entered the query to select the needed fields in the SYSIN statement the following error occured

SQL ERROR DURING SQL STATEMENT PREPARE , TABLE SELECT AGENT_JOB_C FROM PPSD4.AGENT;
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD FROM, TOKEN FOR WITH FETCH ORDER UNION EXCEPT QUERYNO OPTIMIZE
WAS EXPECTED
Please let me know how to solve this.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Mon Mar 26, 2007 10:45 am    Post subject:
Reply with quote

Hi There,

Is PPSD4 is ur TSO id?
Back to top
View user's profile Send private message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Mon Mar 26, 2007 10:54 am    Post subject:
Reply with quote

ppsd4.agent is fine....that s our table location. I could unload the data when i gave a full unload without any DB2 query. but this failed when i gave a selective unload.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


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