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

JCL which will insert a records to a db2 table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanatl

New User


Joined: 21 Oct 2005
Posts: 22

PostPosted: Fri Jun 20, 2008 6:29 pm
Reply with quote

Hi can any one give me a JCL which will insert a records to a db2 table.
Also plse explain the parameters need to mention in the jcl .
I want to insert to table from a flat file...
Also is it posssible to update and delete the records from the db2 table using JCL ....


Thanks
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 6:40 pm
Reply with quote

The LOAD utility is used to batch load data into DB2 tables.

Please check with your support which Load utility you have, ie, BMC Load or IBM Load utility or others.

They will give JCLs and documentation for reference.

Quote:
Also is it posssible to update and delete the records from the db2 table using JCL ....

JCL has nothing to to for this. You have to write an application program for the same or use DB2 batch program like IKJEFT**.
Back to top
View user's profile Send private message
debajyoti2040
Currently Banned

New User


Joined: 25 May 2007
Posts: 4
Location: Bangalore

PostPosted: Mon Jun 23, 2008 12:14 pm
Reply with quote

Hi,

You can use The Load Utility programs to do the same.
Refer DB2 for z/os utility guide and reference.



Thanks and Regards,
Debajyoti
Back to top
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Mon Jun 23, 2008 1:21 pm
Reply with quote

Hi Rohan,
It is possible to update and delete the records from the DB2 table.
Try the JCL below. I think it will work.

***************************************************
//JS010 EXEC PGM=IKJEFT01
//*
//SYSPUNCH DD .....................
//SYSTSPRT DD ......................
//SYSPRINT DD ......................
//SYSTSIN DD *
DSN SYSTEM(****)
RUN PROGRAM(*******) PLAN(*******) -
LIB('****.*****.******.*****')
END
//SYSIN DD *
(Give SQL queries seeparated by ';')
****************************************************
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top