I'm having problems with passing a string parameter from a job sequence into a parallel job.
The value I want to pass is obtained from a file in the AIX file system, so I'm trying to use an Execute Command activity, whose output is the required parameter value.
So far so good, the Execute Command Activity works fine and the output is as expected (in fact, a string representation of a date: 12.09.2005)
The problem comes when I try to add a Job Activity and to populate the job parameter TESTDATE with the expression Execute_Command_1.$CommandOutput.
I get the error:
CallParamTest..JobControl (@Job_Activity_0): Controller problem: Error calling DSSetParam(TESTDATE), code=-4
[ParamValue/Limitvalue is not appropriate]
I do have a workaround, which is to replace the simple expression Execute_Command_1.$CommandOutput with the complex one OConv(IConv(Execute_Command_1.$CommandOutput,"D4.DMY[2,2,4]"),"D.DMY[2,2,4]")
But that shouldn't do anything except waste a few CPU cycles, should it? It's just taking my string input, converting it to an internal representation and then back to a string in the same format, isn't it? Plus, it wouldn't work if my string parameter didn't happen to be a date.
Any ideas?
Problems with Job Parameters and Sequence Job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Typically a command output has leading and trailing line terminator characters that you need to strip off.
Try using Trim() or Convert() function to remove all Char(10) characters.
Try using Trim() or Convert() function to remove all Char(10) characters.
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.
Thanks Ray. Your suggestion was certainly on the right lines. Not sure what the character in question is (not Char(10) apparently), but it's at the end of the string, so I can strip it off using an expression likeray.wurlod wrote:Typically a command output has leading and trailing line terminator characters that you need to strip off.
Try using Trim() or Convert() function to remove all Char(10) characters.
Code: Select all
Execute_Command_1.$CommandOutput[1,len(Execute_Command_1.$CommandOutput)-1]
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 24
- Joined: Mon Mar 14, 2005 6:42 pm
- Location: Minneapolis, Minnesota
You guys ROCK!!! I had the exact same problem and your Convert fixed it. THANK YOU! :DRobJ wrote:Yup, that's it. Convert(@FM,"",Execute_Command1.$CommandOutput) gives mewhat I need. Thanks.ray.wurlod wrote:Sometimes the line termination character is converted to a field mark (@FM, or Char(254)) as part of being captured.
Command Output
ray.wurlod wrote:Sometimes the line termination character is converted to a field mark (@FM, or Char(254)) as part of being captured.
Thanks a million....you saved me hours. Your the Man!
Lance Short
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."