Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Default value to a DATE field in DB2 database?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Default value to a DATE field in DB2 database?
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: 1187
Location: Bangalore,India

PostPosted: Tue Jun 27, 2006 3:00 pm    Post subject:
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    Post subject:
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    Post subject: Facing problem
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    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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us