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
 
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 Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

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