Calling DataStage job from Unix script
Moderators: chulett, rschirm, roy
Calling DataStage job from Unix script
Hi All
Where do i need to place my Unix shell script .Is it under Project folder ?
Actually i am getting folowing while using -
${DSBINDIR}/dsjob -run -mode NORMAL
-param '$prmfilepath'='/data/dw/af2/rawdata/Strategyware060112.txt' -warn $WARN_LIMIT -jobstatus $PROJ $JOB
Error is - StrategyWareLoad.sh[30]: /dsjob: not found
Please help me in understanding why i am getting this error.
Thanks in advance
Where do i need to place my Unix shell script .Is it under Project folder ?
Actually i am getting folowing while using -
${DSBINDIR}/dsjob -run -mode NORMAL
-param '$prmfilepath'='/data/dw/af2/rawdata/Strategyware060112.txt' -warn $WARN_LIMIT -jobstatus $PROJ $JOB
Error is - StrategyWareLoad.sh[30]: /dsjob: not found
Please help me in understanding why i am getting this error.
Thanks in advance
rv
You are getting a UNIX error. The environment variable you are referencing with "${DSBINDIR}" is empty in your script so it is looking for the dsjob program in the root directory. It might be better to use either $DSHOME if you have it set or resort to using "`cat /.dshome`/bin"
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
HI
I tried this way , but this also giving error -
DSBINDIR='/opt/tools/datastage7/Ascential/DataStage/DSEngine/bin'
${DSBINDIR}/dsjob -run -mode NORMAL -param '$prmfilepath'='/data/dw/af2/rawdata/Strategyware060112.txt' -warn $WARN_LIMIT -jobstatus
Error is -
ld.so.1: /opt/tools/datastage7/Ascential/DataStage/DSEngine/bin/dsjob: fatal: libvmdsapi.so: open failed: No such file or directory
StrategyWareLoad.sh[16]: 28238 Killed
Please suggest me
I tried this way , but this also giving error -
DSBINDIR='/opt/tools/datastage7/Ascential/DataStage/DSEngine/bin'
${DSBINDIR}/dsjob -run -mode NORMAL -param '$prmfilepath'='/data/dw/af2/rawdata/Strategyware060112.txt' -warn $WARN_LIMIT -jobstatus
Error is -
ld.so.1: /opt/tools/datastage7/Ascential/DataStage/DSEngine/bin/dsjob: fatal: libvmdsapi.so: open failed: No such file or directory
StrategyWareLoad.sh[16]: 28238 Killed
Please suggest me
rv
Your environment isnt' setup properly for this script's session. Make sure it 'sources' the dsenv file before you run the dsjob command.
Code: Select all
cd $DSHOME
. ./dsenv
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
DSHOME=`cat /.dshome`
DSBINDIR=${DSHOME}/bin
export DSHOME DSBINDIR
. $DSHOME/dsenv
${DSBINDIR}/dsjob -run -mode NORMAL -param '$prmfilepath'='/data/dw/af2/rawdata/Strategyware060112.txt' -warn $WARN_LIMIT -jobstatus
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Example : Source dsenv , so that dsjob works
todev132:/app/ascential/Ascential/DataStage/DSEngine> bash
todev132:/app/ascential/Ascential/DataStage/DSEngine . dsenv
todev132:/app/ascential/Ascential/DataStage/DSEngine bin/dsjob
Command Syntax:
dsjob [-file <file> <server> | [-server <servertodev132:/app/ascential/Ascential/DataStage/DSEngine> bash
todev132:/app/ascential/Ascential/DataStage/DSEngine . dsenv
todev132:/app/ascential/Ascential/DataStage/DSEngine bin/dsjob
Command Syntax:
dsjob [-file <file> <server> | [-server <server>][-user <user>][-password <password>]]
<primary command> [<arguments>]
Valid primary command options are:
-run
-stop
-lprojects
-ljobs
-linvocations
-lstages
-llinks
-projectinfo
-jobinfo
-stageinfo
-linkinfo
-lparams
-paraminfo
-log
-logsum
-logdetail
-lognewest
-report
-jobid
-import
Status code = -9999 DSJE_DSJOB_ERROR
>][-user <user>][-password <password>]]
<primary command> [<arguments>]
Running TCL from Unix
todev132:/app/ascential/Ascential/DataStage/DSEngine cd ../Projects/Test
todev132:/app/ascential/Ascential/DataStage/Projects/Test $DSHOME/bin/dssh
DataStage Command Language 7.5
Copyright (c) 1997 - 2004 Ascential Software Corporation. All Rights Reserved
Test logged on: Mon Jul 31 06:57:36 2006
>LIST.READU
Active Record Locks:
Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID.............
22282243 1564166 0 52065 2 RU 13471 sophis SPtest2
22282243 1870981 0 40110 4 RU 25426 sophis GetDSSECID
22282243 4457887 0 59852 8 RL 5684 sophis RT_LOG446
22282243 4457887 0 54340 8 RL 11196 sophis RT_LOG446
22282243 4457887 0 41825 8 RL 23711 sophis RT_LOG400
22282243 4457887 0 57594 10 RL 7942 sophis RT_LOG409
todev132:/app/ascential/Ascential/DataStage/DSEngine . dsenv
todev132:/app/ascential/Ascential/DataStage/DSEngine bin/dsjob
Command Syntax:
dsjob [-file <file> <server> | [-server <servertodev132:/app/ascential/Ascential/DataStage/DSEngine> bash
todev132:/app/ascential/Ascential/DataStage/DSEngine . dsenv
todev132:/app/ascential/Ascential/DataStage/DSEngine bin/dsjob
Command Syntax:
dsjob [-file <file> <server> | [-server <server>][-user <user>][-password <password>]]
<primary command> [<arguments>]
Valid primary command options are:
-run
-stop
-lprojects
-ljobs
-linvocations
-lstages
-llinks
-projectinfo
-jobinfo
-stageinfo
-linkinfo
-lparams
-paraminfo
-log
-logsum
-logdetail
-lognewest
-report
-jobid
-import
Status code = -9999 DSJE_DSJOB_ERROR
>][-user <user>][-password <password>]]
<primary command> [<arguments>]
Running TCL from Unix
todev132:/app/ascential/Ascential/DataStage/DSEngine cd ../Projects/Test
todev132:/app/ascential/Ascential/DataStage/Projects/Test $DSHOME/bin/dssh
DataStage Command Language 7.5
Copyright (c) 1997 - 2004 Ascential Software Corporation. All Rights Reserved
Test logged on: Mon Jul 31 06:57:36 2006
>LIST.READU
Active Record Locks:
Device.... Inode.... Netnode Userno Lmode Pid Login Id Item-ID.............
22282243 1564166 0 52065 2 RU 13471 sophis SPtest2
22282243 1870981 0 40110 4 RU 25426 sophis GetDSSECID
22282243 4457887 0 59852 8 RL 5684 sophis RT_LOG446
22282243 4457887 0 54340 8 RL 11196 sophis RT_LOG446
22282243 4457887 0 41825 8 RL 23711 sophis RT_LOG400
22282243 4457887 0 57594 10 RL 7942 sophis RT_LOG409