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 » help needed urgently for putting data in DB2

Post new topic  Reply to topic
 help needed urgently for putting data in DB2 « View previous topic :: View next topic » 
Author Message
kishoreMuthyala
PostPosted: Tue Mar 30, 2004 1:30 am    Post subject: help needed urgently for putting data in DB2 Reply with quote

Apprentice

Joined: 24 Mar 2004
Posts: 35
Location: singapore

hi,
iam trying to put the data in DB2 which came into the deliveryQueue using SAP adapter from SAP (BAPI module) using WBIMBv5.0.I have created a message flow using MQI/Pnode,compute node,MQO/Pnode.to flow into the DB2.but the data is going till the Queue which i have put in MQO/Pnode and is not going into the DB2.Can any one guide me for this Problem.(even i tried using DBnode in the place of compute)

esql which was written for comput node


CREATE COMPUTE MODULE dbmsgfl1_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
-- CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();
RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN

DECLARE A INTEGER;
DECLARE COMPANY_CODE CHAR;
DECLARE NAME_OF_THE_COMPANY CHAR;
-- DECLARE ref1 REFERENCE TO OutputRoot.XML.Company;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
SET A = 1;

WHILE A <= CARDINALITY(InputRoot.XML.SAP_BAPI_COMPANYCODE_GETLIST.SAP_COMPANYCODE_LIST[]) DO
SET OutputRoot = InputRoot;

INSERT INTO Database.DB2ADMIN.SAP_BAPI_COMPANYCODE_GETLIST(COMPANY_CODE,NAME_OF_THE_COMPANY) VALUES(CAST(InputRoot.XML.SAP_BAPI_COMPANYCODE_GETLIST.SAP_COMPANYCODE_LIST[A].COMPANY_CODE as CHAR),
CAST(InputRoot.XML.SAP_BAPI_COMPANYCODE_GETLIST.SAP_COMPANYCODE_LIST[A].NAME_OF_THE_COMPANY_CODE_OR_COMPANY as character));
SET A=A+1;
END WHILE;
END;

-- CREATE PROCEDURE CopyEntireMessage() BEGIN

-- END;
END MODULE;



best regards & thanks
kishore Muthyala
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
satyasheel
PostPosted: Tue Mar 30, 2004 2:40 am    Post subject: Solution Reply with quote

Newbie

Joined: 03 Jul 2002
Posts: 4
Location: Pune, India

Hi,

Please uncomment the CopyMessageHeader() function. Also check that you have created the following steps:-
1. Created the ODBC Connection of the database.
2. Check the connection with the login id and password.
3. Go to the properties of your Compute Node :dbmsgfl1_Compute and
and enter the Database Name in the Data Source property and
make Transaction to Commit.

Redeploy and then let me know.

Try this code:
CREATE COMPUTE MODULE dbmsgfl1_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN

CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();

RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders()
BEGIN

DECLARE A INTEGER 1;
DECLARE COMPANY_CODE CHAR;
DECLARE NAME_OF_THE_COMPANY CHAR;

-- DECLARE ref1 REFERENCE TO OutputRoot.XML.Company;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);

WHILE A <= CARDINALITY(InputRoot.XML.SAP_BAPI_COMPANYCODE_GETLIST.SAP_COMPANYCODE_LIST[])
DO
SET OutputRoot = InputRoot;

INSERT INTO Database.SAP_BAPI_COMPANYCODE_GETLIST(COMPANY_CODE,NAME_OF_THE_COMPANY)
VALUES(CAST(InputRoot.XML.SAP_BAPI_COMPANYCODE_GETLIST.SAP_COMPANYCODE_LIST[A].COMPANY_CODE as CHAR),
CAST(InputRoot.XML.SAP_BAPI_COMPANYCODE_GETLIST.SAP_COMPANYCODE_LIST[A].NAME_OF_THE_COMPANY_CODE_OR_COMPANY as character));
SET A=A+1;
END WHILE;
END;

-- CREATE PROCEDURE CopyEntireMessage() BEGIN

-- END;
END MODULE;

Regards,

Satyasheel
IBM GSI Calcutta
_________________
Satyasheel
IBM Global Services India Private Limited
Calcutta, India
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » help needed urgently for putting data in DB2
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.