How to read .req file in datastage

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
deepa.y
Participant
Posts: 56
Joined: Mon Nov 28, 2011 10:47 pm
Location: Bangalore

How to read .req file in datastage

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

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

"You can never have too many knives" -- Logan Nine Fingers
deepa.y
Participant
Posts: 56
Joined: Mon Nov 28, 2011 10:47 pm
Location: Bangalore

Post 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.
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post 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.
Regards,
S. Kirtikumar.
Post Reply