Page 1 of 1

Datastage import(XML): Problem with CRLF line terminators

Posted: Fri Jul 21, 2006 3:47 am
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

Posted: Fri Jul 21, 2006 4:03 am
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

..........................

Posted: Fri Jul 21, 2006 4:29 am
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.

Posted: Fri Jul 21, 2006 4:42 am
by mouni
yup...

I exported it to XMLTest.xml, and imported using Import->DS Components (XML) as you have mentioned

Posted: Fri Jul 21, 2006 6:30 am
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? :?

Posted: Fri Jul 21, 2006 6:47 am
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 :)

Posted: Fri Jul 21, 2006 7:01 am
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.