Setup AUTOSYS Commands bashrc file

In this tutorial you will see how to setup AUTOSYS alias into bashrc file and include default instance on your profile on Linux box.

Prerequisites:

  • You have working knowledge of AUTOSYS
  • AUTOSYS client is already installed on Linux box where you are trying to use AUTOSYS commands
  • You knows about all instances that can be use

What is bashrc in Linux: It’s (.bashrc) a shell script that Bash runs whenever it is started interactively. It’s very useful as you can put any command in this and use in the command prompt. It’s location is always in your home directory and use this command to find it:

# ls -la ~

Note: .bashrc is hidden file

To put AUTOSYS shortcuts into this file:

  • Login to the Linux box
  • Let say you have two instance of AUTOSYS DC1 and UC1 which you want to use and want to setup DC1 as default instance when you logon to Linux box:
source /opt/autotree/r11/autouser.DC1/autosys.sh.DC1; echo “User: $LOGNAME”; echo -e “Autosys Instance: $AUTOSERV\n”
alias a=’alias’
alias ag=’sendevent -E SET_GLOBAL -G ‘
alias agr=’autorep -G ALL’
alias cp=’cp -i’
alias curve=’cd libFinPluscurve’
alias fsj=’sendevent -E FORCE_STARTJOB -P1 -J ‘
alias jcsb=’sendevent -E CHANGE_STATUS -P1 -s STARTING -J ‘
alias jcsf=’sendevent -E CHANGE_STATUS -P1 -s FAILURE -J ‘
alias jcsi=’sendevent -E CHANGE_STATUS -P1 -s INACTIVE -J ‘
alias jcsr=’sendevent -E CHANGE_STATUS -P1 -s RUNNING -J ‘
alias jcss=’sendevent -E CHANGE_STATUS -P1 -s SUCCESS -J ‘
alias jcst=’sendevent -E CHANGE_STATUS -P1 -s TERMINATED -J ‘
alias jd=’job_depends -c -J ‘
alias jfh=’sendevent -E JOB_OFF_HOLD -P1 -J ‘
alias jfi=’sendevent -E JOB_OFF_ICE -P1 -J ‘
alias jk=’sendevent -E KILLJOB -P1 -J ‘
alias joh=’sendevent -E JOB_ON_HOLD -P1 -J ‘
alias joi=’sendevent -E JOB_ON_ICE -P1 -J ‘
alias jr=’autorep -J ‘
alias jrd=’autorep -dJ ‘
alias jrm=’autorep -M ‘
alias jrq=’autorep -qJ ‘
alias jrs=’autorep -sJ ‘
alias lf=’ls -CF’
alias uc1=’source /opt/autotree/r11/autouser.UC1/autosys.sh.UC1; echo “User: $LOGNAME”; echo -e “Autosys Instance: $AUTOSERV\n”‘
alias dc1=’source /opt/autotree/r11/autouser.DC1/autosys.sh.DC1; echo “User: $LOGNAME”; echo -e “Autosys Instance: $AUTOSERV\n”‘
  • Save this file.
  • Now to check of it’s setup correctly or not use following commands:
uc1 / dc1 Change Autosys instance to UC1 / DC1
jr JAVAHONK% Search for all jobs starting with JAVAHONK%
jr JAVAHONK_Daily_Jobs_Box View JAVAHONK_Daily_Jobs_Box
jr JAVAHONK_JOB_S -q View specific setting for the Autosys.

Leave a Reply

Your email address will not be published. Required fields are marked *