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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


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