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
 

 

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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 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 outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am


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