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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


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