mv Unix command is not working in EC stage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
bala.vimalan
Participant
Posts: 3
Joined: Fri Jun 27, 2014 1:49 am

mv Unix command is not working in EC stage

Post by bala.vimalan »

mv Unix command is not working in EC stage (Execute Command), When I pass the paramater which I have calculated in another EC stage prior to mv command.

Prior EC stage Output :20141029065539

Command : mv
parameter : /u01/apps/DS_PROJ_DATA/AST_FUSION_DEV/LoadFiles/MIRF_Reject.txt /u01/apps/DS_PROJ_DATA/AST_FUSION_DEV/LoadFiles/MIRF_#EC_Timestamp.$CommandOutput#.txt

Error :

mv /u01/apps/DS_PROJ_DATA/AST_FUSION_DEV/LoadFiles/MIRF_Reject.txt /u01/apps/DS_PROJ_DATA/AST_FUSION_DEV/LoadFiles/MIRF_20141029065539
Reply=.txt
Output from command ====>
-1
------------
Bala
IBM India

One More Try Before Can't.
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Try with this derivation in EC stage which generates YYYYMMDDHHMMSS.
Convert(@FM,'',Execute_Command_3.$CommandOutput)
bala.vimalan
Participant
Posts: 3
Joined: Fri Jun 27, 2014 1:49 am

Post by bala.vimalan »

Thank you for the prompt reply Vinoth. It has worked. :)
I will mark it as resolved.
------------
Bala
IBM India

One More Try Before Can't.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do you have any idea what it is doing and why it worked?

People, don't just hand out code - at the very least explain what it is you are handing out as well. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply