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

Default value to a DATE field in DB2 database?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ibmforum

New User


Joined: 20 Jun 2006
Posts: 2

PostPosted: Tue Jun 27, 2006 12:10 pm
Reply with quote

All:

In my DB2 database a field is declared as DATE field.
my requirement is to move default values to this field.

so can i move SPACES to a DATE field? and will it not result in SOC7 when i try to move this spaces in DATE field to working storage variable.

Please advise if i need to move zeroes or some other predefined value as default to this DATE field.

Thanks.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Jun 27, 2006 3:00 pm
Reply with quote

In our shop we used to take default value as 01-01-1900
Back to top
View user's profile Send private message
subbareddy46

New User


Joined: 30 May 2006
Posts: 4

PostPosted: Tue Jun 27, 2006 3:15 pm
Reply with quote

yes,
we can move spaces as default to date field in db2.
b'coz the pic clause of date equivalent in cobol is pic x(10).
Back to top
View user's profile Send private message
ibmforum

New User


Joined: 20 Jun 2006
Posts: 2

PostPosted: Fri Jun 30, 2006 6:23 pm
Reply with quote

But guys when i want to update spaces to the DB2 table, will it work?

i am facing problem now with sqlcode of -180, proabably spaces are not allowed to be directly stored in DB2 table.

so i believe we need to update 0001-01-01 as default to the DB2 tale.

Thanks.
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts What database does Jobtrac use CA Products 4
Search our Forums:

Back to Top