Timestamps into a TRACE logfile - current time in stored procedures
Posted in 2007
Topics: Stored Procedures & SPL, Server Administration
Hello list, what can I do to get timestamps having fractions of seconds into a TRACE created using TRACE PROCEDURE. What I have is: TRACE <sometext>; select dbinfo('utc_to_datetime',sh_curtime) into _trace_ts from sysmaster:sysshmvals; TRACE _trace_ts; But also casting like select dbinfo('utc_to_datetime',sh_curtime)::DATETIME YEAR TO FRACTION into _trace_ts from sysmaster:sysshmvals; gives me only precision of full seconds. Fraction part is always 0. This remains the same if configuring USEOSTIME to 1 in $ONCONFIG. Is there a way apart form system() to get the current time with precision of better than full seconds inside a stored procedure? dic_k -- Richard Kofler SOLID STATE EDV Dienstleistungen GmbH Vienna/Austria/Europe
We do this with a UDR. If you want I can send you the presentation where I talked about this. -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Richard Kofler Sent: Thursday, August 16, 2007 2:04 PM To: informix-list@iiug.org Subject: Timestamps into a TRACE logfile - current time in stored procedures Hello list, what can I do to get timestamps having fractions of seconds into a TRACE created using TRACE PROCEDURE. What I have is: TRACE <sometext>; select dbinfo('utc_to_datetime',sh_curtime) into _trace_ts from sysmaster:sysshmvals; TRACE _trace_ts; But also casting like select dbinfo('utc_to_datetime',sh_curtime)::DATETIME YEAR TO FRACTION into _trace_ts from sysmaster:sysshmvals; gives me only precision of full seconds. Fraction part is always 0. This remains the same if configuring USEOSTIME to 1 in $ONCONFIG. Is there a way apart form system() to get the current time with precision of better than full seconds inside a stored procedure? dic_k -- Richard Kofler SOLID STATE EDV Dienstleistungen GmbH Vienna/Austria/Europe _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list