ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reg: Fixed String Input to Xml Output..Doubt in Message set.

Post new topic  Reply to topic
 Reg: Fixed String Input to Xml Output..Doubt in Message set. « View previous topic :: View next topic » 
Author Message
cyvwmb
PostPosted: Thu Jun 20, 2013 3:36 am    Post subject: Reg: Fixed String Input to Xml Output..Doubt in Message set. Reply with quote

Newbie

Joined: 18 Mar 2013
Posts: 9

Hi everyone,

This is my requirement for Fixed String Input to Xml Output...

Sample Input message:

001Fname Mname Lname Cname<CR><LF>
002Fname Mname Lname Cname<CR><LF>
003Fname Mname Lname Cname<CR><LF>
004Fname Mname Lname Cname<CR><LF>

Sample Output message:

<Message>
<Header>....</Header>
<Body>
<Rows>
<Row>
<Employee>001</Employee>
<FirstName>Fname</FirstName>
<MiddleName>Mname</MiddleName>
<LastName>Lname</LastName>
<CompanyName>Cname</CompanyName>
</Row>
<Row>
<Employee>002</Employee>
<FirstName>Fname</FirstName>
<MiddleName>Mname</MiddleName>
<LastName>Lname</LastName>
<CompanyName>Cname</CompanyName>
</Row>
<Row>
<Employee>003</Employee>
<FirstName>Fname</FirstName>
<MiddleName>Mname</MiddleName>
<LastName>Lname</LastName>
<CompanyName>Cname</CompanyName>
</Row>
<Row>
<Employee>004</Employee>
<FirstName>Fname</FirstName>
<MiddleName>Mname</MiddleName>
<LastName>Lname</LastName>
<CompanyName>Cname</CompanyName>
</Row>
</Rows>
</Body>
</Message>

------------------------------------------------------------------------------------------------
For this i created CWF input message set,but it worked for first row of input message..(May be is there any properties need to change to get below Rows? please tell me how to get multiple row in flow.. )

but my requirement : every Input message can contain multiple rows..

Looking forward for your help,
Thanks in an advance..
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jun 20, 2013 3:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why did you use CWF?
Why did you use MRM and not DFDL?

What property of the message model indicates that there is one row? Why haven't you tried changing that property?

The requirement belongs to you.
Back to top
View user's profile Send private message
cyvwmb
PostPosted: Thu Jun 20, 2013 3:56 am    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2013
Posts: 9

mqjeff wrote:
Why did you use CWF?
Why did you use MRM and not DFDL?

What property of the message model indicates that there is one row? Why haven't you tried changing that property?

The requirement belongs to you.



Hi,

I am sorry...

I am using MB v6.1.

Message flow:

MQinput---->ComputeNode--->MQoutput

So input is coming via MQ...

Quote:
What property of the message model indicates that there is one row?


Directly i given length to dividing elements..

Quote:
"Why haven't you tried changing that property?"..


I tried all the Properties for CWF... no use..
---------------------------------------------------------------------------

Is it any possible TDS Message set..because it contain <CR><LF> options.
but i don't how to use this properties
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jun 20, 2013 4:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So you have a set of fields.

You then have a structure that holds all of those fields and identifies that this set of fields is a "row".

You want to indicate that this structure repeats.

If you *don't* have that structure, then all you have is a structure that says "This set of fields is a message".

Then you want to create a structure that says "This message consists of a set of rows, each row having this set of fields". That is, you want to create the structure that holds the set of fields, and make it repeat.

Tell the person who's asking you to do anything with v6.1 that they should send you to training and let you use v8.
Back to top
View user's profile Send private message
cyvwmb
PostPosted: Thu Jun 20, 2013 10:18 pm    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2013
Posts: 9

mqjeff wrote:
So you have a set of fields.

You then have a structure that holds all of those fields and identifies that this set of fields is a "row".

You want to indicate that this structure repeats.

If you *don't* have that structure, then all you have is a structure that says "This set of fields is a message".

Then you want to create a structure that says "This message consists of a set of rows, each row having this set of fields". That is, you want to create the structure that holds the set of fields, and make it repeat.

Tell the person who's asking you to do anything with v6.1 that they should send you to training and let you use v8.


Hi, i am again...

After looking you poster, i got a idea to create a message definition file ... Please check below steps..

First i created only one Global Element (For Example : STR_FS)and i reference to one Complex Type..there i kept Max Occurs [-1]...
I given Data length=93..(each Row length contain 93) ..

So Here my STR_FS will take multiple rows...That i seen in my debug mode as well...

So i can separate fields which i want to generate in ESQL code by using Substring Function ..

------------------ But here i got one more problem -------------------

When i saw that data in debug mode it contains "\n\r" (New line)

Due to this "\n\r" Data alignment is distributed .... So i cannot use substring function for particular field..

For Example ....please have a look into below ..

Here you can see first line taking good...But rest of the rows distributed

MRM
STR_FS:CHARACTER:91062418120100D5510211117903001HEX SOCK. SCREW000000001.00 83110D551 081230TMGACO33
STR_FS:CHARACTER:\n\r
91062418120100D5510211118003001SCREW 000000001.00 831 0D551 08123
STR_FS:CHARACTER:0TMGACO33 \n\r
91062418120100D5510211118003001SCREW 000000001.00 831 0D551
STR_FS:CHARACTER:081230TMGACO33 \n\r
91062418120100D5510211118003001SCREW 000000001.00 831 0D5
STR_FS:CHARACTER:51 081230TMGACO33 \n\r
91062418120100D5510211118003001SCREW 000000001.0
STR_FS:CHARACTER:0 831 0D551 081230TMGACO33 \n\r
91062418120100D5510211118003001SCREW 00
STR_FS:CHARACTER:0000001.00 831 0D551 081230TMGACO33 \n\r
91062418120100D5510211118003001SCREW
STR_FS:CHARACTER:000000001.00 831 0D551 081230TMGACO33 \n\r
91062418120100D551021111800300


My intention is to Kill \n\r...


Please tell me how to trim this \n\r...Looking forward your
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Jun 21, 2013 3:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Don't use substring.

You need a structure something like
Code:
Message
    Row
       Field1
       Field2
       ..


You now have a structure that looks like
Code:
Message
Field1


All of the things you are trying to do are basic message modelling. All of your questions - how to handle repeating elements, how to handle line endings - are handled in the message model.

Review the samples. Ask the person sitting next to you who is also using Broker.
Back to top
View user's profile Send private message
cyvwmb
PostPosted: Fri Jun 21, 2013 3:34 am    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2013
Posts: 9

mqjeff wrote:
Don't use substring.

You need a structure something like
Code:
Message
    Row
       Field1
       Field2
       ..


You now have a structure that looks like
Code:
Message
Field1


All of the things you are trying to do are basic message modelling. All of your questions - how to handle repeating elements, how to handle line endings - are handled in the message model.

Review the samples. Ask the person sitting next to you who is also using Broker.


Hi,
Yes your right ..

I got this link from this same MQSerices.net

https://github.com/chids/archived-wmb-message-modelling-tutorials/tree/master/tagged-fixed-length

Right now i am implement which explained into above link...

Once again Thank you very much..to advising and helping
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Reg: Fixed String Input to Xml Output..Doubt in Message set.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.