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 » How to deal with optional (SWIFT) tags within the MRM?

Post new topic  Reply to topic
 How to deal with optional (SWIFT) tags within the MRM? « View previous topic :: View next topic » 
Author Message
foc
PostPosted: Thu Aug 21, 2003 1:08 am    Post subject: How to deal with optional (SWIFT) tags within the MRM? Reply with quote

Newbie

Joined: 04 Sep 2002
Posts: 8
Location: Holland

I try to define a MT548 message within the MRM. The problem I have is how to deal with optional tags!?

Is it possible within the MRM to set a default value when a tag is not available in the input message.

Thanks,

foc.
_________________
MQ Certified Specialist
Back to top
View user's profile Send private message Visit poster's website
Craig B
PostPosted: Thu Aug 21, 2003 1:43 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

In the MRM, Default Values will only be used in Fixed Length Environments. Therefore, Default values will be written by the MRM when using the CWF physical format, and the Fixed Length Data Element separation techniques in TDS. If the element you which to write a default for in the MT548 structure is contained witin a Fixed length parent then you can do it. If it is not, then you would have to write your ESQL to look for the missing fields, and create them in your output message.
_________________
Regards
Craig
Back to top
View user's profile Send private message
foc
PostPosted: Thu Aug 21, 2003 3:02 am    Post subject: How to deal with optional (SWIFT) tags within the MRM? Reply with quote

Newbie

Joined: 04 Sep 2002
Posts: 8
Location: Holland

Thanks,

Writing ESQL code to find out missing tags is not easy. I tried to do this but no succes so far. For example if you have the following repeating subsequence:

:16R:LINK
:13A::LINK//512
:20C::POOL//z
:16S:LINK

where 13A tag is optional, how can I check this within ESQL?

foc
_________________
MQ Certified Specialist
Back to top
View user's profile Send private message Visit poster's website
foc
PostPosted: Thu Aug 21, 2003 3:04 am    Post subject: Reply with quote

Newbie

Joined: 04 Sep 2002
Posts: 8
Location: Holland

Craig B wrote:
In the MRM, Default Values will only be used in Fixed Length Environments. Therefore, Default values will be written by the MRM when using the CWF physical format, and the Fixed Length Data Element separation techniques in TDS. If the element you which to write a default for in the MT548 structure is contained witin a Fixed length parent then you can do it. If it is not, then you would have to write your ESQL to look for the missing fields, and create them in your output message.


Thanks,

Sorry wrong button.

Writing ESQL code to find out missing tags is not easy. I tried to do this but no succes so far. For example if you have the following repeating subsequence:

:16R:LINK
:13A::LINK//512
:20C::POOL//z
:16S:LINK

where 13A tag is optional, how can I check this within ESQL?

foc
_________________
MQ Certified Specialist
Back to top
View user's profile Send private message Visit poster's website
Craig B
PostPosted: Thu Aug 21, 2003 3:09 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Hi,

If you have parsed against the Swift Message Set, then you will have a message tree for your MT548 message body section. If you want to check if the 13A field existed in your input message, then you can specify something like :

IF InputRoot.MRM.FIN.TEXT_BLOCK.MT548.A.13A IS NULL THEN
SET OutputRoot.MRM.FIN.TEXT_BLOCK.MT548.A.13A = 'Default';
END IF;

As you say, this can be a painful task when you have to check for any number of these.
_________________
Regards
Craig
Back to top
View user's profile Send private message
foc
PostPosted: Thu Aug 21, 2003 3:41 am    Post subject: Reply with quote

Newbie

Joined: 04 Sep 2002
Posts: 8
Location: Holland

Craig B wrote:
Hi,

If you have parsed against the Swift Message Set, then you will have a message tree for your MT548 message body section. If you want to check if the 13A field existed in your input message, then you can specify something like :

IF InputRoot.MRM.FIN.TEXT_BLOCK.MT548.A.13A IS NULL THEN
SET OutputRoot.MRM.FIN.TEXT_BLOCK.MT548.A.13A = 'Default';
END IF;

As you say, this can be a painful task when you have to check for any number of these.


Thanks,

But if you have the following repeating sequence:

(0x300000B)e_16R = 'LINK'
(0x300000B)e_20C = ':POOL//x'
(0x300000B)e_16S = 'LINK'
(0x300000B)e_16R = 'LINK'
(0x300000B)e_13A = ':LINK//512'
(0x300000B)e_20C = ':POOL//z'
(0x300000B)e_16S = 'LINK'
(0x300000B)e_16R = 'LINK'
(0x300000B)e_13A = ':LINK//513'
(0x300000B)e_20C = ':POOL//z'
(0x300000B)e_16S = 'LINK'
(0x300000B)e_16S = 'GENL'

In the first occurence a 13A tag is missing. How can I write my ESQL code to detect this? You have to work with counters some how! The problem is that the first 13A tag is filled with ':LINK//512'!
_________________
MQ Certified Specialist
Back to top
View user's profile Send private message Visit poster's website
Craig B
PostPosted: Thu Aug 21, 2003 4:04 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

Yes ... i see your point with that particular example. The First instance in the message tree will not be the omitted element, but the first one that it parsed. Unfortuntalely in TDS, omitted element take precedence over NULL handling so you cant even force an element into the message tree that will write an element with a NULL value.

This would mean that you would have to have the knowledge that an element could have been omitted be previous to the first occurence that is actually in the message tree. This would seem to suggest that checking for this possible present of this element becomes a matter of pointing a REFERENCE variable at the first child in the structure and then navigate the SIBLING checking the field names to make some judgement as to whether your optional element is there or not.

But then this could become a long winded task. I'll have to have a think about that scenario, and hopefully in the mean-time some bright spark will append a solution.
_________________
Regards
Craig
Back to top
View user's profile Send private message
foc
PostPosted: Thu Aug 21, 2003 5:42 am    Post subject: Reply with quote

Newbie

Joined: 04 Sep 2002
Posts: 8
Location: Holland

Craig B wrote:
Yes ... i see your point with that particular example. The First instance in the message tree will not be the omitted element, but the first one that it parsed. Unfortuntalely in TDS, omitted element take precedence over NULL handling so you cant even force an element into the message tree that will write an element with a NULL value.

This would mean that you would have to have the knowledge that an element could have been omitted be previous to the first occurence that is actually in the message tree. This would seem to suggest that checking for this possible present of this element becomes a matter of pointing a REFERENCE variable at the first child in the structure and then navigate the SIBLING checking the field names to make some judgement as to whether your optional element is there or not.

But then this could become a long winded task. I'll have to have a think about that scenario, and hopefully in the mean-time some bright spark will append a solution.


Hi,

Maybe I got a solution for the above problem. See the following trace output:

(0x1000013)e_MT548BodyTest = (
(0x1000013)e_AGeneralInfo = (
(0x300000B)e_16R = 'GENL'
(0x300000B)e_20C = ':SEME//01522'
(0x300000B)e_23G = 'CAST/A2C4'
(0x1000013)e_SA98_Choice = (
(0x300000B)e_98A = ':PREP//19991231'
)
(0x1000013)e_A1Subsequence = (
(0x300000B)e_16R = 'LINK'
(0x300000B)e_13A = ':LINK//513'
(0x300000B)e_20C = ':POOL//x'
(0x300000B)e_16S = 'LINK'
)
(0x1000013)e_A1Subsequence = (
(0x300000B)e_16R = 'LINK'
(0x300000B)e_13A = ':LINK//512'
(0x300000B)e_20C = ':POOL//z'
(0x300000B)e_16S = 'LINK'
)
(0x1000013)e_A1Subsequence = (
(0x300000B)e_16R = 'STAT'
)
(0x300000B)e_25D = ':CPRC/A2C4E6G8/A2C4'
(0x300000B)e_16S = 'STAT'
(0x300000B)e_16S = 'GENL'
)
)

It seems to be working for the 13A optional tag. The next problem I have is the 16R = 'STAT' tag of the following subsequence in the message. This tag should be in the next element and not in element e_A1Subsequence.

Maybe you can answer for this?

Thanks so far

foc
_________________
MQ Certified Specialist
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to deal with optional (SWIFT) tags within the MRM?
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.