Adding PATH variable in the startup scripts


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Adding PATH variable in the startup scripts
# 1  
Old 03-01-2007
Adding PATH variable in the startup scripts

Hi,

I got a error message
The environmental variable AUTOSYS is not set !

I think I require to to add a path to PATH variable in the startup scripts in the home dir.

I tried using set PATH=

but it is not setting the PATH when i do the echo $PATH , i dont get the new PATH reflected, Is there anything i need to do before i run the SET command.

Regards
Rajanish
# 2  
Old 03-01-2007
Quote:
Originally Posted by rajanishshetty
Hi,

I got a error message
The environmental variable AUTOSYS is not set !

I think I require to to add a path to PATH variable in the startup scripts in the home dir.

I tried using set PATH=

but it is not setting the PATH when i do the echo $PATH , i dont get the new PATH reflected, Is there anything i need to do before i run the SET command.

Regards
Rajanish
What are you really trying to do ? What you describe is NOT a standard "shell environment".
What shell are you using ? Each different shell has a different syntax for setting environment variables.

The mention of the variable "AUTOSYS" makes me think you are running a script inside a "batch environment" using the (C.A.) facility "AutoSys". This is a MUCH more complicated execution environment, and cannot be explained or trouble-shot in a forum.
# 3  
Old 03-02-2007
I was trying to run an autosys Command Autorep -J <jobname> ,

and it gave me a error message environmental variable AUTOSYS is not set.

For this I was asked to add a path(Autosys/bin) to PATH variable in the startup scripts in the home dir.

But I am not able to do that.
# 4  
Old 03-02-2007
Also i am using ksh
# 5  
Old 03-02-2007
There are many environment variables.

PATH is just one of them and is used as a search path to find executable programs/scripts.

Another one is PWD, which has as value the directory you are located in.

Another is TERM, which is set to a value indicating the type of terminal you are using.

Those are above are kinda "standard" environment variables.

You are free to define your own, which is usually done in startup scripts like "~/.profile" etc.

You are running a script or program which expects the environment varible AUTOSYS to be set.

If it is not set, it will cause an error message.

So prior to running your program or script you have to make sure that the variable AUTOSYS is defined.

Which values you can assign to it, I cannot tell you. To know that you should read the documentation that came with the scripts or program or check the code if it is a script.

To make your program run, you would need to do something like:

AUTOSYS=<some value which is valid for this variable>
export AUTOSYS
./<your program>

If AUTOSYS always has the same value you could add a line to your "~/.profile" to define the variable.



You script seems to use a variable AUTOSYS.
# 6  
Old 03-02-2007
Quote:
Originally Posted by rajanishshetty
I was trying to run an autosys Command Autorep -J <jobname> ,

and it gave me a error message environmental variable AUTOSYS is not set.

For this I was asked to add a path(Autosys/bin) to PATH variable in the startup scripts in the home dir.

But I am not able to do that.
Autosys is a "Batch Execution" package meant to 'enhance' cron and basically make UNIX behave like a mainframe. 'AUTOSYS' is a variable used in all the 'autosys scripts', that is set to the "installation directory' of the AutoSys package. Inside of most of the AutoSys sctipts you will see things like: $AUTOSYS/bin/<programname> So it is like "JAVA_HOME", "ORA_HOME", et. al..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with creating startup scripts using screen

Edit: So sorry! I really didn't do a good job of clearly stating what I needed. Going to completely rewrite my post so everything is clearly stated. I'm having trouble writing a shell startup script for a linux server. It uses the bash shell if I remember correctly. I'm trying to write it so... (9 Replies)
Discussion started by: Pyitoechito
9 Replies

2. Solaris

Solaris 10 startup scripts

Hi all, I have a server in maintenance mode and need to boot it up. Its due to a broken service "RepX". I need to stop the service from trying to start at boot up but i can't find where it is booting up from... it is not in any of the rcX.d directories and the two locations i have found it... (6 Replies)
Discussion started by: Tommyk
6 Replies

3. UNIX for Advanced & Expert Users

xsession startup scripts

Can someone please tell me how to run xsession startup scripts whenever I start or after I restart my X session? I'm not trying to do anything fancy I just want this to run. This makes life a lot easier when I use a dual monitor. xrandr --output VGA1 --mode 1024x768 --rate 60 (7 Replies)
Discussion started by: cokedude
7 Replies

4. UNIX for Dummies Questions & Answers

Startup/Kill Scripts

Hello, I have to perform an audit of a system at work and I am looking at its /etc/rc3.d: K01tog-pegasus K74nscd S08iptables S50openemm K01yum K74ntpd S09isdn S55cups K02NetworkManager K85mdmpd S09pcmcia S55sshd K03rhnsd ... (8 Replies)
Discussion started by: mojoman
8 Replies

5. AIX

Startup rc scripts log

Hi, I am trying to start services on system reboot on AIX. Have put the S* links under rd2.d & K* links under other rc*.d At the moment, all scripts are getting called. However, the services aren't coming up. Where can i find the logs for these to check what failed. (8 Replies)
Discussion started by: vibhor_agarwali
8 Replies

6. HP-UX

Startup scripts

Hi all We have HP UX 11.23 installed on 4 RISC servers (2 oracle databases, 2 Oracle App Servers) , we are in a construction period , so the power failure may happen more than once a day. I need to learn how to create an automatic startup services as in Windows, if we know that the services... (5 Replies)
Discussion started by: kafaween
5 Replies

7. Linux

startup scripts (rc3.d)

I've created the following link in order to startup apache tomcat on startup, however, it does not seem to run. Am I missing something out? :confused: /etc/init.d lrwxrwxrwx 1 root root 16 Sep 5 14:59 K73ypbind -> ../init.d/ypbind lrwxrwxrwx 1 root root 16 Sep 11 13:09 S100tomcat ->... (5 Replies)
Discussion started by: jon80
5 Replies

8. UNIX for Dummies Questions & Answers

adding PATH variable

Hello i use bash and i added a path variable for 2 files /rscr and /uscr in /etc/profile /rscr working fine but the other one shows command not found and when i try to type whereis for scripts in /rscr it shows them but the other one shows nothing... thanks :b: (3 Replies)
Discussion started by: wir3d
3 Replies

9. Shell Programming and Scripting

startup scripts, how do they work in UNIX?

I need to make a script to start the postfix service on a server when the machine starts up. I have a script written below, which I think will work, but I am confused on how the rc2.d & rc3.d etc directories actually work. If I enter the script below, and stick it in the rc3.d directory,... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

10. AIX

Startup/Shutdown scripts

I understand that by putting in entries into the /etc/inittab file. We can actually call the our scripts during startup. mkitab "start_server:2:once:sh /scripts/startserver.sh" Would the system wait for startserver.sh finish executing before it goes to another entry? and how long would it... (1 Reply)
Discussion started by: vincente
1 Replies
Login or Register to Ask a Question