Page 1 of 1

External Source stage

Posted: Mon Mar 30, 2009 11:47 pm
by vasubabu
Hi,

i am using the external source stage for two different things.
1.to extract the XML file(using ls command)
2.to get the file/dataset count.(using dsrecords function)
But i am getting the errors like this.

Error occurred during initializeFromArgs().
<External_Source_1> Invalid data source specified: Invalid hostname: dsrecords E.(here file is in E drive)
Creation of a step finished with status = FAILED.

Can anybody look at this and give me the solution for the above mentioned two scenarios

Regards,
vasu

Posted: Tue Mar 31, 2009 7:06 am
by chulett
:? So... one stage doing both things at once? Two stages? The former would be a problem. For #2 you'd need to post the syntax you are using for anyone to be able to help.

Posted: Tue Mar 31, 2009 7:10 am
by chulett
:idea: Assuming your syntax for 'dsrecords' is wrong, you might want to search the forums for the proper syntax. For example, this post is one of many that came up for me when I searched.

Re: External Source stage

Posted: Tue Mar 31, 2009 8:35 am
by BugFree
Are you using dsrecords function to get the count from the file :? :?: I thought this function only relates to DataSet :oops: .

Posted: Wed Apr 01, 2009 1:31 am
by vasubabu
i am using for each(dataset count and xml file extract) operation different external source stage.
********************
My syntax is like this for xml extract using external source stage

Source Method=Specific Programs
Source program=ls #XMLFilePathName#/#XMLFileName#

And Format tab
Final delimeter=end

and column is xmldoc vachar 2000

In xmlinput stage i have selected the option as XMLDocument.

***********************
For dataset count

Source program=dsrecords #FilePathName#/#FileName#.ds
**************
Please check the above options i have set and correct me if i am wrong.

Posted: Wed Apr 01, 2009 5:05 am
by eostic
Does it work when you hard code the values?

Exactly what values are you using?

Ernie

Posted: Wed Apr 01, 2009 5:41 am
by vasubabu
Sorry i did not get your question.
do you mean the parameters.
even if i use the values instead of parameters i am getting the same error.

Posted: Wed Apr 01, 2009 6:27 am
by eostic
Right...can you send us the exact values that you are using that fail. thx.

Posted: Wed Apr 01, 2009 8:23 am
by chulett
vasubabu wrote:In xmlinput stage i have selected the option as XMLDocument.
But seeing as how you're not sending in the contents of the document but rather just the path to it, you need to set that to "URL/File path" instead.

Posted: Wed Apr 01, 2009 10:45 am
by lstsaur
Vasu,
From your External_Source stage, check to see whether you are able to view data. If you cannot even view the data, then it has something to do with your "ls" command is not working correclty in Windows env.

Posted: Thu Apr 02, 2009 2:07 am
by vasubabu
when i am trying to view the data only i am getting the error mentioned in the very begining.
but ls command is working when i try in the command prompt.

Posted: Thu Apr 02, 2009 2:41 am
by Sainath.Srinivasan
Check your PATH.

Try a simple Unix command from DataStage.

Posted: Thu Apr 02, 2009 7:16 am
by vasubabu
for any unix or Dos command i am getting the same error.
Or
any other options to extract the xml file
and to get the dataset count?