How to insert rows into DB2 table thru JCL



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to insert rows into DB2 table thru JCL

Postby shyamsaravan » Mon Dec 13, 2010 5:37 pm

Hi;

I have a DB2 table and need to insert the row values periodically,I just dont want to again go for cobol program. Is it possible to do in JCL
Table NAME : INV_DS_record
PGM_NAME  CHAR(8) 
CA_CODE     CHAR(5) 
MAIL_ID       CHAR(100)
MAIL_IND      CHAR(1) 
UPD_DATE     DATE     
UPD_ID          CHAR(8) 
LANID           CHAR(8) 


For eg:-
INSERT INTO INV_DS_record
           (PGM_NAME                   
           ,CA_CODE                   
           ,MAIL_ID             
           ,MAIL_IND                 
           ,UPD_DATE                   
           ,UPD_UID                     
           ,LANID)                     
    VALUES ('sample'                     
           ,'dummy'                       
           ,'test@xxxx.com'
           ,'A'                           
           ,CURRENT TIME-STAMP             
           ,'frame'                     
           ,'wwwwwwww')       
     


Sometimes may need to insert more than one row with different column values

Please let me know any ideas to do the above process thru JCL.
Thanks;
shyamsarvan
shyamsaravan
 
Posts: 40
Joined: Tue May 11, 2010 7:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to insert rows into DB2 table thru JCL

Postby prino » Mon Dec 13, 2010 5:42 pm

shyamsaravan wrote:I have a DB2 table and need to insert the row values periodically,I just dont want to again go for cobol program. Is it possible to do in JCL


NO!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: How to insert rows into DB2 table thru JCL

Postby Robert Sample » Mon Dec 13, 2010 6:31 pm

You do not understand JCL -- which is nothing more than a way to execute programs. JCL does nothing but execute programs. These programs may be COBOL, assembler, PL/I, C, C++, Java, or a system utility (among others) but JCL executes programs. Asking to do something "through JCL" is never a question that can be answered positively -- because JCL cannot do anything without executing a program.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to insert rows into DB2 table thru JCL

Postby dick scherrer » Tue Dec 14, 2010 1:29 am

Hello,

You should not "just insert some rows". . .

There needs to be proper editing and audit trail - at the very least.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to insert rows into DB2 table thru JCL

Postby fornanthakumar » Tue Dec 14, 2010 5:59 am

Hi Shyam,

Did you mean executing a DB2 utility to insert a record into a table?

Insert records into DB2 table through JCL :?: :?: :?: :?: :?:
Regards,
Nanthu.Y.
fornanthakumar
 
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to insert rows into DB2 table thru JCL

Postby dick scherrer » Tue Dec 14, 2010 10:13 am

Hello,

You need to spend some time learning/practicing the proper terminology as well as understand the very basic rule that JCL will not nsert anything. . .

JCL will execute some program(s) and that is all that JCL will do. . .

DB2 has rows, not records.

The inability to use the proper terms and concepts will cause people who do know these things to discard your suggestions. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post