External Source 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
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

External Source stage

Post 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
VASU..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BugFree
Participant
Posts: 82
Joined: Wed Dec 13, 2006 6:02 am

Re: External Source stage

Post by BugFree »

Are you using dsrecords function to get the count from the file :? :?: I thought this function only relates to DataSet :oops: .
Ping me if I am wrong...
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

Post 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.
VASU..
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Does it work when you hard code the values?

Exactly what values are you using?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

Post 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.
VASU..
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Right...can you send us the exact values that you are using that fail. thx.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post 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.
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

Post 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.
VASU..
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Check your PATH.

Try a simple Unix command from DataStage.
vasubabu
Participant
Posts: 153
Joined: Wed Jan 25, 2006 2:38 am

Post 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?
VASU..
Post Reply