Error while passing output value from Command Execute stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dh_Madhu
Premium Member
Premium Member
Posts: 65
Joined: Sat Apr 23, 2005 3:19 am
Location: Stirling, Scotland

Error while passing output value from Command Execute stage

Post by dh_Madhu »

Guys,
I execute a 'cat' using the command execute stage and pass the command output value to the job parameter thro' a job activity stage.
The file actually contains a timestamp.
But I get an error saying Error calling DSSetParam(LastRunDateTime), code=-4
[ParamValue/Limitvalue is not appropriate]
I tried concatinating the strings to it in vain.
Please suggest another way of doing this.

Thanks in advance.
Regards,
Madhu Dharmapuri
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

The parameter value contains a new line character that gets converted to field marker. You need to get rid of that. One way is to specify the following in the the job activity while supplying the jobparameter:

Code: Select all

CONVERT(@FM, "", Execute_Command_Stage.$Command_Output)
Now instead of Execute_Command_Stage.$Command_Output, you have performed a CONVERT() function on it which will get rid of the @FM character.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
dh_Madhu
Premium Member
Premium Member
Posts: 65
Joined: Sat Apr 23, 2005 3:19 am
Location: Stirling, Scotland

Post by dh_Madhu »

Great! It worked!!
Thanks DSguru
Regards,
Madhu Dharmapuri
Post Reply