Problem with execute_command activity
Moderators: chulett, rschirm, roy
Problem with execute_command activity
Hi All,
Well i have this job sequence where the flow goes like this
Waitforfile......>job _activity.....> execute_cmmand activity
well in wait for file i'm waiting for a .txt file from the mainframes for abt 30sec (as of now i have given)
and once that arrives i trigger one of my job whose input is this .txt file and i do certain transformations ans create another file. once this job runs successfully i trigger the execute command stage in which i am actually trying to replace the .txt file from mainframe to .arc file.
well this replace should only be done provided my job_activity runs successfully.
but the command doesnt seems to work
the command i have given is
mv #filepath#/#OldFile# #filepath#/#NewFile#
these parameters i have described in the job parameter of the job sequence
where both the files are in the same directory
and old file is the .txt file and new file is the .arc file
both files have same name only the extension differes
well the job sequence runs successfully but the command doesnt seem to have executed.
why do you think the command doesnt seems to work.
Help needed please
Thanks in advance
Well i have this job sequence where the flow goes like this
Waitforfile......>job _activity.....> execute_cmmand activity
well in wait for file i'm waiting for a .txt file from the mainframes for abt 30sec (as of now i have given)
and once that arrives i trigger one of my job whose input is this .txt file and i do certain transformations ans create another file. once this job runs successfully i trigger the execute command stage in which i am actually trying to replace the .txt file from mainframe to .arc file.
well this replace should only be done provided my job_activity runs successfully.
but the command doesnt seems to work
the command i have given is
mv #filepath#/#OldFile# #filepath#/#NewFile#
these parameters i have described in the job parameter of the job sequence
where both the files are in the same directory
and old file is the .txt file and new file is the .arc file
both files have same name only the extension differes
well the job sequence runs successfully but the command doesnt seem to have executed.
why do you think the command doesnt seems to work.
Help needed please
Thanks in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Did you put the 'mv' part in the Command section and the '#filepath#/#OldFile# #filepath#/#NewFile#' in the Parameters section? Double-checked the spelling and case of each parameter name?
What does the log entry show for the stage when the job runs? Cut-and-paste, please no hand typing.
What does the log entry show for the stage when the job runs? Cut-and-paste, please no hand typing.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
well i tried using even move instaed of mv but doesnt seem to work .
to test what i did was i used wairforfile and then execute command. i created a dummy file called test.txt
and i ran for job where in the wait for file checks is test.txt is already present . as it was it triggered the execute command activity.
and the job ran successfully . but it doesnt seem to have created test.arc and neither dropped the file test.txt.
the log read as follows
Starting Job WaitForFileTest.
DropPath = /ascential/datastage/70/d02
OldFile = test.txt
NewFile = test.arc
Environment variable settings:
_=/usr/bin/nohup
BWInstance=UND
LANG=en_US
LOGIN=dsadm
OraclePassword=apr7671
Project=SalesVolume
OraclePasswordETQ=apr7671
APT_ORCHHOME=/ascential/datastage/70/UND/Ascential/DataStage/PXEngine
MSAFilePath=/ascential/datastage/70/data
RFC_TRACE=0
SYBASEHost=pm602.rncpmu.com,2025
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java130/jre/bin:/usr/java130/bin:/db2/db2pmutc/sqllib/bin:/db2/db2pmutc/sqllib/adm:/db2/db2pmutc/sqllib/misc:/oracle/usa/9.2.0/bin:/usr/opt/db2_08_01/bin:/db2/db2pmutc/sqllib/bin:/db2/db2pmutc/sqllib/adm:/db2/db2pmutc/sqllib/misc:/oracle/usa/9.2.0/bin:/usr/opt/db2_08_01/bin:/usr:/usr/vacpp:/usr/vacpp/bin
DB2DIR=/usr/opt/db2_08_01
DB2Host=RHDB2T
OracleServerETQ=ID28.WORLD
LC__FASTMSG=true
DSSAPHOME=/ascential/datastage/70/UND/Ascential/DataStage
OracleLoginIDFrict=ETL_APP
LOGNAME=shettas
SYBASELogonID=OPSEDGEID
LOCPATH=/usr/lib/nls/loc
USER=dsadm
AUTHSTATE=compat
DEFAULT_BROWSER=netscape
SHELL=/usr/bin/ksh
DropPointPath=\Pmuryeafsq01pmespenddata-dv
DSHOME=/ascential/datastage/70/UND/Ascential/DataStage/DSEngine
ODMDIR=/etc/objrepos
DB2DSN=RHDB2T
HashFilePath=/ascential/datastage/70/d01/SalesVolume
SYBASEPassword=Ops,Edge0
FTPServerName=CPUE.RYE.US.PM.COM
DS_START_LOG=/ascential/datastage/70/UND/DS_START.log
ODBCINI=/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/.odbc.ini
HOME=/ascential/datastage/70/UND
DB2INSTANCE=db2pmutc
TERM=
LD_LIBRARY_PATH=:/db2/db2pmutc/sqllib/lib:/oracle/usa/9.2.0/lib:/db2/db2pmutc/sqllib/lib:/oracle/usa/9.2.0/lib
ORACLE_HOME=/oracle/usa/9.2.0
OracleServerFrictionless=ID13.WORLD
THREADS_FLAG=native
DB2Password=use $ENV
PWD=/ascential/datastage/70/UND/Ascential/DataStage/DSEngine
RFC_TRACE_DIR=/ascential/datastage/70/UND/Ascential/DataStage/DSBWConnections/LOG
TZ=EST5EDT
OracleServer=ID28.WORLD
SourceSystem=DSDEV
SeqFilePath=/ascential/datastage/70/d01/SalesVolume
DB2LoginID=ETL999R
OracleLoginID=ETL_APP
OracleLoginIDETQ=ETL_APP
INSTHOME=/db2/db2pmutc
DS_USERNO=-22429
WHO=SalesVolume
BELL=^G
FLAVOR=-1
LIBPATH=usr/opt/db2_08_01/lib:/ascential/datastage/70/UND/Ascential/DataStage/branded_odbc/lib:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/lib:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/uvdlls:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/java/jre/bin/classic:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/java/jre/bin::/oracle/usa/9.2.0/lib32:/oracle/usa/9.2.0/rdbms/lib32:/usr/lib
FSIFilePath=/ascential/datastage/70/d02/FSI
ORACLE_SID=ID28.WORLD
ScriptFilePath=/ascential/datastage/70/d01/SalesVolume/Scripts
LUPath=/ascential/datastage/70/d02/PMCS/LU
DataSetPath=/ascential/datastage/70/d02/PMCS/DataSets
StagePath=/ascential/datastage/70/d02/PMCS/Staging
DS_ENABLE_RESERVED_CHAR_CONVERT=0
DS_TDM_PIPE_OPEN_TIMEOUT=720
DS_TDM_TRACE_SUBROUTINE_CALLS=0
WaitForFileTest..JobControl (DSWaitForFile): File '/ascential/datastage/70/d02/test.txt' is already present
WaitForFileTest..JobControl (@Execute_Command_1): Executed: mv #Path#/OldFile# #Path#/test.arc
Reply=1
Output from command ====>
Usage: mv [-i | -f] [--] src target
or: mv [-i | -f] [--] src1 ... srcN directory
Finished Job WaitForFileTest.
why do you think the commad is not working
well the command i have given is
mv #Path#/OldFile# #Path#/#NewFile#
and i have also given the default values of these parameters in the job parameter
can somebody please help me witht this issue
Thanks in advance
to test what i did was i used wairforfile and then execute command. i created a dummy file called test.txt
and i ran for job where in the wait for file checks is test.txt is already present . as it was it triggered the execute command activity.
and the job ran successfully . but it doesnt seem to have created test.arc and neither dropped the file test.txt.
the log read as follows
Starting Job WaitForFileTest.
DropPath = /ascential/datastage/70/d02
OldFile = test.txt
NewFile = test.arc
Environment variable settings:
_=/usr/bin/nohup
BWInstance=UND
LANG=en_US
LOGIN=dsadm
OraclePassword=apr7671
Project=SalesVolume
OraclePasswordETQ=apr7671
APT_ORCHHOME=/ascential/datastage/70/UND/Ascential/DataStage/PXEngine
MSAFilePath=/ascential/datastage/70/data
RFC_TRACE=0
SYBASEHost=pm602.rncpmu.com,2025
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java130/jre/bin:/usr/java130/bin:/db2/db2pmutc/sqllib/bin:/db2/db2pmutc/sqllib/adm:/db2/db2pmutc/sqllib/misc:/oracle/usa/9.2.0/bin:/usr/opt/db2_08_01/bin:/db2/db2pmutc/sqllib/bin:/db2/db2pmutc/sqllib/adm:/db2/db2pmutc/sqllib/misc:/oracle/usa/9.2.0/bin:/usr/opt/db2_08_01/bin:/usr:/usr/vacpp:/usr/vacpp/bin
DB2DIR=/usr/opt/db2_08_01
DB2Host=RHDB2T
OracleServerETQ=ID28.WORLD
LC__FASTMSG=true
DSSAPHOME=/ascential/datastage/70/UND/Ascential/DataStage
OracleLoginIDFrict=ETL_APP
LOGNAME=shettas
SYBASELogonID=OPSEDGEID
LOCPATH=/usr/lib/nls/loc
USER=dsadm
AUTHSTATE=compat
DEFAULT_BROWSER=netscape
SHELL=/usr/bin/ksh
DropPointPath=\Pmuryeafsq01pmespenddata-dv
DSHOME=/ascential/datastage/70/UND/Ascential/DataStage/DSEngine
ODMDIR=/etc/objrepos
DB2DSN=RHDB2T
HashFilePath=/ascential/datastage/70/d01/SalesVolume
SYBASEPassword=Ops,Edge0
FTPServerName=CPUE.RYE.US.PM.COM
DS_START_LOG=/ascential/datastage/70/UND/DS_START.log
ODBCINI=/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/.odbc.ini
HOME=/ascential/datastage/70/UND
DB2INSTANCE=db2pmutc
TERM=
LD_LIBRARY_PATH=:/db2/db2pmutc/sqllib/lib:/oracle/usa/9.2.0/lib:/db2/db2pmutc/sqllib/lib:/oracle/usa/9.2.0/lib
ORACLE_HOME=/oracle/usa/9.2.0
OracleServerFrictionless=ID13.WORLD
THREADS_FLAG=native
DB2Password=use $ENV
PWD=/ascential/datastage/70/UND/Ascential/DataStage/DSEngine
RFC_TRACE_DIR=/ascential/datastage/70/UND/Ascential/DataStage/DSBWConnections/LOG
TZ=EST5EDT
OracleServer=ID28.WORLD
SourceSystem=DSDEV
SeqFilePath=/ascential/datastage/70/d01/SalesVolume
DB2LoginID=ETL999R
OracleLoginID=ETL_APP
OracleLoginIDETQ=ETL_APP
INSTHOME=/db2/db2pmutc
DS_USERNO=-22429
WHO=SalesVolume
BELL=^G
FLAVOR=-1
LIBPATH=usr/opt/db2_08_01/lib:/ascential/datastage/70/UND/Ascential/DataStage/branded_odbc/lib:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/lib:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/uvdlls:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/java/jre/bin/classic:/ascential/datastage/70/UND/Ascential/DataStage/DSEngine/java/jre/bin::/oracle/usa/9.2.0/lib32:/oracle/usa/9.2.0/rdbms/lib32:/usr/lib
FSIFilePath=/ascential/datastage/70/d02/FSI
ORACLE_SID=ID28.WORLD
ScriptFilePath=/ascential/datastage/70/d01/SalesVolume/Scripts
LUPath=/ascential/datastage/70/d02/PMCS/LU
DataSetPath=/ascential/datastage/70/d02/PMCS/DataSets
StagePath=/ascential/datastage/70/d02/PMCS/Staging
DS_ENABLE_RESERVED_CHAR_CONVERT=0
DS_TDM_PIPE_OPEN_TIMEOUT=720
DS_TDM_TRACE_SUBROUTINE_CALLS=0
WaitForFileTest..JobControl (DSWaitForFile): File '/ascential/datastage/70/d02/test.txt' is already present
WaitForFileTest..JobControl (@Execute_Command_1): Executed: mv #Path#/OldFile# #Path#/test.arc
Reply=1
Output from command ====>
Usage: mv [-i | -f] [--] src target
or: mv [-i | -f] [--] src1 ... srcN directory
Finished Job WaitForFileTest.
why do you think the commad is not working
well the command i have given is
mv #Path#/OldFile# #Path#/#NewFile#
and i have also given the default values of these parameters in the job parameter
can somebody please help me witht this issue
Thanks in advance
Well for some reason its not taking the parameter names. You are also missing a hash sign before OldFile. Fix that.sshettar wrote:WaitForFileTest..JobControl (@Execute_Command_1): Executed: mv #Path#/OldFile# #Path#/test.arc
Reply=1
Output from command ====>
Usage: mv [-i | -f] [--] src target
or: mv [-i | -f] [--] src1 ... srcN directory
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Well, there's one obvious problem - assuming this accurately represents what is in your job, you are missing a 'hash' or 'pound' sign:sshettar wrote:mv #Path#/OldFile# #Path#/#NewFile#
Code: Select all
mv #Path#/#OldFile# #Path#/#NewFile#
The other issue is the fact that some versions of DataStage are broken in that regard. The Execute Command stage just plain ol' doesn't take parameters in that case, no matter how properly you do things. What exact version are you running?
If that's the case, you'll need to switch to a Routine Acitivity stage, pass in your parameters there and leverage the 'DSExecute' function to accomplish this.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
well in the execute_command stage , in exeCommand tab under command i have given this command
mv #Path#/#OldFile# #Path#/#NewFile#
and in the parameter i have not given anything .
instead in the job parameter of the entire sequence i have defined the parameters for Path
OldFIle, NewFile
Please correct if i am wrong
and the version of DS i'm using is 7.0
and also could somebody guide me in using the routine activity stage instead.
mv #Path#/#OldFile# #Path#/#NewFile#
and in the parameter i have not given anything .
instead in the job parameter of the entire sequence i have defined the parameters for Path
OldFIle, NewFile
Please correct if i am wrong
and the version of DS i'm using is 7.0
and also could somebody guide me in using the routine activity stage instead.