Page 2 of 3

Posted: Sun Jan 21, 2007 12:26 am
by chulett
No, you got it. Our own little game show. :wink:

Posted: Sun Jan 21, 2007 12:31 am
by swades
You were supposed to 'type' the file, not try to execute it.
I am typing complete file path in COMMAND block of Execute Command

Posted: Sun Jan 21, 2007 12:36 am
by DSguru2B
No. you need to put the word 'type' before the path and file name. 'type' is the dos command to spit out the contents of the file onto the screen.

Posted: Sun Jan 21, 2007 1:05 am
by swades
Thank you very much for responce
I passed

type /demo/....../filename.txt but still it is giving me following massage:

k_ren..JobControl (@Execute_Command_2): Command type /demo/....../filename.txt did not finish OK,
reply = '1'

AND

Message:
k_ren..JobControl (@Job_Activity_7): Controller problem: Error calling DSSetParam(Return), code=-4
[ParamValue/Limitvalue is not appropriate]

Thanks in advance

Posted: Sun Jan 21, 2007 1:11 am
by DSguru2B
Try the 'type filename.txt' from command prompt. See if it works ok from there. Lets try to fix your first problem first. Second should go away on its own, once your get your command activity working.

Posted: Sun Jan 21, 2007 2:04 am
by swades
Try the 'type filename.txt' from command prompt


I dont have UNIX command prompt. BUT I am passing the same path which I used while generating flat file.

Posted: Sun Jan 21, 2007 9:15 am
by chulett
Who said anything about UNIX? It says 'command prompt', that's a generic expression for your operating system. I guess for Windows, working outside the GUI is becoming a lost art...

Click on 'Start', then 'Run...'. In the Run box put cmd and click OK, that will get you a command prompt, a.k.a a DOS prompt. Try it there. You are typing the actual full pathname to the file and not that version with six dots in the middle you keep posting, right? :?

This is not a valid pathname: /demo/....../filename.txt

Your second error message is a direct consequence of the first error. You didn't get a valid value back from your routine and the Sequence job was busted for passing in a value that was 'not appropriate'. Fix one and fix the other.

Posted: Sun Jan 21, 2007 11:02 am
by DSguru2B
chulett wrote: Fix one and fix the other.
Thats right, two birds with one arrow. :wink:

Posted: Sun Jan 21, 2007 11:39 am
by swades
Thanks for that

Now I am getting following massage:
Message:
k_ren..JobControl (@Job_Activity_7): Controller problem: Error calling DSSetParam(Return), code=-4
[ParamValue/Limitvalue is not appropriate]

Can you help me ? please ?

Posted: Sun Jan 21, 2007 11:41 am
by DSguru2B
What is the number in the file?
When you did 'type yourfilename' from the dos prompt, what did you see, did you see the contents of your file?
What have you set the parameter type in your second job? Is it set as string?

Posted: Sun Jan 21, 2007 12:15 pm
by swades
Number is 35.
Jobparameter type is integer.

Posted: Sun Jan 21, 2007 12:41 pm
by DSguru2B
Inside the jobactivity, where your specifying $CommandOutput, provide the following

Code: Select all

Field(Execute_Command_2.$CommandOutput,@FM,1)
OR simply

Code: Select all

Execute_Command_2.$CommandOutput<1>

Posted: Sun Jan 21, 2007 12:49 pm
by swades
Yes :D It is done. I used 1st code and Job run successfully.
Thank you very much for the help.

Can you tell me why we need this ?

Thanks a lot

Posted: Sun Jan 21, 2007 1:12 pm
by DSguru2B
The output is in the form of a dynamic array with other contents in it. They are seperated by a field marker (@FM). We are only concerned with the contents of the first field. The first code in my previous post extracts everything before the first @FM. The second code extracts the contents of the first field in the dynammic array.

Posted: Sun Jan 21, 2007 1:41 pm
by ray.wurlod
The output from the command contains line terminators. So that a single string can be returned infallibly, DataStage converts the line termintators to field marks (which can be represented by the @FM system variable).