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 IndexWebSphere Message Broker (ACE) SupportUsing LocalEnvironment in Mapping components – Broker 8.0.02

Post new topicReply to topic
Using LocalEnvironment in Mapping components – Broker 8.0.02 View previous topic :: View next topic
Author Message
petersonvz
PostPosted: Fri May 24, 2013 11:07 am Post subject: Using LocalEnvironment in Mapping components – Broker 8.0.02 Reply with quote

Newbie

Joined: 09 May 2013
Posts: 7
Location: Curitiba, Brazil

Hi ALL

Please, I need help to resolve an error in the message mapping.
I'm doing a migration from WMB 6.1 to WMB 8.0.

In the Message Broker 6.1, I’m using ESQL function to define a variable in the LocalEnvironmet (in the following example the variable is: FileNamePrefix)

ESQL code:

-- Set output file name
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputLocalEnvironment.Variables.FilenamePrefix = SUBSTRING(InputLocalEnvironment.File.Name FROM 1 FOR 7);


Note: The Compute Node properties: Combo: "Compute mode" is setted "LocalEnvironment and Message."

After this processing (ESQL Compute), in the Message Flow is used the Mapping component, using the variable LocalEnvironment (FileNamePrefix) for setting a field in the output message

Description of the Map

Map Script
$target
....
Destination: FILE-NAME-EXIT | Value: $source/LocalEnvironmet/Variables/FileNamePrefix

In the Message Broker Toolkit 6.1, this works OK!!

But in the Message Broker Toolkit 8.0.0.2 is generated the error message below:
The Move input or output object $FilenamePrefix could not be found. / FileRetFlow_Mapping.map / line 74 / Map Problem

Any suggestions!?

What is necessary to change to fix this error?

Thanks to ALL

Peterson Zambiassi
Back to top
View user's profile Send private message
kash3338
PostPosted: Fri May 24, 2013 7:51 pm Post subject: Re: Using LocalEnvironment in Mapping components – Broker 8. Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

petersonvz wrote:
Code:

SET OutputLocalEnvironment.Variables.FilenamePrefix = SUBSTRING(InputLocalEnvironment.File.Name FROM 1 FOR 7);


FILE-NAME-EXIT | Value: $source/LocalEnvironmet/Variables/FileNamePrefix

The Move input or output object $FilenamePrefix could not be found. / FileRetFlow_Mapping.map / line 74 / Map Problem


In the above code, I can see FileNamePrefix and FilenamePrefix. Is that just a typo?
Back to top
View user's profile Send private message Send e-mail
petersonvz
PostPosted: Sat May 25, 2013 8:31 am Post subject: Reply with quote

Newbie

Joined: 09 May 2013
Posts: 7
Location: Curitiba, Brazil

Sorry,

I made a mistake when I wrote on the forum, but in the code is correct.
The variable name is: 'FilenamePrefix'

I did a test changing the variable to SHARED, but error remains.

Any suggestions?
Back to top
View user's profile Send private message
petersonvz
PostPosted: Tue May 28, 2013 3:47 pm Post subject: Reply with quote

Newbie

Joined: 09 May 2013
Posts: 7
Location: Curitiba, Brazil

Good Night !!

I found this recommendation on the IBM website:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fbr28671_.htm

I followed the recommendations, but still not working.

Someone may help me?

Thanks !!!
Back to top
View user's profile Send private message
vmcgloin
PostPosted: Tue May 28, 2013 10:15 pm Post subject: Reply with quote

Knight

Joined: 04 Apr 2002
Posts: 560
Location: Scotland

I don't know what is wrong - although there is another typo in your post that might contribute if it is in your code:

Destination: FILE-NAME-EXIT | Value: $source/LocalEnvironmet/Variables/FileNamePrefix

I suggest you follow the usual advice of putting a trace node after you compute node including LocalEnvironment to check that the structure is as you expect, e.g. Is File.Name not in your InputLocalEnvionment and therefore not in your output?
Back to top
View user's profile Send private message
Tech1621
PostPosted: Wed May 29, 2013 1:10 am Post subject: Suggestion Reply with quote

Novice

Joined: 29 May 2013
Posts: 23

Hi
I am not sure but i think if instead of
As I am not sure about OutputLocalEnvironment and InputLocalEnvironment
Previous
ESQL code:

-- Set output file name
SET OutputLocalEnvironment = InputLocalEnvironment;
SET OutputLocalEnvironment.Variables.FilenamePrefix = SUBSTRING(InputLocalEnvironment.File.Name FROM 1 FOR 7);

new
SET OutputExceptionList = InputExceptionList;
SET OutputRoot.Properties = InputRoot.Properties;
SET LocalEnvironment.Variables.Output.FilenamePrefix = SUBSTRING(LocalEnvironment.File.Name FROM 1 FOR 7)
_________________
Anything is easy if you believe in yourself..
Back to top
View user's profile Send private message
petersonvz
PostPosted: Thu Jun 13, 2013 2:04 pm Post subject: Reply with quote

Newbie

Joined: 09 May 2013
Posts: 7
Location: Curitiba, Brazil

Dear ALL,

I found an alternative solution for this problem. An advice: For those who encountered this problem also.

1º) First I defined a new XML message and the variables used previously in Local Environment
For example: In Message SET >> New Message Definition File.
Message Definition file name: LocalGroup
Create a New Message: LocalGroup
In the new message “LocalGroup”, create new attribute, in my case: FilenamePrefix

Message Definition:
<LocalGroup>
<FilenamePrefix> </FilenamePrefix>
</LocalGroup>

2º) Change the ESQL Code to move the content to the variable

FROM:
SET OutputLocalEnvironment.Variables.FilenamePrefix = SUBSTRING (InputLocalEnvironment.File.Name FROM 1 FOR 7);

TO:
SET OutputLocalEnvironment.Variables.LocalGroup [1]. FilenamePrefix = SUBSTRING (InputLocalEnvironment.File.Name FROM 1 FOR 7);


3) Changing the Mapping of the message:

In the Mapping definition: Tree LocalEnvironmet /Variables

Right mouse button on the variable "any", select the opton “Cast”, select the message defined on step 1: "Localgroup".
After this the variable FilenamePrefix is available to be mapped to out message.

Thanks for the replies.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportUsing LocalEnvironment in Mapping components – Broker 8.0.02
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.