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 values for Timestamp

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 31
Location: visakhapatnam

PostPosted: Thu Aug 07, 2008 1:59 pm    Post subject: Default values for Timestamp
Reply with quote

I have a added a new column name with the type Timestamp(neither create nor updated - it is just a time its opertated based on when the decision took) in my table.

If I get the value i will insert it.

The question started what if I won't get a value of the timestamp
Here I guess I need to move the default value.

Since it is the the timestamp what I need to move?
Can I move Zeroes or Spaces?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Aug 07, 2008 2:10 pm    Post subject:
Reply with quote

'0001-01-01-12.00.00.000001'
Back to top
View user's profile Send private message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 31
Location: visakhapatnam

PostPosted: Thu Aug 07, 2008 2:36 pm    Post subject:
Reply with quote

Thanks for quick response.
But can't we give 0001-01-01-00.00.00.000000?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Aug 07, 2008 2:53 pm    Post subject:
Reply with quote

rsm_deepak wrote:
Thanks for quick response.
But can't we give 0001-01-01-00.00.00.000000?


yes...........
Back to top
View user's profile Send private message
Suresh Ponnusamy

Active User


Joined: 22 Feb 2008
Posts: 107
Location: New York

PostPosted: Thu Aug 07, 2008 7:19 pm    Post subject:
Reply with quote

Hi rsm,

I think you can give 0001-01-01-00.00.00.000000. Please check. I used this in my program.
Back to top
View user's profile Send private message
mkarthikeyan

New User


Joined: 07 Aug 2008
Posts: 34
Location: Bangalore

PostPosted: Fri Aug 08, 2008 8:31 pm    Post subject: Reply to: Timestamp Question
Reply with quote

Declare the timestamp column as Nullable. If the timestamp value is missing in the input then move -1 to the null indicator variable else move zero to the null indicator and input timestamp to the host variable. Insert the row into the table. the suggestion is given based that you are going to design the column & column type.

Thanks
Karthikeyan

[S/360] was the biggest, riskiest decision I ever made, and I agonized about it for weeks,but deep down I believed there was nothing IBM couldn't do.
- Tom Watson, Jr. IBM Chairman and CEO 1961-1971
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Default FTP options vasanthz All Other Mainframe Topics 2 Fri Aug 25, 2017 5:58 am
No new posts Default Message in Rexx cvnlynn CLIST & REXX 9 Wed Aug 02, 2017 12:38 am

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