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

Problem with timestamp in SPUFI


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyesh Tewari

New User


Joined: 24 Jun 2008
Posts: 7
Location: Pune

PostPosted: Mon Mar 16, 2009 12:26 pm
Reply with quote

Hi,
While I am using a query in SPUFI
SELECT TBNAME, NAME, COLTYPE, NULLS, COLNO, LENGTH FROM SYSIBM.SYSCOLUMNS WHERE TBNAME LIKE 'ABC'.
For the columns Date and time stamp the length that this query is returning is 4 and 10 bytes respectively but actaully the length is 10 bytes for Date field and 26 bytes for timestamp. Can soemboddy help in retrieveing the length of the columns as they appear in the table using the SYSIBM.SYSCOLUMNS table.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Mon Mar 16, 2009 12:33 pm
Reply with quote

Check the Internal representation of date/time/timestamp in DB2 table
Back to top
View user's profile Send private message
Priyesh Tewari

New User


Joined: 24 Jun 2008
Posts: 7
Location: Pune

PostPosted: Mon Mar 16, 2009 1:51 pm
Reply with quote

PeD wrote:
Check the Internal representation of date/time/timestamp in DB2 table

Hi,
I wanted the result in the spufi by using some query that it gives me the exact result.

TIA
Back to top
View user's profile Send private message
Succor

New User


Joined: 20 Feb 2009
Posts: 96
Location: Bangalore :)

PostPosted: Mon Mar 16, 2009 1:53 pm
Reply with quote

Priyesh Tewari,What you are getting is correct.

A DATE column will use 4 bytes ,a TIME column will use 3 bytes of storage and a TIMESTAMP column always requires 10 bytes of storage.

Though the external representation of a timestamp uses 26 bytes, the time data uses 8 bytes and the date uses 10 bytes.

WTF.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
Search our Forums:

Back to Top