You can configure Qshell
to run WebSphere® Application Server - Express for IBM® i scripts.
About this task
In a default
installation, unless otherwise specified,
all WebSphere Application Server scripts
are in the app_server_root/bin directory.
The
scripts must be run from Qshell. To ensure that you use the correct
version and directory, run QShell commands using one of the following
methods:
Procedure
- Invoke the fully
qualified path name of the script:
app_server_root/bin/script_name parameters
where script_name is
the name of the script and parameters represents the parameters
that are passed to the script.
- Invoke the
script from the IBM i command line or from an
IBM i CL program. To use this method, run the STRQSH command and specify
the fully qualified path name of the script:
STRQSH CMD('app_server_root/bin/script_name parameters')
where script_name is
the name of the script and parameters represents the parameters
that are passed to the script.
- Change directories
to the app_server_root/bin directory
and run the following script:
cd app_server_root/bin
script_name parameters
where script_name is the
name of the script, and parameters represents the
parameters that are passed to the script.
- You
can update the PATH environment variable to automatically
locate the script when you run it. After you update the PATH variable,
you can run these scripts from any directory. To update the PATH environment
variable, perform the following steps:
- Edit the
.profile file in the /home/user_profile_name directory,
where user_profile_name is the name of your IBM i user profile.
If
this file does not exist, create it in this directory. You can use
the EDTF command from an IBM i command line or use any editor from
a workstation. Also note that .profile is the full name of the file.
When you start Qshell, it searches for the .profile file, and runs
the commands listed in it. You can use the .profile file to set persistent
environment variables for your Qshell session.
- Add the
following line to the .profile file:
export PATH=app_server_root/bin:$PATH
- Save the file.
What to do next
The
updates to .profile do not take effect until you restart
Qshell (if you had a session open) or source .profile (command: ./home/user_profile_name/.profile)
To
change the path for a single Qshell session instead of changing the
default path for all Qshell sessions, run the export commands
shown in the last step during the Qshell session, but do not edit
the .profile.