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

Load a database with existing data through a flat file


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top