Thursday, March 13, 2008

How to reset the version number for an UA application

UA Versioning is a great concept to provide automatic versioning, but its implementation is not great. For example, if you want to turn off versioning, you won't be able to. Also, if you make some modifications to MDLs, the application version changes and all the situations and rules may need to be rewritten for the new version. True, um_cleanup provides a way to reset the version numbers but it is an all or nothing approach. i.e. it can reset the version numbers of all applications or nothing at all.

This article comes up with a modified version of um_cleanup called um_cleanup_app that provides a way to reset the version number for a specific application. Let us say, after successful testing of the UM MDL, your application version is at 03. Now, you can run um_cleanup_app using the following procedure, re-import the MDL and it will reset the version back to 00.

Disclaimer: Honestly I have not had a chance to test this in diverse environments. This was tested in my test lab, so your mileage may vary. There may be other side-effects of this script that we don't know at this time. Always use it with caution. Please understand that this modified tool is not supported by IBM or GulfBreeze.

About um_cleanup_app

You can download um_cleanup_app from here. There are two files in the zip, one for Unix/Linux platforms (um_cleanup_app) and one for Windows platforms (um_cleanup_app.bat). The syntax of these modified scripts is similar to the regular um_cleanup except that it accepts an extra argument, which is the name of the application that is specified in the //APPL statement of UA MDL (case sensitive).

For example, here is the syntax for um_cleanup_app to run on TEMS servers to cleanup the application "WinSample"
$ ./um_cleanup_app $CANDLEHOME li6243 REM_OPENESM01 CMS WinSample

And here is the syntax for um_cleanup_app.bat that cleans up the same application on Windows Universal Agent
C:\>um_cleanup_app.bat %CANDLEHOME% UA WinSample

Steps to clear the UA Version for an application

To reset the UA Version for a particular application, follow the procedure given below.

1. Delete the MDL using kumpcon/um_console.
2. Clear the offline entries for the application.
3. Stop universal agent.
4. Run um_cleanup_app.bat/um_cleanup_app.sh on Universal agent host and TEMS servers according to your platforms.
5. Start Universal agent.
6. Reimport the MDL

Now check to make sure that newly imported MDL has version 00 at the end.

Hope you like it. Again, the tool can be downloaded from here.

No comments: