bash datastage

Env Setup

You need to have the DS Environment correctly setup

So in .bashrc and .bash_profile place the following 2 lines

source /opt/IBM/INformationServer/Server/DSEngine/dsenv
PATH=$PATH:$HOME/bin:$DSHOME/bin

Allow DS to ssh into db2inst1

we want to run a DS Job in a loop... keyless ssh

As dsadm

ssh-keygen -t rsa
ssh-copyid db2inst1@infosvr

Bash wait

sleep 1 &
PID1=$!
sleep 2 &
PID2=$!

wait $PID1
echo 'PID1 has ended.'
wait
echo 'All background processes have exited.'

DataStage from the Command line

Display Job Info

dsjob -jobinfo dstage1 Master_Sequence

Show Datastage Job Params

   dsjob -lparams <project> <Job Name>

Start a Job

dsjob -run dstage1 Master_Sequence

Datastage from Command IBM

We however may need to set some parameters.... But for the moment lets not worry about that.

Data Stage PID

It does seem possible that Datastage master job creates a PID - and this can be followed using the WAIT construct shown earlier.