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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm


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