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
 

 

Problem with timestamp in SPUFI

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Problem with timestamp in SPUFI
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: 456
Location: Belgium

PostPosted: Mon Mar 16, 2009 12:33 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Problem with timestamp in SPUFI
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    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 Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am


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