DSGetProjectInfo(DSJ.HOSTNAME) returns wrong/old servername

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
peterbaun
Premium Member
Premium Member
Posts: 93
Joined: Thu Jul 10, 2003 5:27 am
Location: Denmark
Contact:

DSGetProjectInfo(DSJ.HOSTNAME) returns wrong/old servername

Post by peterbaun »

Hi -

I have a routine in which I among other things extracts the servername - for extracting the servername I use
DSGetProjectInfo(DSJ.HOSTNAME)

The problem is that we changed the name of the server - but the the DSGetProjectInfo(DSJ.HOSTNAME) still returns the old server name.

How do I get this to work correctly ? Is the servername branded at the installation time so the only way to get this to work correctly would be to reinstall or is there a - hopefully - better explanation.

Thanks

Regards
Peter
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The server name is in fact stored at the time the project is created, and that entry cannot be manually changed to reflect a new name.
peterbaun
Premium Member
Premium Member
Posts: 93
Joined: Thu Jul 10, 2003 5:27 am
Location: Denmark
Contact:

Post by peterbaun »

How annoying - I feared so !

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Peter - but that means you can save the project to a .dsx file, delete it, re-create it and reload your .dsx file and you'll get the correct server name. I'm not at a DataStage machine right now, but if you to to the TCL prompt and "LIST UV.ACCOUNT" you'll see the hostname in there as part of the record. Don't try to change it, that will stop the project from working. If I remembered incorrectly then the hostname is stored as part of the installation and really cannot be changed. But I'm fairly confident that it is stored at a project level.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't think hostname is stored at the project level; only at the server level (unless you count the project's record in UV.ACCOUNT and UV_SCHEMA as being at the project level).

You can always retrieve the hostname using the operating system hostname command, probably via a call to DSExecute subroutine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I just got to a DS account, and it does look like the hostname returned from the DSGetProjectInfo() routine is retrieved from the entry in the UV.ACCOUNT hashed file; so deleting/re-creating the project should work.

Peter - can you create a new account and test a job with this call to see which name is returned - the old or the new?
peterbaun
Premium Member
Premium Member
Posts: 93
Joined: Thu Jul 10, 2003 5:27 am
Location: Denmark
Contact:

Post by peterbaun »

Hi Arnd,

Thanks for your investigations.

This was not really what I had planned spending a lot of time on (not blaming you of course) - and one problem often leads to another it seems like. Going forward deleting the first project gave me an error when trying to delete it. However I can't really see where it is not deleted.

If I do a "select * from UV.ACCOUNTS" it is not there.

It can be mentioned that the VOC file was left in the project directory when I tried to delete it.

I don't expect this to be a support case for you !

Worst case scenario (time-wise) is that I need to re-install DataStage and re-import the projects (on three servers.... )

Regards
Peter
peterbaun
Premium Member
Premium Member
Posts: 93
Joined: Thu Jul 10, 2003 5:27 am
Location: Denmark
Contact:

Post by peterbaun »

The last part about re-creating the project seemed to be a matter of I had not cleaned up the filesystem entirely where the old project resided.

About using the operating system command hostname - the idea is perfectly good, however I don't like that there is wrong information in the UV database so I will take the time to re-create the projects.

Thanks for the input.

Regards
Peter
Post Reply