Page 1 of 1

How to insert rows into DB2 table thru JCL

PostPosted: Mon Dec 13, 2010 5:37 pm
by shyamsaravan
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

Re: How to insert rows into DB2 table thru JCL

PostPosted: Mon Dec 13, 2010 5:42 pm
by prino
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!

Re: How to insert rows into DB2 table thru JCL

PostPosted: Mon Dec 13, 2010 6:31 pm
by Robert Sample
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.

Re: How to insert rows into DB2 table thru JCL

PostPosted: Tue Dec 14, 2010 1:29 am
by dick scherrer
Hello,

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

There needs to be proper editing and audit trail - at the very least.

Re: How to insert rows into DB2 table thru JCL

PostPosted: Tue Dec 14, 2010 5:59 am
by fornanthakumar
Hi Shyam,

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

Insert records into DB2 table through JCL :?: :?: :?: :?: :?:

Re: How to insert rows into DB2 table thru JCL

PostPosted: Tue Dec 14, 2010 10:13 am
by dick scherrer
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. . .