Hi all,
I want to change timestamp from GMT(default) to LOCAL when viewing transaction log. IBM told me to use TM1ServerLogSetFlagString API function but didn't show me how to use it. Anyone who has used this function please help !
Thanks in advanced !
Tin Pham.
How to use TM1ServerLogSetFlagString API function ?
-
- Posts: 39
- Joined: Thu Apr 21, 2011 3:02 am
- OLAP Product: SAP BW,TM1
- Version: 9.5.2-10.1.0
- Excel Version: 2007-2010
- Location: HCM Viet Nam
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: How to use TM1ServerLogSetFlagString API function ?
Yet more cr@p documentation (or lack thereof) out of Armonk.phamtinkt88 wrote: I want to change timestamp from GMT(default) to LOCAL when viewing transaction log. IBM told me to use TM1ServerLogSetFlagString API function but didn't show me how to use it. Anyone who has used this function please help !
The only reference that I can find to that function is in the Operations guide. Under "Logging Transactions" it states:
The function does not appear in the API guide, nor is it declared in the standard API declarations module. I'd try exporting the current API libraries to see if that offered any clues but don't have the tool that I use to do that to hand at the moment. The only clue that I can see as to the usefulness of this "flag string" is in the TM1ServerLogOpen function of the API manual, where one of the arguments is sFlagFilter; "a long. This TM1 value capsule contains a string used to filter records by flags". Now, to me this suggests that even if you can poke such a flag into the log file it's going to be a static, not a dynamic string like a timestamp, unless you're writing every single transaction via the API and setting the flag to the value of this timestamp as you do each transaction.The information recorded in the log file includes:
...
● Date and time the change was made.
● Name of the client who made the change.
● Whether the new data is simple data (N) or string data (S).
● Value before the change.
● Value after the change.
● Name of the cube in which the change was made.
● Elements that identify the cell that changed.
● Optional user-provided string that is attached to each transaction. You create the string with the TM1ServerLogSetFlagString API function.
In short, I have a sneaking suspicion that you've been given garbage advice.
However you aren't paying an obscene amount for maintenance for nothing so I do suggest that you return to support and say to them "OK, since you've failed to document the function yet again, give me a fully worked example of how I can use it to implement a local timestamp in the log".
My bet is that they won't be able to give you one because I doubt that it can be done (except in the way indicated above) but I my own self would be fascinated to hear what response you get.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: How to use TM1ServerLogSetFlagString API function ?
Interesting, never heard of any ability to change the timestamp of transaction logs before. You can change the timestamp of the message log in the tm1s-log.properties file quite easily (but this does then invariably lead to some confusion comparing events in the message log in local time vs. the transaction log in GMT.)phamtinkt88 wrote:Hi all,
I want to change timestamp from GMT(default) to LOCAL when viewing transaction log. IBM told me to use TM1ServerLogSetFlagString API function but didn't show me how to use it. Anyone who has used this function please help !
Thanks in advanced !
Tin Pham.
As Alan said some interesting advice seem as the API call is not documented!
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: How to use TM1ServerLogSetFlagString API function ?
phamtinkt88 wrote:IBM told me to use TM1ServerLogSetFlagString API function but didn't show me how to use it.
I have to agree with Alan; unfortunately, on some occasions, the vendor doesn't give the correct advice.Alan Kirk wrote:In short, I have a sneaking suspicion that you've been given garbage advice.
Ive looked at this API function and AFAIK its purpose is to set the last field in an entry to the transaction log:
Code: Select all
"","20120220064514","20120220064514","Robin","S","20120214230251","20120220064514","}DimensionProperties","}Processes","LAST_TIME_UPDATED",""
I.e. the field after "LAST_TIME_UPDATED" is the flag string field that can be set via the API. Up until recent versions, this field doesn't get used much, if at all, by TM1. Before 'Undo' came along, the main use I could see for this field was the ability to flag certain transaction logs in order to undo them - maybe in conjunction with API-driven spreading.
phamtinkt88 wrote:I want to change timestamp from GMT(default) to LOCAL when viewing transaction log.
I don't know if that changes the timezone of entries in the transaction log - these logs are critical to replication so my guess is that they wouldn't allow changing the time zone... but you could try - let us know.lotsaram wrote:You can change the timestamp of the message log in the tm1s-log.properties
I suppose you could somehow use the API function to set the flag string as a local time flag but this is probably more work than using other alternatives.
Robin Mackenzie
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: How to use TM1ServerLogSetFlagString API function ?
Yes, I believe that this was what the advice was getting at; not to use the function to alter the primary timestamp (which is not possible, as far as I know), but rather to enter a local one into the "flag" field. However as I said I can't see how that kind of kludge could fly unless every entry was made by the API.rmackenzie wrote:I suppose you could somehow use the API function to set the flag string as a local time flag but this is probably more work than using other alternatives.
Still, it would allow one service rep to clear an SR from their books...
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: How to use TM1ServerLogSetFlagString API function ?
And I note from this morning's notifications that all is finally revealed.rmackenzie wrote:phamtinkt88 wrote:IBM told me to use TM1ServerLogSetFlagString API function but didn't show me how to use it.I have to agree with Alan; unfortunately, on some occasions, the vendor doesn't give the correct advice.Alan Kirk wrote:In short, I have a sneaking suspicion that you've been given garbage advice.
I'm sorry, but what?The setLogFlagString() method or function is an Internal function for TM1 , capable of setting the optional provided string in the TM1 Server Log - tm1s.log
Note it is an Internal function, hence no documentation exists that lists functionality.

If it's an "internal function" then it doesn't get exposed. If gets exposed, then it is not, by definition, "internal"... and It. Should. Be. Documented. No ifs, no buts, no maybes, no excuses, if you expose a function, you document it. Period. Without exception.
It appears that the function does what we surmised, though again... that would make it completely useless for setting a timestamp except for any transactions which are input directly through API calls.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.