Call DSExecute("NT","D:\cygwin\bin\bash.exe --login -c '/cygdrive/d/Ram/script/CheckFile.sh NXRP_CBD'", Output, SystemReturnCode)
The script returns the filename which starts with 'NXRP_CBD'
How to assign the 'Output' to the job parameter.
I tried this code. But this did not work
ErrCode = DSSetParam(hJob1, "SOURCE_FILE_NAME",Output)
But when i printed the Output to log it shows the filename correctly. but it did not set the parameter
When i tried the same thing in a job sequence, the following error message came in the log
Ctrl_Job..JobControl (@Execute_Command_4): Executed: D:\cygwin\bin\bash.exe --login -c '/cygdrive/d/Ram/script/CheckFile.sh NXRP_CBD'
Reply=0
Output from command ====>
NXRP_CBD_AVL_DTL.txt
Ctrl_Job..JobControl (@Job_Activity_1): Controller problem: Error calling DSSetParam($SOURCE_FILE_NAME), code=-4
[ParamValue/Limitvalue is not appropriate]
Please help me solve this
Assigning the output of DSExecute command to job Parameter
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 68
- Joined: Sat Feb 05, 2005 4:59 am
- Location: India
ErrCode = DSSetParam(hJob1, "SOURCE_FILE_NAME",Output)
First things first - are you trying to set the value of the parameter for "this" job itself.
If you're setting the parameter of a job that u wud be calling then ur code looks fine ...
U cant set the parameter for the calling job from its Job control.
First things first - are you trying to set the value of the parameter for "this" job itself.
If you're setting the parameter of a job that u wud be calling then ur code looks fine ...
U cant set the parameter for the calling job from its Job control.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
I recommend you make a routine that returns the value and call it from a sequence job via the UserVariables activity stage. It can then be passed as a job parameter into any job joined via a path of links to the UserVariables stage.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
The error is cleared thanks
The actual problem is the output is delimited with the @FM character. so i replaced that character with null. then it worked fine
DSSetParam("SOURCE_FILE_NAME",convert(char(254),"",Output));
Thanks
DSSetParam("SOURCE_FILE_NAME",convert(char(254),"",Output));
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No you didn't. You replaced it with a zero-length string. This is not the same as null.
Null is "unknown". To replace with null you would have used the system variable @NULL, and rendered your result unusable.
Null is "unknown". To replace with null you would have used the system variable @NULL, and rendered your result unusable.
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.