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
 

 

Load a database with existing data through a flat file

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

New User


Joined: 29 Sep 2005
Posts: 23
Location: Pune

PostPosted: Thu May 11, 2006 5:20 pm    Post subject: Load a database with existing data through a flat file
Reply with quote

Hi Freinds,

I need to load data from a flat file into a DB2 table which already contains some data in it.My requirement is to load the new data from the file while at same time retaining the existing data.
And also this has to be done thru a JCL.Can anyone of you suggest the parameter that are to be coded to perform the above step with all its requirements.
Waiting for reply and thanx in advance.

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

twissi

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu May 11, 2006 6:43 pm    Post subject:
Reply with quote

Hi Mubashir,

Here's a JCL you're looking for, please copy this to your job library and do the following changes:

a) add a suitable job card
b) C ALL 'YourRACF' RACFID ---> give your id or an HLQ that you've CREATE/DELETE access
c) give the input file in DSNUPROC.SYSREC00
d) give the DB2 subsystem of your table inplace of DSND (highlighted in RED), don't worry about UID/UTPROC
e) in DSNUPROC.SYSIN, you specify your table structure. You'll get the table structure if you run the DSNTIAUL utility for SELECT * FROM CREATOR.TABLE_NAME in SYSPUNCH. Add RESUME YES as highlighted in BLUE below if you want to apend the table.


Please get back to me if you have any questions.

Cheers, Twissi.




//UTIL EXEC DSNUPROC,SYSTEM=DSNC,UID='UKMG',UTPROC=''
//*
//**********************************************
//*
//* GENERATING JCL FOR THE LOAD UTILITY
//*
//**********************************************
//*
//DSNUPROC.SORTWK01 DD DSN=YourRACF.SORTWK01,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SORTWK02 DD DSN=YourRACF.SORTWK02,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SORTWK03 DD DSN=YourRACF.SORTWK03,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SORTWK04 DD DSN=YourRACF.SORTWK04,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SYSREC00 DD DSN=your Input file here,
// DISP=OLD
//DSNUPROC.SYSUT1 DD DSN=YourRACF.SYSUT1,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SORTOUT DD DSN=YourRACF.SORTOUT,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SYSERR DD DSN=YourRACF.SYSERR,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SYSMAP DD DSN=YourRACF.SYSMAP,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSALLDA
//DSNUPROC.SYSIN DD *
LOAD DATA LOG YES RESUME YES INDDN SYSREC00 INTO TABLE
CREATOR.TABLE_NAME
(
N_CLAIM_NUMBER POSITION( 1 )
CHAR( 12) ,
C_CLAIM_SEQ_EVENT POSITION( 13 )
CHAR( 5) ,
)
/*
Back to top
View user's profile Send private message
mubashir.surury

New User


Joined: 29 Sep 2005
Posts: 23
Location: Pune

PostPosted: Thu May 11, 2006 7:35 pm    Post subject: Re: Load a database with existing data through a flat file
Reply with quote

Hi Twissi,
Thanx for your prompt reply.i will try that out.Bye

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

Active User


Joined: 01 Aug 2005
Posts: 105
Location: Somerset, NJ

PostPosted: Thu May 11, 2006 7:48 pm    Post subject:
Reply with quote

No problem, please let me know how it goes by..

Thanks, Twissi.
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 copying data without knowing location arunsoods DFSORT/ICETOOL 2 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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