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
 

 

How do I store date, time from the COBOL program into DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sakthmainframe
Currently Banned

New User


Joined: 22 Mar 2007
Posts: 2
Location: Chennai

PostPosted: Thu Mar 22, 2007 3:41 pm    Post subject: How do I store date, time from the COBOL program into DB2
Reply with quote

How do I store date, time from the COBOL program into DB2.
Back to top
View user's profile Send private message

mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Thu Mar 22, 2007 4:22 pm    Post subject: Re: DATE, TIME ino DB2
Reply with quote

COBOL does not have date/time data types so we declare them in AlphaNumeric Datatype like X(n). But In SQL we have date/time Datatypes.

By using the Insert or Update statement we can store DATE / TIME value from a COBOL program.

EXEC SQL
insert into emp(:ws-eno,:ws-ename,:ws-doj,:ws-sal)
END-EXEC.

Like this we can store DATE / TIME values from COBOL program to DB2.

If any please correct me.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm


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