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 » What is the Error....Cant figure it out

Post new topic  Reply to topic
 What is the Error....Cant figure it out « View previous topic :: View next topic » 
Author Message
elvis_gn
PostPosted: Fri Oct 08, 2004 6:25 am    Post subject: What is the Error....Cant figure it out Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

I am getting warnings on the marked lines...I have a table with name VISA and its column is VISASTATUS,VISAID,EXPIRYDATE....

CREATE PROCEDURE Visa_DetailsMessage() BEGIN
DECLARE MyDate date CURRENT_DATE;
DECLARE I INTEGER 0;
[b]IF InputBody.Accept = 1 THEN[/b]
[b]UPDATE Database.VISA SET VISASTATUS = 'ACCEPT' WHERE VISA.VISAID = 0;[/b]
SET OutputRoot.XML.Visa_Details.Update = 1;
SET OutputRoot.XML.Visa_Details.New_Visa.Visa_Id = I+1;
[b]UPDATE Database.VISA SET VISA.VISAID = I;[/b]
[b]UPDATE Database.APPFORM SET VISAID = I;[/b]
SET OutputRoot.XML.Visa_Details.New_Visa.Issued_Date = MyDate;
[b]UPDATE Database.VISA SET ISSUEDATE = MyDate WHERE VISA.VISAID = 0;[/b]
[b]UPDATE Database.VISA SET EXPIRYDATE = MyDate WHERE VISA.VISAID = 0;[/b]
ELSEIF InputBody.Reject = 1 THEN
[b]UPDATE Database.VISA SET VISASTATUS = 'REJECT' WHERE VISA.VISAID = 0;[/b]
ELSE
UPDATE Database.VISA SET VISASTATUS = 'CANCEL';
END IF;
END;
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Fri Oct 08, 2004 6:35 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Sorry forgot to mention that the input is an XML file

<Visa_Result>
<Accept>1</Accept>
<Reject>0</Reject>
<Cancel>0</Cancel>
</Visa_Result>
Back to top
View user's profile Send private message Send e-mail
waugh
PostPosted: Fri Oct 08, 2004 6:54 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 225

i think

UPDATE Database.VISA

needs to be

UPDATE Database.yourschemaname.VISA

or

you can directly say

UPDATE yourschemaname.VISA...

If you still see the warnings, ignore and run in debug and post your exception here.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Fri Oct 08, 2004 7:05 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

I tried it,it did not work.

I tried putting the SET commands before the IF loop and they work.
So could someone tell me why its not passing the loop statement ????
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Oct 08, 2004 7:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The syntax of your UPDATE statement is not correct.

You always need to use an AS clause when using SELECT, INSERT, or UPDATE in ESQL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
JT
PostPosted: Fri Oct 08, 2004 7:17 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Also the following statement is coded incorrectly:
Code:
IF InputBody.Accept = 1 THEN

should be:

Code:
IF InputBody.Visa_Result.Accept = '1' THEN

Quote:
I am getting warnings on the marked lines

Provide the details of the warnings.
Back to top
View user's profile Send private message
waugh
PostPosted: Fri Oct 08, 2004 7:17 am    Post subject: Reply with quote

Master

Joined: 19 Feb 2004
Posts: 225

InputBody.Accept
try
InputRoot.XML.Visa_Result.Accept
or
InputBody.Visa_Result.Accept
instead
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Oct 08, 2004 10:50 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

jefflowrey wrote:
You always need to use an AS clause when using SELECT, INSERT, or UPDATE in ESQL.

It's not necessary to use AS clause. You can prefix the field names with table names. For example,
Code:

SET Environment.Variables.MyRows[] = (SELECT myTable.Field1 from Database.MySchema.myTable );

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

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 » What is the Error....Cant figure it out
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.