Page 1 of 1

How to read .req file in datastage

Posted: Mon Dec 26, 2011 7:46 am
by deepa.y
Hi,
I am new to datastage and i would like to know whether it is possible to read .req file using datastage which contains some
standard data regarding transaction request and xml data in it?. Or do we need to seperate them to different files before reading using datastage ?

I am pasting some sample data from the file

[timestamp]
RequestTimeEx=2011-12-21T01:27:07.233125Z
RequestEndTimeEx=2011-12-21T01:27:07.233125Z

[privacy]
response|body|@1=Key00001|9|@|EAAAAEOGDqRXcCWtjpMD1JauU/M=

[urlfield]
<
xml version="1.0" encoding="utf-8"
>%0a<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelop ... sageHeader xmlns="http://csi.cingular.com/CSI/Namespaces/ ... Header.xsd" xmlns:cin="http://csi.cingular.com/CSI/Namespaces/ ... l.xsd">%0a <TrackingMessageHeader>%0a <cin:version>v52</cin:version>%0a <cin:messageId>GetTnOrderListTmCALLID=2049-55-12202011-192645342.tipi111|</cin:messageId>%0a <cin:dateTimeStamp>2011-12-21T01:27:07.128Z</cin:dateTimeStamp>%0a </TrackingMessageHeader>%0a <SecurityMessageHeader>%0a <cin:userName>easlivr</cin:userName>%0a <cin:userPassword>DR2j25Mua</cin:userPassword>%0a </SecurityMessageHeader>%0a <SequenceMessageHeader>%0a <cin:sequenceNumber>1</cin:sequenceNumber>%0a <cin:totalInSequence>1</cin:totalInSequence>%0a </SequenceMessageHeader>%0a</MessageHeader>%0a</SOAP-ENV:Header>%0a<SOAP-ENV:Body>%0a<InquireWirelineOrderDetailsRequest xmlns="http://csi.cingular.com/CSI/Namespaces/ ... equest.xsd" xmlns:cin="http://csi.cingular.com/CSI/Namespaces/ ... l.xsd">%0a <mode>LIST</mode>%0a <ServiceRequestSearchKey>%0a <cin:telephoneNumber>3178557037</cin:telephoneNumber>%0a </ServiceRequestSearchKey>%0a <statusType>BOTH</statusType>%0a <serviceRequestInfoType>ORDER_STATUS</serviceRequestInfoType>%0a <ServiceCenter>%0a <cin:serviceCenter>ASI</cin:serviceCenter>%0a </ServiceCenter>%0a <PostedDateRange>%0a <cin:start>2011-12-06-06:00</cin:start>%0a <cin:end>2011-12-20-06:00</cin:end>%0a </PostedDateRange>%0a <maxResultsSize>5000</maxResultsSize>%0a</InquireWirelineOrderDetailsRequest>%0a</SOAP-ENV:Body>%0a</SOAP-ENV:Envelope>%0a

[cookies]
TLT_NumCookies=0

Posted: Mon Dec 26, 2011 8:12 am
by chulett
Interesting... what do you need from the file - just the XML data or all of the information? And I'm assuming the XML needs to be parsed as well, yes? Also, your sample shows several records but I'm curious if the XML is all on one line (all in one record) or is it split across several lines?

Posted: Tue Dec 27, 2011 2:45 am
by deepa.y
I need all the data xml as well as other standard data.And xml need to be parsed.all the records in xml are required.

Posted: Tue Dec 27, 2011 3:07 am
by Kirtikumar
Using some basic scripting = head, tail and grep, you could split the file into non XML and XML first. Then non XML with flat file and XML with XML stage would give you the required details.