Create a script in the directory where you Ps home is there.
Command : vi script.sh
Add following text to script file.

#!/user/bin/ksh

 

#check the number of argument

 

if [ $# -ne 2 ]; then

         echo “Number of argument pass are invalid.Argument 1 = ,argument 2 = .”

         exit 127

fi

 

#display arguments

 

echo “PS HOME Name is $1”

echo “Domain Name is $2”

 

        

pspathvar=$1       

domainname=$2

 

 

# call psconfig file to initiate the peoplesoft variable

. ./$pspathvar/psconfig.sh

cd $pspathvar/appserv

 

 

#stop the application server.

echo “stopping the application server”

psadmin -c shutdown! -d $domainname

echo “sleeping for 30 seconds to shutdown the application server”

sleep 30

echo “shutdown successfully completed”

 

# clearing application server cache

echo “Clearng Cache of Application Server”

psadmin -c purge -d $domainname -noarch -log “Manual Cache”

echo “Cache Cleared”

 

 

#booting up the application server

echo “booting up the server”

psadmin -c boot -d $domainname

echo “sleep for 30 seconds”

sleep 30

echo “server booted successfully”

Save and exit the script file.

command :wq!

How to run script :
. ./script.sh

Eg

. ./script.sh PTHRUAT PSHCMUAT