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 » Error : Invalid Terminal

Post new topic  Reply to topic
 Error : Invalid Terminal « View previous topic :: View next topic » 
Author Message
arunkumar1989
PostPosted: Wed Nov 21, 2012 4:39 am    Post subject: Error : Invalid Terminal Reply with quote

Voyager

Joined: 21 Nov 2012
Posts: 98
Location: Chennai

I have created a small application ...In that i have put 1 MQ Input and 3 MQ Output.... and 1 compute node.... the compute node process are done successfully.... while PROPAGATING only getting invalid terminal error..



this is my code :



CREATE COMPUTE MODULE DateManipulationFlow_Compute
DECLARE dob,doj,now TIMESTAMP CURRENT_TIMESTAMP;
DECLARE age,experience INTEGER 0;
DECLARE curDesignation CHARACTER;

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
-- CALL CopyEntireMessage();


CALL firstOutput();
PROPAGATE TO TERMINAL 'out';

CALL secondOutput();
PROPAGATE TO TERMINAL 'out1';

CALL thirdOutput();
PROPAGATE TO TERMINAL 'out2';

RETURN TRUE;
END;

CREATE PROCEDURE firstOutput ( )
BEGIN
SET OutputRoot.XMLNSC.EmployeeInfo.EmployeeName=InputRoot.XMLNSC.MyInfo.Name;
SET OutputRoot.XMLNSC.EmployeeInfo.Designation='SoftwareEngineer';

SET now = CAST(CURRENT_TIMESTAMP AS TIMESTAMP FORMAT 'yyyyMMdd-HHmmss');

DECLARE d1 TIMESTAMP InputRoot.XMLNSC.MyInfo.DOB;
SET dob=CAST(d1 AS TIMESTAMP FORMAT 'yyyyMMdd-HHmmss');
SET age=(now-dob)YEAR;
SET OutputRoot.XMLNSC.EmployeeInfo.Age=age;

DECLARE d2 TIMESTAMP InputRoot.XMLNSC.MyInfo.DOJ;
SET doj=CAST(d2 AS TIMESTAMP FORMAT 'yyyyMMdd-HHmmss');
SET experience=(now-doj)YEAR;
SET OutputRoot.XMLNSC.EmployeeInfo.Experience=experience;

SET OutputRoot.XMLNSC.EmployeeInfo.Today=now;

DECLARE gt1 TIMESTAMP CURRENT_GMTTIMESTAMP;
SET OutputRoot.XMLNSC.EmployeeInfo.GMT=now;

-- SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = 'OUTPUT_Q1';



END;

CREATE PROCEDURE secondOutput ( )
BEGIN
-- SET OutputLocalEnvironment.Destination.MQ.DestinationData[2].queueName = 'OUTPUT_Q2';

END;

CREATE PROCEDURE thirdOutput ( )
BEGIN
-- SET OutputLocalEnvironment.Destination.MQ.DestinationData[3].queueName = 'OUTPUT_Q3';
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Back to top
View user's profile Send private message Send e-mail
McueMart
PostPosted: Wed Nov 21, 2012 4:52 am    Post subject: Reply with quote

Chevalier

Joined: 29 Nov 2011
Posts: 490
Location: UK...somewhere

Can you post the full error stack?

Also are you sure that you want to have RETURN TRUE at the end of your Main() function?

Also edit your post and put the code in [ c o d e ] tags!
Back to top
View user's profile Send private message
Esa
PostPosted: Wed Nov 21, 2012 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

Try this:

Code:
CALL firstOutput();
PROPAGATE;

CALL secondOutput();
PROPAGATE TO TERMINAL 1;

CALL thirdOutput();
PROPAGATE TO TERMINAL 2;
Back to top
View user's profile Send private message
arunkumar1989
PostPosted: Wed Nov 21, 2012 5:28 am    Post subject: Reply with quote

Voyager

Joined: 21 Nov 2012
Posts: 98
Location: Chennai

Thanks a lot
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error : Invalid Terminal
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.