set environment variable?

I am working with solaris 9 sunBlade150 Box.

I Installed a program, need to set the environment variable so that when the executable is entered,it finds the path to the executable.

The documentation for the software says: Set the appropriate environment variable:

Connect to server failed; check $P4PORT.
TCP connect to 126.4.200.33:1666 failed.
connect: 126.4.200.33:1666: Network is unreachable
Connect to server failed; check $P4PORT.
TCP connect to 126.4.200.33:1666 failed.
connect: 126.4.200.33:1666: Network is unreachable

where I have to set this Env variable $P4PORT

Presumably, in your .profile or similar. Googling for this brings up a lot of matches, although I didn't check whether they were actually useful.

If the IP/Port in the error messages is correct then the problem is related to the routes on the server.
If the IP/Port are NOT correct then setting the environment variable will depend on which shell you are using.
The default profile for almost all users is /etc/profile. If setting it for all users is not a problem then put the directive in there.

I put the variable in .profile file like

P4PORT=120.4.200.33:1666

but after that It is showing the same problem..

can you ping 126.4.200.33

And you logged out and back in, or sourced your .profile? (In other words, you should see this setting when you issue an echo $P4PORT command.)

I am sending the result after ping IP--

# ping 126.4.200.33

ICMP Host Unreachable from gateway mgsun (10.130.92.27)
for icmp from mgsun (10.130.92.27) to 126.4.200.33
ICMP Host Unreachable from gateway mgsun (10.130.92.27)
for icmp from mgsun (10.130.92.27) to 126.4.200.33
ICMP Host Unreachable from gateway mgsun (10.130.92.27)
for icmp from mgsun (10.130.92.27) to 126.4.200.33
no answer from 126.4.200.33

So how can connect with it?
Please tell me..

Thanks in advance

It is giving the output means the variable had been set..
# echo $P4PORT
126.4.200.33:1666

am I right or wrong??

now the problem is to connect with the server.So I can I connect with that??:confused:

Read the fscking error message. The problem is not related to the environment variable, your server does not have a route to that IP. Contact your network administrator.