IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Store the data for fixed length COBOL Programming 1
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
Search our Forums:

Back to Top