iam facing an issue with the EXEC COMMMAND ACTIVITY,my reqirement is just capture the date value from a file and pass these value to next job as a paramter.i design a job like EXECUTE_COMMAND_ACTIVITY------>JOB_ACTIVITY .in execute command activity i define ccommand as
The output of the "more" command most likely contains more than just the filename, it will also have a linefeed. Use "echo" on the return value to see what it contains, then you can parse out the actual filename with a SUBSTR() or FIELD() command.
Simplest way to find out is to try it... what happens? $CommandOutput will capture anything the command writes to standard out, i.e. outputs to the 'screen'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
The $CommandOutput activity variable will include the output of the command (that is, by default, stdout) with all line terminator characters converted to field mark characters.
A field mark character can be represented in a DataStage expression using the @FM system variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett wrote:Simplest way to find out is to try it... what happens? $CommandOutput will capture anything the command writes to standard out, i.e. outputs to the 'screen'. ...
i tried but it returns the value -1 instead of chh
You need to remove field characters when setting job parameters.[/quote]
hi ,
thanks for your reply,finally i got a solution.i need a one more clarification why we need to use a field function ,when pass the out put result value as a paramter.
The $CommandOutput activity variable will include the output of the command (that is, by default, stdout) with all line terminator characters converted to field mark characters.
A field mark character can be represented in a DataStage expression using the @FM system variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.