Problem with execute_command activity
Moderators: chulett, rschirm, roy
sshettar wrote: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 .
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Well i'm not able to find the DSExecute function in the routine actuvity stage.
all i can see in DS is DSSendMail, DsSendMailTester,DSJobReport,DSRoutineChecker
Well i can see ExeSH, i tried using this function but doesnt seem to work
i have passes the argument as Command
where in , in the job parameter i have defined Command to be the entire statement ie mv ascential/dastage/70/d02/test.txt ascential/datastge/70/d02/test.arc
in the log it says
WaitForFileTest..JobControl (ExecSH): Executed command: mv /ascential/datastage/70/d02/test.txt /ascential/datastage/70/d02/test.arc
*** No output from command ***
help needed please
Thanks in advance
all i can see in DS is DSSendMail, DsSendMailTester,DSJobReport,DSRoutineChecker
Well i can see ExeSH, i tried using this function but doesnt seem to work
i have passes the argument as Command
where in , in the job parameter i have defined Command to be the entire statement ie mv ascential/dastage/70/d02/test.txt ascential/datastge/70/d02/test.arc
in the log it says
WaitForFileTest..JobControl (ExecSH): Executed command: mv /ascential/datastage/70/d02/test.txt /ascential/datastage/70/d02/test.arc
*** No output from command ***
help needed please
Thanks in advance
DSExecute() is a Basic command and not a routine. You have to encapsulate it in a routine. Do a search on it to find examples.
When you put the entire path of the two files, does the file get renamed?
How in the world can you be on 7.0 px engine and sitting on windows ???
When you put the entire path of the two files, does the file get renamed?
How in the world can you be on 7.0 px engine and sitting on windows ???
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
That all looks fine. What makes you think it didn't work? There is no 'output from command' when it works properly - it just renames the file. You only get output when it fails. Did you check your actual file?sshettar wrote:WaitForFileTest..JobControl (ExecSH): Executed command: mv /ascential/datastage/70/d02/test.txt /ascential/datastage/70/d02/test.arc
*** No output from command ***
![Confused :?](./images/smilies/icon_confused.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
If you've checked and the file still isn't renamed, then you are a victim of the bug I mentioned earlier. It's hard to track down because everything gets translated properly in the log but the actual command run still has the '#'s in it.
You'll need to pursue the Routine Activity route. Or upgrade.
You'll need to pursue the Routine Activity route. Or upgrade.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Well the Routine Activity is working fine now .
But now i want to come up with a little more flexible job . as in i want to parameterize the command so that i can run the same job in order to execute the same task for different files
ie i am using routine activity stage and using ExeSH
this pops up one argument which i al already told u i have given the value as Command
and in the job parameter i have given the entire command as defualt value of command parameter
ie mv ascential/datastage/70/d02/test.txt ascential/datastage/70/d02/test.arc.
now i want to make this path and the old file n new file name as parameter so that i can use this same job sequence for different files.
help needed please
Thanks
Shalini
But now i want to come up with a little more flexible job . as in i want to parameterize the command so that i can run the same job in order to execute the same task for different files
ie i am using routine activity stage and using ExeSH
this pops up one argument which i al already told u i have given the value as Command
and in the job parameter i have given the entire command as defualt value of command parameter
ie mv ascential/datastage/70/d02/test.txt ascential/datastage/70/d02/test.arc.
now i want to make this path and the old file n new file name as parameter so that i can use this same job sequence for different files.
help needed please
Thanks
Shalini
Well the Routine Activity is working fine now .
But now i want to come up with a little more flexible job . as in i want to parameterize the command so that i can run the same job in order to execute the same task for different files
ie i am using routine activity stage and using ExeSH
this pops up one argument which i al already told u i have given the value as Command
and in the job parameter i have given the entire command as defualt value of command parameter
ie mv ascential/datastage/70/d02/test.txt ascential/datastage/70/d02/test.arc.
now i want to make this path and the old file n new file name as parameter so that i can use this same job sequence for different files.
help needed please
Thanks
But now i want to come up with a little more flexible job . as in i want to parameterize the command so that i can run the same job in order to execute the same task for different files
ie i am using routine activity stage and using ExeSH
this pops up one argument which i al already told u i have given the value as Command
and in the job parameter i have given the entire command as defualt value of command parameter
ie mv ascential/datastage/70/d02/test.txt ascential/datastage/70/d02/test.arc.
now i want to make this path and the old file n new file name as parameter so that i can use this same job sequence for different files.
help needed please
Thanks
You both dont have to post the same post twice.
Anywho, build a routine. Pass your parameters as arguments. This way it can be used for any number of files. And how are you running a routine in ExecSH. Or you mean your just running the mv command in after job subroutine 'ExecSH'.
Anywho, build a routine. Pass your parameters as arguments. This way it can be used for any number of files. And how are you running a routine in ExecSH. Or you mean your just running the mv command in after job subroutine 'ExecSH'.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
If the issue is the parameter, are you sure you are assigning the prarameter correctly? Hope you know that its case sensitive. Use click option to assign parameter.
If you are all sure about that, to check the value, try "echo #parameter#" and check for output in log.
If you are all sure about that, to check the value, try "echo #parameter#" and check for output in log.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Put just mv in the Command field of the Execute Command activity.
Put the remainder of the mv command in the Parameters field of the Execute Command activity.
Put the remainder of the mv command in the Parameters field of the Execute Command activity.
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.
shettar,
i had a similar situation. i had to remeove the files from a sepcific path and i using rm -rf #$jpjobParameter#. ( i was passing this #$jpjobparameter# in the paramter , which is beneath the command )
this scenario did not work for me
then , i tired to the entire thing rm -rf /apps/..../......./ in the command itself and it worked.
hope u can try this or else you can execute a script here so that you can move your files from the old path to the new path
thanks
sudharma
i had a similar situation. i had to remeove the files from a sepcific path and i using rm -rf #$jpjobParameter#. ( i was passing this #$jpjobparameter# in the paramter , which is beneath the command )
this scenario did not work for me
then , i tired to the entire thing rm -rf /apps/..../......./ in the command itself and it worked.
hope u can try this or else you can execute a script here so that you can move your files from the old path to the new path
thanks
sudharma