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 » mrm fill empty fields

Post new topic  Reply to topic
 mrm fill empty fields « View previous topic :: View next topic » 
Author Message
madi
PostPosted: Thu Jul 24, 2008 11:56 am    Post subject: mrm fill empty fields Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

hello all


i have simple question about mrm.

if i have 1000 fields in mrm and would only need 2 or 3, would i have to set all the 1000 in esql to null?

i think there is a solution for this and it is "Null Handling" and i tried setting the fields as Nullable but it didnt change anything and i was getting an empty message out

could someone tell me at what level we need to set the Nullable property .... i mean if i have

Code:


Parent
------Child Element
-------------Child Element
-------------Child Element


i tried setting Nullable for the inner most element but nothing happened

thanks
madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 24, 2008 12:04 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You need to create the field and set the value to null.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Jul 24, 2008 12:05 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
if i have 1000 fields in mrm and would only need 2 or 3, would i have to set all the 1000 in esql to null?
I don't understand the question. Please supply more details.
Back to top
View user's profile Send private message
sridhsri
PostPosted: Thu Jul 24, 2008 12:07 pm    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

What kind of messages are these ?
Have you tried using minOccurs = 0 ?
Is it possible for you to define a "choice" ?
Have you tried using content validation as "Open Defined" ?
Back to top
View user's profile Send private message
madi
PostPosted: Thu Jul 24, 2008 12:32 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

ok more details

i have a tds MRM message defined

data1|data2|data3|.....................|data1000
data1|data2|.....................

so my question in tha 1000 data fileds that i have defined

if i set only 2 or 3 in eSQL

like SET data1 = 'something';
set data2 = 'something;

RETURN TRUE

can MRM give me an output with something|something|||||||.... 1000

--madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 24, 2008 1:16 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

madi wrote:
ok more details

i have a tds MRM message defined

data1|data2|data3|.....................|data1000
data1|data2|.....................

so my question in tha 1000 data fileds that i have defined

if i set only 2 or 3 in eSQL

like SET data1 = 'something';
set data2 = 'something;

RETURN TRUE

can MRM give me an output with something|something|||||||.... 1000

--madi


OK now we're getting somewhere.
Define you null value to be space filled.
Create a blob with max space length all fields or in your case 1000 times something like field = field || '|';
Do a create last child of parse.... the space blob.

This should create you the 1000 fields with null value.
Now populate your 3 or 4 fields.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Jul 24, 2008 1:45 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

There may be a much simpler solution. Have you tried setting 'Suppress Absent Element Delimiters' to 'Never' on the complex type?
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad09440_.htm
Back to top
View user's profile Send private message
madi
PostPosted: Thu Jul 24, 2008 1:53 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

ok im lost here

ill try to give a better description of what im trying to do

forget the tds message, lets say i have a fixed length positional message with a 100 fields

I have hte mrm definition file created and ready to go

in the compute i set the output properties to set, type and format of the message set

now what i do right now is

Set mrm.data1 = 'something';
set mrm.data2 = 'something';
...
...
set mrm.data24 = '';
set mrm.data25 = '';
...
...
set mrm.data99 = 'something';
set mrm.data100 = something;

so my question was can eliminate the code in the middle which is setting the empty fields and have mrm do that for me? that way i only have to worry about the fields that i actually need and forget abt the ones i dont care abt

im sure this can be done ...... but dont know which property to set and where hope this gives a better picture

--madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
sridhsri
PostPosted: Thu Jul 24, 2008 4:23 pm    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

kimbert has already answered that question. I am quoting from the info center:

Quote:
Suppress Absent Element Delimiters: "Never" Use this option to ensure that even if optional elements are not present, all delimiters are written out.


You said you have a TDS message. On the complex type that holds the 1000 elements, click on the physical properties and set this option. Then if you don't set a value to some element, just the delimiter will appear. However, make sure that you have minOccurs=0 for all those optional elements.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 24, 2008 7:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

madi wrote:
ok im lost here

i'll try to give a better description of what i'm trying to do

forget the tds message, lets say i have a fixed length positional message with a 100 fields

so my question was can eliminate the code in the middle which is setting the empty fields and have mrm do that for me? that way i only have to worry about the fields that i actually need and forget abt the ones i dont care abt

im sure this can be done ...... but dont know which property to set and where hope this gives a better picture

--madi

OK.

Again create a msg with max length all spaces
DECLARE mymsgtxt = space(x)
In the message set have space marked as the null value and padding value.

Use the message set to parse this created text. This will create all the fields with a null value.

Set your 3 or 4 fields.... you're good to go!.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
madi
PostPosted: Fri Jul 25, 2008 5:27 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

kimbert wrote:
There may be a much simpler solution. Have you tried setting 'Suppress Absent Element Delimiters' to 'Never' on the complex type?
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ad09440_.htm


thats what i was looking for

thanks
madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
madi
PostPosted: Mon Jul 28, 2008 7:40 am    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

i did set the Suppress Absent element delimiters to "Never"

I am setting the 2 fields in the output message and im getting an empty output message with just the delimiters

Code:


set outputroot.MRM.Parent.Child1 = 'set';
set outputroot.MRM.Parent.Child2 = 'asdasd';



Output:
Quote:
""|""|""|""|""|""|""|""|""|""|||""|""|""|""|""|""|""|""|""|""|""


what am i doing wrong?

--madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 28, 2008 10:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

- have you taken a debug-level user trace?
- have you inserted a Trace node in your message flow?
These are basic diagnostic procedures, and they can be done in 5 minutes - at least do the obvious stuff before posting a question.
Back to top
View user's profile Send private message
madi
PostPosted: Mon Jul 28, 2008 12:03 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

thanks kimbert .......... getting too hard headed now a days

its sorted ......... not sure why it didnt work

but anyway one thing i noticed is that the order of the fields has to be preserved while setting them

for example we can set field1 and then skip a few and set field5 but we cannot come to field3

which kind of makes sense?

--madi
_________________
IBM Certified Solutions Developer - WMB 6.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jul 28, 2008 1:29 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Glad you sorted it out. A little something for you to ponder next time you struggle with an MRM problem...
Quote:
one thing i noticed is that the order of the fields has to be preserved while setting them
You would have noticed even sooner if you had used user trace. It tells you about self-defining fields in the message tree ( i.e. fields which were not matched against the message model ).

...oh, and did I mention user trace yet?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » mrm fill empty fields
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.