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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm
No new posts Problem with GETMAIN command amitc23 CICS 6 Thu Sep 01, 2016 1:01 pm


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