Constructing Processing Instructions in DataStage

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
raghav_ds
Premium Member
Premium Member
Posts: 40
Joined: Wed May 04, 2011 2:21 am

Constructing Processing Instructions in DataStage

Post by raghav_ds »

I have searched the forum to find for options creating the xml Process instructions but did not find any find any post.

I have a requirement where I will be having some dynamic values and with that I have to construct an xml message both with elemenst and processing instructions.

An example is given below.

Code: Select all


Input Data:

Key 1          ID                     Operation Type
=====       ====                ==========
ABC            10                        TYP1
XYZ            20                        TYP2


Web Service expect the data below:

Input request xml:

SOAP header
<ns1:strRequest> "String"
</ns1:strRequest> 

"String" has to be constructed as follows:

<Header1>
 <?ho-type "Operation Type"?>
 <?ho-username "user"?>
 <?ho-password  "password"?>
 <?ho-id "KEY1"?>

<Data Tag>
<Identifier> "ID" </Identifier>
</Header1>>

I can construct this using a transformer, Is there any better way than using transformer.
raghav_ds
Premium Member
Premium Member
Posts: 40
Joined: Wed May 04, 2011 2:21 am

Post by raghav_ds »

I have searched the documentation, but could not find any information on XML Processing instructions.

Anybody worked on constructing the XML Processing Instructions in DataStage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

raghav_ds wrote:I have searched the documentation, but could not find any information on XML Processing instructions.

Anybody worked on constructing the XML Processing Instructions in DataStage.
Did you look in the XML Pack and XML Transformations manuals?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
raghav_ds
Premium Member
Premium Member
Posts: 40
Joined: Wed May 04, 2011 2:21 am

Post by raghav_ds »

I could not find any specific information on constructing the Process Instructions separately in the documents. But I could achieve the same using transformer and xml o/p stage.

By using Transformer, I have created the instructions for example "<?Instruction1 Update?>" and passed it as XML Data element to XML OutPut Stage. Xpath is given as /header1/header2/text(), assuming that Processing Instructions are to be supplied under header2.
Post Reply