Author |
Message
|
smdavies99 |
Posted: Thu Nov 17, 2011 3:00 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Radhikab wrote: |
as per the requirement it has to ignore 1st record. but it is creating message for header also.
We don't have debugger to trace the message. we are using wmb 6.1 |
UserTrace IS NOT THE SAME as the Debugger.
May I humbly suggest that some proper training in the use of this admitedly complex product might be in order? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
zpat |
Posted: Thu Nov 17, 2011 3:06 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Radhikab wrote: |
Hi,
I was instructed to use mqinput node instead of fileinput node. |
Fine, but please don't refer to message data as files, or make it clear what you mean. |
|
Back to top |
|
 |
saurabh867 |
Posted: Thu Nov 17, 2011 3:18 am Post subject: |
|
|
Voyager
Joined: 13 Jun 2010 Posts: 78
|
Hi Radhikab,
Are you sure you are not referring the Header type when you created the message set with this complex type?
You have to post either the user trace or your message set that you have created. It might be so that you have placed the Header at wrong position or with wrong delimiter from parent.
Regards,
Saurabh |
|
Back to top |
|
 |
Radhikab |
Posted: Thu Nov 17, 2011 3:33 am Post subject: |
|
|
Novice
Joined: 16 Nov 2011 Posts: 11
|
Here is the message set
Code: |
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="GTWL_Type">
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<tdsStructRep dataElementSeparation="AllElementsDelimited" delimiter=";" messageSetDefaultRep="TDS1"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Header">
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<tdsElemRep messageSetDefaultRep="TDS1" precision="-1"/>
<tdsInclRep messageSetDefaultRep="TDS1" repeatingElementDelimiter=""/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<tdsStructRep dataElementSeparation="AllElementsDelimited" delimiter=";" messageSetDefaultRep="TDS1"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence maxOccurs="1" minOccurs="1">
<xsd:element name="ID_SECURITY" type="xsd:string"/>
<xsd:element name="SECURITY_GRP_CODE" type="xsd:string"/>
<xsd:element name="SECURITY_NAME" type="xsd:string"/>
<xsd:element name="ISIN" type="xsd:string"/>
<xsd:element name="SEDOL" type="xsd:string"/>
<xsd:element name="BBTICKER" type="xsd:string"/>
<xsd:element name="SECURITY_CURRENCY" type="xsd:string"/>
<xsd:element name="ISSUE_DATE" type="xsd:string"/>
<xsd:element name="MATURITY_DATE" type="xsd:string"/>
<xsd:element name="MKT_LOC_COD" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Record">
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<tdsElemRep messageSetDefaultRep="TDS1" precision="-1"/>
<tdsInclRep messageSetDefaultRep="TDS1" repeatingElementDelimiter="<CR><LF>"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<tdsStructRep dataElementSeparation="AllElementsDelimited" delimiter=";" messageSetDefaultRep="TDS1"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence maxOccurs="1" minOccurs="1">
<xsd:element minOccurs="1" name="ID_SECURITY" type="xsd:string"/>
<xsd:element minOccurs="1" name="SECURITY_GRP_CODE" type="xsd:string"/>
<xsd:element minOccurs="1" name="SECURITY_NAME" type="xsd:string"/>
<xsd:element minOccurs="1" name="ISIN" type="xsd:string"/>
<xsd:element minOccurs="1" name="SEDOL" type="xsd:string"/>
<xsd:element minOccurs="1" name="BBTICKER" type="xsd:string"/>
<xsd:element minOccurs="1" name="SECURITY_CURRENCY" type="xsd:string"/>
<xsd:element minOccurs="1" name="ISSUE_DATE" type="xsd:string"/>
<xsd:element minOccurs="1" name="MATURITY_DATE" type="xsd:string"/>
<xsd:element minOccurs="1" name="MKT_LOC_COD" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="msg_GTWL" type="GTWL_Type">
<xsd:annotation>
<xsd:appinfo source="WMQI_APPINFO">
<MRMessage messageDefinition="/0/msg_GTWL;XSDElementDeclaration$MRObject"/>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:schema> |
Not able to get the trace log.. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Nov 17, 2011 3:51 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So regardless of whether you explicitly model the header as a separate thing or not, when you are reading a message using an MQInput node, you are always reading the entire contents of the message.
This means you will always get a logical message tree that includes all of the data in the message.
When using a FileInput node, you can choose to receive individual records from individual files.
I am *not* saying that you should switch to using a FileInput node.
Since you are using an MQInput node, you know you will always get all of the records in the message in the logical message tree, and you know that you will therefore always have a header record as the FIRST of those records - again, whether you explicitly model it as a separate thing or not.
So write your code accordingly. |
|
Back to top |
|
 |
er.gursharan |
Posted: Sun Nov 27, 2011 11:44 pm Post subject: |
|
|
Newbie
Joined: 28 Jul 2011 Posts: 7
|
As you are converting CSV to XML.. u can simply convert the header data as well to XML. Thereafter, you can delete Header record from OutputRoot(it would be the first occurence in the output) .
-- Delete the header record.
SET OutputRoot.XMLNSC.XXXXXXXXX[1] = NULL; |
|
Back to top |
|
 |
Radhikab |
Posted: Mon Nov 28, 2011 2:21 am Post subject: |
|
|
Novice
Joined: 16 Nov 2011 Posts: 11
|
Thanks a lot for all your responses.
Created the message set with complex type as Header. When I tested for the first time, the flow was running on two execution groups. Deleted it in one EG and tested.It is working fine now. |
|
Back to top |
|
 |
mqmatt |
Posted: Mon Nov 28, 2011 4:35 am Post subject: |
|
|
 Grand Master
Joined: 04 Aug 2004 Posts: 1213 Location: Hursley, UK
|
Since V7.0.0.2 there has been a "skip first record" option on the FileInput node to precisely deal with the requirement the OP talked about. |
|
Back to top |
|
 |
|