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

Downloading a db2 table which contains 655k+ records


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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
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: 1208
Location: Bangalore,India

PostPosted: Mon Mar 26, 2007 10:19 am
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
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: 1208
Location: Bangalore,India

PostPosted: Mon Mar 26, 2007 10:45 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top