UDB Timestamp question

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

UDB Timestamp question

Post by JPalatianos »

Hi,
I am trying to load a Timestamp into a UDB table using the following and I get the warning message below.
(OCONV(DATE(), "D4-YMD[4,2,2]") : " " : OCONV(TIME(), "MTS:"))

WARNING MESSAGE:
TPA_CONTACT_PROCESSING..Dynamic_RDBMS_6: [DataDirect][ODBC DB2 Wire Protocol driver]Timestamp parameters with a scale, must have a scale less than ten and a precision equal to 20 plus the scale. You specified a precision of 26 and scale of 3. Error in parameter 26.

The Timestamp looks like this in UDB:
2005-10-13 13:27:36.934938


Thanks - - John
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Increase the scale to 6.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Sorry, forgot to mention that I do have the scale coded as a 6.......It almost seems that it is ignoring it and setting it to 3. Output looks like:
2005-10-13 13:27:36.935000
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Where are you deriving the microseconds. DataStage's Time() function only delivers milliseconds - you need the System() function to deliver microseconds (and, even then, the operating system must support microseconds, and you may need a routine so that you can set $OPTIONS appropriately).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thanks Ray, that explains it.......I was using the DataStage Time() function.
Post Reply