Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

host as parameter in piv


6 replies to this topic

#1 Rory

Rory

    Advanced

  • Members
  • PipPipPip
  • 88 posts

Posted 22 June 2005 - 09:18 AM

Hi

Is it possible to have the host name as a parameter in a piv file?
We have Oracle failsafe on a new server, our PRO-IV app is installed on both nodes, would like
to have one piv in a shared location so users will not have two pivs.

If there is another way of doing this, would appreciate any suggestions.

Thanks
Rory

#2 Fred Marker

Fred Marker

    Advanced

  • Members
  • PipPipPip
  • 82 posts
  • Gender:Male
  • Location:Columbus, Ohio, United States

Posted 22 June 2005 - 12:15 PM

I have the same need also.

It would be nice if the host name could come from an environment variable.

#3 Sindre Solem

Sindre Solem

    Member

  • Members
  • PipPip
  • 46 posts
  • Gender:Male
  • Location:Trondheim, Norway

Posted 22 June 2005 - 01:42 PM

Why not have two piv files, one for each server. And choose which piv file to use from an environment variable, if that is necessary.

*
Ok, not reading the whole story...

You could create the piv file "on the fly", after which server you wish to use at the time.

Edited by Sindre Solem, 22 June 2005 - 01:44 PM.


#4 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 22 June 2005 - 01:47 PM

Rory and Fred,

In Unix

SYSF(22,'HOSTNAME', $HOSTNAME)

In Windows

SYSF(22,'COMPUTERNAME',$HOSTNAME)

hth,

Joseph

#5 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 22 June 2005 - 01:51 PM

Rory,

Sorry, I actually answered Fred's question and not yours...

What you can do relatively easily is created a batch file that dynamically builds a PIV. If the hostname is fed in as %1, then the batch could build either PIV on the fly.

The hostname is in the PIV on the line starting with H.

hth,

Joseph

#6 Rory

Rory

    Advanced

  • Members
  • PipPipPip
  • 88 posts

Posted 22 June 2005 - 02:35 PM

Joseph & Sindre,

Thanks very much for your replies

Does anyone have this implemented?

Any further feedback appreciated

Regards
Rory

#7 Richard Bassett

Richard Bassett

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 707 posts
  • Gender:Not Telling
  • Location:Rural France

Posted 22 June 2005 - 05:45 PM

SYSF(22,'HOSTNAME', $HOSTNAME)

Although you don't actually need to do this in any reasonably recent version of ProIV to retrieve an environment variable, you can just write..

&$@~HOSTNAME

At least that's one officially-unsupported SYSF call we don't all have to rely on :D

Edited by Richard Bassett, 22 June 2005 - 05:45 PM.

Nothing's as simple as you think



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!