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 » WMB : String Compare...

Post new topic  Reply to topic
 WMB : String Compare... « View previous topic :: View next topic » 
Author Message
Jithesh shetty
PostPosted: Fri Jan 11, 2008 1:31 am    Post subject: WMB : String Compare... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

Hi,

I am using Simple message flow for database insertion......
Mqinput-->Mqoutput

I am using follwing ESQl code.
CALL CopyMessageHeaders();
CALL CopyEntireMessage();
DECLARE DOCUMENTID CHARACTER;
DECLARE REFDOCID CHARACTER;
Declare i integer;
Declare SERVICEID integer 700001;
SET DOCUMENTID = OutputRoot.XML.VMIORDERSDT97A.VMI.REFDOCID;
SET i = THE(select max(S.AUDIT_SEQ_NO) from Database.VMI_AUDIT_LOGS as S);
SET i = i + 1;
SET REFDOCID = THE(SELECT S.DOCUMENT_ID FROM Database.VMI_INVRPTD97A_OUTBOUND as S WHERE S.DOCUMENT_ID = DOCUMENTID AND S.PROCESSED = 'N');
IF DOCUMENTID = REFDOCID THEN INSERT INTO Database.VMI_AUDIT_LOGS(AUDIT_SEQ_NO, ERROR_SEQ_NO, SERVICE_ID, DOCUMENT_ID, PRCS_START_DT, PRCS_START_TIME, PRCS_END_DT, PRCS_END_TIME, PRCS_STATUS, LOG_MESSAGE, MDN_TIMESTAMP, APERAK_TIMESTAMP, SENDER_ID, RECIEVER_ID) values (i, '', SERVICEID, DOCUMENTID, CURRENT_DATE, CURRENT_TIME, CURRENT_DATE, CURRENT_TIME, 'SUCCESS', 'Execution of Service : VMI_INVRPT_D97A', '', '', '', '');
END IF;

DoCUMENTID will store the value from the input XML file as VMI_INVRPTD97A_1182, REFDOCID will store the value from the table as VMI_INVRPTD97A_1182.....

How to check strings in IF statement........
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 11, 2008 10:21 am    Post subject: Re: WMB : String Compare... Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Jithesh shetty wrote:
How to check strings in IF statement........

Please explain what you are asking. Your example shows a comparison in an IF statement.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
Jithesh shetty
PostPosted: Sun Jan 13, 2008 8:30 pm    Post subject: WMB : String Compare... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

IF DOCUMENTID = REFDOCID

this String comparision is not working......

Can u please tell me how to compare 2 Strings in ESQL....
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Sun Jan 13, 2008 8:43 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi Jithesh shetty,

Please take a trace and see what values are stored in the two variables during the comparison...

Regards.
Back to top
View user's profile Send private message Send e-mail
Jithesh shetty
PostPosted: Sun Jan 13, 2008 8:51 pm    Post subject: WMB : String Compare... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

i checked in Both variable Same value i storing..

DOCUMENTID = VMI_INVRPTD97A_1182
REFDOCID = VMI_INVRPTD97A_1182
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 13, 2008 9:09 pm    Post subject: Reply with quote

Grand High Poobah

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

Have you tried:

SET DOCUMENTID = PATHTOELEMENT VALUE;
SET REFDOCID = PATHTOELEMENT VALUE;


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Jithesh shetty
PostPosted: Sun Jan 13, 2008 9:13 pm    Post subject: WMB : String Compare... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

SET DOCUMENTID = PATHTOELEMENT VALUE;
SET REFDOCID = PATHTOELEMENT VALUE;

No, I'm Not used....Can u please tell me waht is use of this..????
Back to top
View user's profile Send private message
Jithesh shetty
PostPosted: Sun Jan 13, 2008 9:21 pm    Post subject: Re: WMB : String Compare... Reply with quote

Acolyte

Joined: 30 Oct 2007
Posts: 51

Jithesh shetty wrote:
SET DOCUMENTID = PATHTOELEMENT VALUE;
SET REFDOCID = PATHTOELEMENT VALUE;

No, I'm Not used this statement....Can u please tell me waht is use of this..????
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Jan 13, 2008 10:17 pm    Post subject: Re: WMB : String Compare... Reply with quote

Grand High Poobah

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

Jithesh shetty wrote:
SET DOCUMENTID = PATHTOELEMENT VALUE;
SET REFDOCID = PATHTOELEMENT VALUE;

No, I'm Not used....Can u please tell me waht is use of this..????


Read it up in the ESQL manual
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Mon Jan 14, 2008 8:07 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

moved to WMB Forum
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Jan 14, 2008 10:35 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Maybe one is padded with spaces, and the other padded with nulls.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
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 » WMB : String Compare...
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.