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
 
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 Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 6 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am

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