Datastage import(XML): Problem with CRLF line terminators

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
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

Datastage import(XML): Problem with CRLF line terminators

Post by mouni »

Hi,

My Datastage server is running on Win 2003, and client on WinXP. I exported one of the DS project in XML format to Desktop. When I tried to import the same into a different project I got the error pop-up message iven below:

File C:\Documents and Settings\Administrator\Desktop\$XML2DSX.dsx does not appear to be a valid DataStage export file or is from an incompatible release.

A valid DataStage export file is expected to be in Windows format (i.e. using CRLF line terminators).



I think the intermediate DSX file being created by DS during import from xml file doesn't have CRLF line terminators.

I searched the forum for this and found few similar problems but none of them were related to XML importing and hence was not of much help.

Please help.

Cheers
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

Post by mouni »

Some more info: This is how the header looks in XML

<DSExport>
<Header CharacterSet="CP1252" ExportingTool="Ascential DataStage Export (External)" ToolVersion="4" ServerName="127.0.0.1" ToolInstanceID="TestDM" Date="2006-07-21" Time="15.30.01" ServerVersion="7.5.1.A" ClientInstallPath="C:\Program Files\Ascential\DataStage7.5.1"/>
<Job Identifier="XMLtest" DateModified="2006-07-21" TimeModified="13.05.08">


This is how it looks in $XML2DSX.dsx intermediate file created from XML during import

<HTML>
<BODY>
<PRE>

BEGIN HEADER
CharacterSet "CP1252"
ExportingTool "Ascential DataStage Export (External)"
ToolVersion "4"
ServerName "127.0.0.1"
ToolInstanceID "TestDM"
MDISVersion "1.0"
Date "2006-07-21"
Time "15.30.01"
END HEADER

..........................
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Did you gave the extension as .dsx? It should normally have .xml.
And while import there is a option "Datastage Components (XML).." Chose that.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

Post by mouni »

yup...

I exported it to XMLTest.xml, and imported using Import->DS Components (XML) as you have mentioned
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Biggest question to me is - why do the export in XML? Unless you are doing something 'special' with the exported file, stick with the dsx format. Saves you time because, as you've seen, it first needs to convert the xml file to a dsx file before it can import it. Why add all that overhead to your process for no good reason? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mouni
Charter Member
Charter Member
Posts: 49
Joined: Tue Jul 11, 2006 11:30 pm

Post by mouni »

actually I will be processing this XML at a later stage by an external application :D .... so this is a requirement ....

Well, after breaking my head after lunch, I got a solution for this which is a kind of workaround.

The solution is as follows:

During exporting in XML format, select "Output Internal Value" in XML tab, and do not select "Output as externalized strings".

But the question still remains unanswered of what was the problem when I use "Output as externalized strings". Anywayz I think I can manage with this.

Thanks all of you for your comments :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Interesting... what few times I've done an XML export I've never changed it from the default of 'Output internal (stored) values'. Perhaps some sort of issue with the 'localization' it does 'where appropriate' according to the help.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply