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 » Case Statement for WMB 6.1

Post new topic  Reply to topic
 Case Statement for WMB 6.1 « View previous topic :: View next topic » 
Author Message
Harshalw
PostPosted: Wed Jul 23, 2008 11:16 pm    Post subject: Case Statement for WMB 6.1 Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

Hi,

I am using a case statement in ESQL for WMB 6.1.
Here is the below statement .

CASE InputRoot.XML.wwprttxn.price.pricepointtype
WHEN 'MOD' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'NEW';
SET Varcond = 'MODEL: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'FEA' Then
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'NEW';
SET Varcond = 'FEATURE: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'RPQ' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'NEW';
SET Varcond = 'RPQ: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'SWF' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering;
SET Varcond = 'SWFEATURE: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'FUP' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'FEAT CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'MUP' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'MOD CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'TMU' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'TYPE MOD CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'TFU' THEN
SET Matnr = InputRoot.XML.wwprttxn.price.offering || 'UPG';
SET Varcond = 'TYPE FEAT CONV: ' || InputRoot.XML.wwprttxn.price.pricepointvalue;
WHEN 'VAR' THEN
WHEN 'SBB' THEN
WHEN '' THEN
SET Matnr = '';
SET Varcond = '';
ELSE
SET Matnr = 'HARHSAL';
SET Varcond = 'Harshal';
END CASE;

* I am New to ESQL and WMB*
I am able to execute the code however when i debug the code i could see variable 'matnr' modified however updating the 'varcond' variable, it come out of funcion. Please let me know if the above syntax is correct or wrong.

Thanks
Harshal
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Jul 23, 2008 11:24 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

since ur bar file was deployed successfully.. thats removes the possibility of a syntactical error...


Here the control shall come out after updating the 'varcond' variable...

Are u expecting soemthing else here...
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Harshalw
PostPosted: Wed Jul 23, 2008 11:33 pm    Post subject: Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

I wanted to see the value in 'Varcond' variable even when function ends. How can i declare a global variable in Esql? Is it somewhat like C.

Can you please refer some document which will have examples as well proper descrition for Esql language.
Back to top
View user's profile Send private message
AkankshA
PostPosted: Wed Jul 23, 2008 11:37 pm    Post subject: Reply with quote

Grand Master

Joined: 12 Jan 2006
Posts: 1494
Location: Singapore

I suppose this CASE is in a function which u are calling from main module.... So simply pass the variables from main module to this funcation and when your control will resume back to main eSQL, you can see the value populated in dubug mode..


refer to eSQL guide from IBM infocenter
_________________
Cheers
Back to top
View user's profile Send private message Visit poster's website
Harshalw
PostPosted: Thu Jul 24, 2008 12:04 am    Post subject: Reply with quote

Voyager

Joined: 23 Jul 2008
Posts: 77

ok thanks !!
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 » Case Statement for WMB 6.1
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.