Page 1 of 1

Constructing Processing Instructions in DataStage

Posted: Thu Sep 08, 2011 4:30 pm
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.

Posted: Wed Sep 14, 2011 9:54 pm
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.

Posted: Thu Sep 15, 2011 1:39 am
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?

Posted: Fri Sep 16, 2011 1:05 am
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.