0% found this document useful (0 votes)
195 views

Linux Shell Session Setup For DataStage Command Line

This document provides steps to set up a Linux shell environment for using the DataStage command line interface. The steps include: 1) Creating a .dshome file in the root directory that contains the path to the DataStage engine. 2) Creating .profile and .kshrc or .bashrc files in the home directory and copying configuration details to set DataStage environment variables and execute the dsenv script. 3) Logging out and back in for the settings to take effect, allowing use of the Datastage command line.

Uploaded by

DataStage4You
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
195 views

Linux Shell Session Setup For DataStage Command Line

This document provides steps to set up a Linux shell environment for using the DataStage command line interface. The steps include: 1) Creating a .dshome file in the root directory that contains the path to the DataStage engine. 2) Creating .profile and .kshrc or .bashrc files in the home directory and copying configuration details to set DataStage environment variables and execute the dsenv script. 3) Logging out and back in for the settings to take effect, allowing use of the Datastage command line.

Uploaded by

DataStage4You
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

To setup Linux Shell for Datastage command line is very important if you are a DataStage

Developer and want to work hassle free on DataStage Command Line.


Follow below steps to setup your profile --a) First, we will create .dshome file which is containing the path of DS Engine. If you know
what it is, good, create a file in root dir with DS Engine path
otherwise execute below scripts to do it by itself

#!/bin/sh
#DataStage4You
echo "creating DSHOME file...."
if [ `ps -ef | grep -c dsrpcd` -eq 2 ] ; then
ps -ef | grep dsrpcd | grep -v grep | awk '{print $NF}' | sed -n
's/bin\/dsrpcd//p' > /.dshome
echo '.dshome file has been created under / (root dir)'
else
echo 'Please check whether datastage server is up or not, If not, please
start'
fi

b) Now create .profile and .kshrc or .bashrc (update as your shell support) in your HOME dir
by copying below content to respective file
i- .profile file
# Simply copy the below content in your $HOME/.profile
export VISUAL=vi
export EDITOR=/usr/bin/vi
ENV=$HOME/.kshrc
export ENV
umask 000
stty erase ^?
export HOST=`hostname`
export PS1='$HOST:$PWD> '
export PS2="$HOST:`pwd`>> "
export PS3="$HOST:`pwd`== "
unalias ls
set -o vi
echo setting up DataStage environment
export DSHOME=`\cat /.dshome`

# execute dsenv
if [[ -x $DSHOME/dsenv ]]; then
. $DSHOME/dsenv
else
echo "The DataStage dsenv file ($DSHOME/dsenv) not found or is not
executable!"
fi

ii- .kshrc file


# Simply copy this content to your .kshrc or .bashrc file
# .kshrc
# Source global definitions
if [ -f /etc/kshrc ]; then
. /etc/kshrc
fi
# User specific aliases and functions
export PS1='`hostname`:$PWD > '
#DS ENV
if [ -f /is/is/Server/DSEngine/dsenv ];then
. /is/is/Server/DSEngine/dsenv
fi
#ORACLE_HOME=
#ORACLE_SID=
# User specific aliases and functions
alias dsr="ps -ef | grep 'DSD.RUN' | grep -v 'grep'"
down all current running ds jobs
alias ll='ls -lrt'
alias llt='ls -lrt|tail'
alias rds='orchadmin rm'
dataset use like - rds <datasetname>
alias dds='orchadmin dump'
dataset use like - dds <datasetname>

#alias for listing


#alias for ls -lrt
#alias for removing
#alias for view/dump

If you have done with all above steps correctly, please logout from current session and login
again to get run above settings for your user profile. Now, you can use DataStage command line
in your Linux Shell session.
Happy Coding .....!!!

Like the Facebook Page & join Group


https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you
https://twitter.com/datastage4you
https://groups.google.com/d/forum/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098

You might also like