Tuesday, August 19, 2008

Converting TDW Timestamps to DateTime in BIRT

We have previously published articles on how to convert TDW timestamps to "regular" timestamps in DB2. In BIRT, you may need to tackle the same problem again. The TDW timestamps can not be used for DateTime arithmetic and Charting functions in BIRT and has to be converted to regular DateTime. Though you can use the SQL to convert these timestamps to regular, in some cases, you may want to use the JavaScript integration of BIRT to convert them as well. Here is how to do it.

  1. In your BIRT data set, ensure that you're selecting the TDW Timestamp that needs to be converted to the regular timestamp.
  2. In the "Edit DataSet Window", click on Computed Columns and Click New button.
  3. Give the column name for the new Computed Column, select the column data type as "Date Time".
  4. In the expression field, click on the fX button and enter the following JavaScript code. Replace row["Timestamp"] with the appropriate Column name for the TDW Timestamp.

if (row["Timestamp"] == null)
{
null
}
else {
new Date(
(candleTime=row["Timestamp"],
(parseInt(1900) +
parseInt(candleTime.substr(0,3))) + "/" +
candleTime.substr(3,2)
+ "/" + candleTime.substr(5,2) + " " +
candleTime.substr(7,2) +
":" + candleTime.substr(9,2) + ":" +
candleTime.substr(11,2)
))
}

5. Goto the Preview Results and ensure that the newly Computed Column appears in the output.

This is the kind of method that ITM 6.2 built-in reports use and hope you find it useful.

Friday, August 8, 2008

CCMDB 7.1.1 Install Error: CTGIN2381E

When running the CCMDB 7.1.1 installer from a Windows system to install the code on a UNIX/Linux box (since the installer only runs on Windows, this is what you have to do if your server is UNIX/Linux), you may encounter the error:

CTGIN2381E: Maximo Database upgrade command failed

It turns out that this error message can be caused by lots of different issues, so the text of the error itself isn't necessarily very helpful. In my case, I found that the error was occurring because of an exception being thrown in the middle of the nodeSync() function of the DeploymentManager.py script (that is installed on your Windows deployment machine when you run the CCMDB installer). And what I found is that it just needed a sleep statement to allow the node manager to come up successfully. So the line I added (immediately after the "try:" statement at line 115) was:

lang.Thread.currentThread().sleep(30000)

This causes it to sleep for 30 seconds. You can probably set this timeout to a smaller value (esp. since the nodeSync() function is actually called quite a few times during the install), but 30 seconds worked perfectly for me.

Tuesday, July 29, 2008

Tivoli Common Reporting (TCR) Space on IBM DeveloperWorks

It's available here:

http://www.ibm.com/developerworks/spaces/tcr

It's got lots of good information and links on TCR. Also, you probably want to poke around a little to see if there's anything else on devworks that might interest you.

You can configure a laptop with 8GB of RAM

I recently got an 8GB kit for my laptop from:
http://www.compsource.com/ttechnote.asp?part_no=KVR667D2S5K28G&vid=229&src=F

and it works GREAT. I've got a Thinkpad t61p (Santa Rosa) running Vista Ultimate x64, and it sees all 8GB. Additionally (and most importantly), VMWare Workstation also sees all of the memory and allows me to allocate it to a virtual machine.

Friday, June 27, 2008

JDBC configuration in TCR v1.1.1

One of the important thing in configuring Tivoli Common Reporting server is the JDBC configuration. This step doesn't seem to be documented in the installation guide properly. The installation guide talks about modifying a python script but it is not needed and there is a simple way to get configure the JDBC driver.

The simplest way to get it working is to copy the JDBC drivers to a particular directory deep down in the TCR installation tree. The location is %TCR_HOME%\lib\birt-runtime-2_2_1\ReportEngine\plugins\org.eclipse.birt.report.data.oda.jdbc_2.2.1.r22x_v20070919\drivers

Once you copied the JDBC drivers to that location and recycled TCR, the driver classes will be available to TCR and you should be able to configure JDBC connections using TCR web interface (Right click on a report -> Edit Data Sources).

Hope this helps.

Wednesday, June 4, 2008

How to get GBSCMD?

Of late, there has been some confusion about how to get a copy of GBSCMD. GBSCMD is free and getting it is very easy. Just write an email from your company email address to Tony (Tony dot Delgross at gulfsoft.com) and ask for a copy. He will send a copy it to you. That's it. If you want some additional features to be included in it, please feel free to write to me. (venkat at gulfsoft.com).

Sunday, June 1, 2008