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
 

 

Reg: Uploading data to DB2 using JCL

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

New User


Joined: 03 Aug 2006
Posts: 42
Location: Chennai

PostPosted: Wed Mar 14, 2007 5:06 pm    Post subject: Reg: Uploading data to DB2 using JCL
Reply with quote

Hi,

Can someone please provide me a JCL which will update the DB2 tables by reading the flat files(I.e. PS)...

Thanks,
Mk icon_smile.gif
Back to top
View user's profile Send private message

venktv

New User


Joined: 29 Mar 2006
Posts: 59
Location: Montreal

PostPosted: Wed Mar 14, 2007 5:50 pm    Post subject: Re: Reg: Uploading data to DB2 using JCL
Reply with quote

Hi MK..
May be you are expecting too much from JCL icon_sad.gif ..
I dont think anybody is having solution for this..

WIth Regs
Venkat
Back to top
View user's profile Send private message
muthukannan

New User


Joined: 03 Aug 2006
Posts: 42
Location: Chennai

PostPosted: Wed Mar 14, 2007 5:53 pm    Post subject:
Reply with quote

Hi Venktv,

Thanks for your reply.
But i heard we can unload and load using JCL.
So i need the load concept to load data from PS to DB2.

Thanks,
Mk icon_smile.gif
Back to top
View user's profile Send private message
Prajesh_v_p

Active User


Joined: 24 May 2006
Posts: 133
Location: India

PostPosted: Wed Mar 14, 2007 6:35 pm    Post subject:
Reply with quote

Hi,

One thing you can do is to load the data in the file to temp table(You can create the temp table in the file format itself ) using a QMF proc.

Create QMF header for the table and also add QMF delimiter between each file field of yours and then add the file to the QMF header nthrough a merge step. Then export that to QMF using EXPORT DATA. Then save the data into a temp table using save data as tem_table. Execute an update query with temp table to update the table u desire. Erase the temp table. If the rows loaded to temp table are going too high, this might consume more time as this temp table does not have index.

Alternatively you can also load the data to temp table. But it requires a temp table to be crated before you execute a load. This will become difficut if you have to schedule this job and also first method make use of a temp table only during the time of execution.

I know this is a bit complicated. Please let me know if you have any qns?

Thanks,
Prajesh
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 14, 2007 9:19 pm    Post subject:
Reply with quote

If you have records in the flat file, then you got to use the LOAD utility. It makes your life easy. Make sure the LOAD control card matches the File layout. If you are not aware of LOAD utility then its time to go thru manuals. Thats a huge concept and intersting too.
Back to top
View user's profile Send private message
muthukannan

New User


Joined: 03 Aug 2006
Posts: 42
Location: Chennai

PostPosted: Thu Mar 15, 2007 2:23 pm    Post subject: Re: Reg: Uploading data to DB2 using JCL
Reply with quote

Hi All,

Thank for your replies.
Am trying to learn from the manuals.

Thanks,
Mk icon_smile.gif
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Mon Mar 19, 2007 6:59 pm    Post subject:
Reply with quote

Use loadplus and unload plus --if these are there in ur shop

Please let me know if u stuck on the above
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Wed Mar 21, 2007 4:03 pm    Post subject:
Reply with quote

Hi you can use the below mentioned jcl for your requirement. but still you need to provide control cards which you are using while unloading the data from db2 or you have give the correct structuer of the components if you didn't unload data from db2. please let me know if you have any queries.

//LOAD01A EXEC PGM=DSNUTILB,
// REGION=0M,
// PARM=(DB2T,'LOADNVL')
//ABNLIGNR DD DUMMY
//DSSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=F
//UTPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
LOAD DATA INDDN SYSREC LOG NO MAPDDN SYSMAP
RESUME YES
ENFORCE NO
SORTDEVT SYSDA SORTNUM 12
WORKDDN (SYSUT1,SORTOUT)
INTO TABLE NVL.RETAIL_INVOICE

Thanks!
Rathna Reddy,
Sr. Software Engineer.
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 Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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