could anybody help me pls. the below is the text file. It contains n message flows and n nodes. i have to search each message flows which is available in that text file and if i select any text file it shoukd display the nodes which are available ... could u pls help me how to search those message flows and nodes. thank you

MessageFlow
  uuid='562b3400-2c01-0000-0080-eda32f380a61'
  userTraceLevel='none'
  traceLevel='none'
  userTraceFilter='none'
  traceFilter='none'
  label='CBB_WMB_BibForceAccount_001'
  additionalInstances='0'
  commitCount='1'
  commitInterval='0'
  coordinatedTransaction='no'
  ComIbmMQOutputNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_1'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='VALIDACCOUNT_OUT_MSG_BACKUP.BackUpQueue'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName='WMB.WMB.ARCV_VALIDACCOUNTBACKUP'
    destinationMode='fixed'
    transactionMode='no'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmFilterNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='VALIDACCOUNT_OUT_MSG_BACKUP.Is Message To Be Backed Up'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    filterExpression='
CREATE SCHEMA ""

CREATE FILTER MODULE WMB_WMB_BibForceAccountBackup_10_001_TRUE
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		RETURN TRUE;
	END;

END MODULE;
'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='true'
    OutputTerminal
      uuid='false'
    OutputTerminal
      uuid='unknown'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_5'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='VALIDACCOUNT_OUT_MSG_BACKUP.SetExpiry'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE WMB_WMB_BibForceAccountBackup_10_001_SetExpiry
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		
--		CALL CopyMessageHeaders();
		
		SET OutputRoot.MQMD.Expiry = 18144000;
		SET OutputRoot = InputRoot;		
				
		RETURN TRUE;
	END;

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

END MODULE;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmFlowOrderNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_16'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='FlowOrder'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='first'
    OutputTerminal
      uuid='second'
    OutputTerminal
      uuid='failure'
  ComIbmFlowOrderNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_17'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='FlowOrder1'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='first'
    OutputTerminal
      uuid='second'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_19'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='RouteV2'
    dataSource='MICHBPR'
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE CBB_WMB_BibForceAccount_001_RouteV2
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		
		CALL CopyEntireMessage();
		  
	 --     SET OutputRoot.Properties.MessageDomain            = 'XML'; 
	 --  	SET OutputRoot.Properties.MessageSet               = 'HVMHSA4002001';
	 --  	SET OutputRoot.Properties.MessageType              = 'SiebelMessage';
	 --  	SET OutputRoot.Properties.MessageFormat            = 'XML1';
		  		
	 --   Checking Mandatory field for NULL	
	 	
	 --	  CALL CheckNull();
		
		-- Query table SFA_ROUTE_LOCATION_T to fetch destination queue
		CALL SetDestination(); 
		 
		RETURN TRUE;
	END;

	CREATE PROCEDURE CopyMessageHeaders() BEGIN
		DECLARE I INTEGER 1;
		DECLARE J INTEGER 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;

	CREATE PROCEDURE CheckNull( ) BEGIN
		
		IF FIELDVALUE ( OutputRoot.MRM.ListOfInterfaceAccountIo.Account.AccountStatus ) IS NULL THEN
			-- Throw exception if AccountStatus field is NULL
			THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [AccountStatus]');			

		END IF;	

		IF FIELDVALUE ( OutputRoot.MRM.ListOfInterfaceAccountIo.Account.AccountCode ) IS NULL THEN
			-- Throw exception if AccountCode field is NULL
			THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [AccountCode]');			

		END IF;	
		
		IF FIELDVALUE ( OutputRoot.MRM.ListOfInterfaceAccountIo.Account.EUsubType ) IS NULL THEN
			-- Throw exception if EUsubType field is NULL
			THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [EUsubType]');			

		END IF;	

		SET Environment.Variables.ProductLineDetail[] = (SELECT PLD FROM OutputRoot.MRM.ListOfInterfaceAccountIo.Account.ListOfProductLines.ProductLineDetail[] AS PLD 
																		WHERE PLD.PrimaryProductLine = 'Y'); 
		
		DECLARE envRef REFERENCE TO Environment.Variables.ProductLineDetail;
		WHILE LASTMOVE(envRef) DO
			
			IF FIELDVALUE ( envRef.ProductLine ) IS NULL THEN
				-- Throw exception if ProductLine field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [ProductLine]');
				
			END IF; 
			
			IF FIELDVALUE ( envRef.Program ) IS NULL THEN
				-- Throw exception if Program field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [Program]');
				
			END IF; 
			
			IF FIELDVALUE ( envRef.SalesArea ) IS NULL THEN
				-- Throw exception if SalesArea field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [SalesArea]');
				
			END IF; 
			
			IF FIELDVALUE ( envRef.ProductLineBusinessOrientation ) IS NULL THEN
				-- Throw exception if ProductLineBusinessOrientation field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [ProductLineBusinessOrientation]');
				
			END IF; 
			
			MOVE envRef NEXTSIBLING REPEAT TYPE NAME;
		END WHILE;
		
		IF FIELDVALUE ( OutputRoot.MRM.ListOfInterfaceAccountIo.Account.New ) IS NULL THEN
			-- Throw exception if New field is NULL
			THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [New]');			
		
		END IF;
		
		DECLARE addressRef REFERENCE TO OutputRoot.MRM.ListOfInterfaceAccountIo.Account.ListOfAddress.Address; 
		WHILE LASTMOVE(addressRef) DO
			
			IF FIELDVALUE ( addressRef.City ) IS NULL THEN
				-- Throw exception if City field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [City]');
				
			END IF;
			
			IF FIELDVALUE ( addressRef.StateProvince ) IS NULL THEN
				-- Throw exception if StateProvince field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [StateProvince]');
				
			END IF;

			IF FIELDVALUE ( addressRef.AddressLine1 ) IS NULL THEN
				-- Throw exception if AddressLine1 field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [AddressLine1]');
				
			END IF;

			MOVE addressRef NEXTSIBLING REPEAT TYPE NAME;
		END WHILE; 
							
		DECLARE contactRef REFERENCE TO OutputRoot.MRM.ListOfInterfaceAccountIo.Account.ListOfContact.Contact; 
		WHILE LASTMOVE(contactRef) DO
			
			DECLARE organizRef REFERENCE TO contactRef.ListOfOrganization.Organization;
			WHILE LASTMOVE(organizRef) DO
				
				IF FIELDVALUE ( organizRef.OrganizationName ) IS NULL THEN
					-- Throw exception if OrganizationName field is NULL
					THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [OrganizationName]');
					
				END IF;
				
				MOVE organizRef NEXTSIBLING REPEAT TYPE NAME;
			END WHILE;
			
			MOVE contactRef NEXTSIBLING REPEAT TYPE NAME;
		END WHILE; 
		
		DECLARE affiliatRef REFERENCE TO OutputRoot.MRM.ListOfInterfaceAccountIo.Account.ListOfAffiliation.Affiliation;
		WHILE LASTMOVE(affiliatRef) DO
			
			IF FIELDVALUE ( affiliatRef.Brand ) IS NULL THEN
				-- Throw exception if Brand field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [Brand]');
				
			END IF;

			IF FIELDVALUE ( affiliatRef.CommercialTerm ) IS NULL THEN
				-- Throw exception if CommercialTerm field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [CommercialTerm]');
				
			END IF;

			IF FIELDVALUE ( affiliatRef.Value ) IS NULL THEN
				-- Throw exception if Value field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [Value]');
				
			END IF;

			IF FIELDVALUE ( affiliatRef.Relationship ) IS NULL THEN
				-- Throw exception if Relationship field is NULL
				THROW USER EXCEPTION MESSAGE 1311 VALUES('Exception: NOT NULL field Violation: [Relationship]');
				
			END IF;

			MOVE affiliatRef NEXTSIBLING REPEAT TYPE NAME;
		END WHILE;

	END;
	
	CREATE PROCEDURE SetDestination() BEGIN
		
		DECLARE cardi INTEGER; 
		DECLARE index INTEGER 1; 
		DECLARE bIsDestPresent BOOLEAN FALSE; 
		
		
		DECLARE pListOfOrganization REFERENCE TO InputRoot.XML.SiebelMessage.ListOfInterfaceAccountIo.Account.ListOfOrganization; 
		-- Take the cardinatlity of the Organization field
		SET cardi = CARDINALITY ( pListOfOrganization.Organization[] ); 
		
		WHILE ( index <= cardi )  DO
			
			-- check whether the copied primaryFlag value is "Y"
			IF ( pListOfOrganization.Organization[index].Primary = 'Y' ) THEN
				
				-- If primaryFlag value is "Y" then copy the Organization field value to
				-- Environment Variable
				SET Environment.Variables.Destination = pListOfOrganization.Organization[index].OrganizationName;
				
				-- flag is set to TRUE only if there is atleast one primary field set to "Y"
				SET bIsDestPresent = TRUE;
				
			END IF;
			
			SET index = index + 1;
			
		END WHILE; 
		
		-- Check if flag is set to TRUE
		IF ( bIsDestPresent ) THEN
			
			-- Query the table using organizationName field
			SET Environment.Variables.DestinationQueue =
			THE ( SELECT T.QUEUENAME
			FROM Database.SFA_ROUTE_LOCATION_T
			AS T
			WHERE T.DESTINATION = Environment.Variables.Destination);
			
			-- Check if any proper destination is set in the Environment variable
			IF ( Environment.Variables.DestinationQueue.QUEUENAME IS NULL ) THEN
				
				-- If not set then throw exception saying invalid destination
				THROW USER EXCEPTION MESSAGE 1313 VALUES('Exception: Invalid Destination: [' || Environment.Variables.Destination || ']');
				
			END IF;
			
		ELSE
			
			-- If none of the Primary field is set to "Y"
			THROW USER EXCEPTION MESSAGE 1312 VALUES('Exception: No Proper Primary Destination Set In The Message');
			
		END IF; 
		
		-- Copy the destination queue name from Environment variable to Destination List
		SET OutputLocalEnvironment.Destination.MQ.DestinationData[1].queueName = Environment.Variables.DestinationQueue.QUEUENAME; 
	END; 
	
END MODULE;
'
    computeMode='all'
    validate='no'
    freeResources='no'
    validateMaster='contentAndValue'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmResetContentDescriptorNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_2'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='XML CONVERSION'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='deferred'
    validateValueConstraints='full'
    validateFixup='none'
    messageDomain='XML'
    messageSet=''
    messageType=''
    messageFormat=''
    resetMessageDomain='yes'
    resetMessageSet='no'
    resetMessageType='no'
    resetMessageFormat='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmMQInputNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_21'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='CBB.WMB.ASND_VALIDACCOUNT'
    validateMaster='contentAndValue'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    messageDomainProperty='BLOB'
    messageSetProperty=''
    messageTypeProperty=''
    messageFormatProperty=''
    topicProperty=''
    queueName='CBB.WMB.ASND_VALIDACCOUNT'
    transactionMode='yes'
    orderMode='default'
    logicalOrder='yes'
    allMsgsAvailable='no'
    matchMsgId='no'
    matchCorrelId='no'
    convert='no'
    convertEncoding='546'
    convertCodedCharSetId='0'
    commitByMessageGroup='no'
    validate='no'
    rootParserClassName='MqRoot'
    tempDynamicQueue='no'
    orderByCorrelIdMask='ffffffffffffffffffffffffffffffffffffffffffffffff'
    serializationToken=''
    hpo='no'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
    OutputTerminal
      uuid='catch'
  ComIbmMQOutputNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_22'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='CBB.WMB.ASND_VALIDACCOUNTFAILURE'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName='CBB.WMB.ASND_VALIDACCOUNTFAILURE'
    destinationMode='fixed'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmMQOutputNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_23'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='DestinationQ'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName=''
    destinationMode='list'
    transactionMode='no'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_24'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='SetFailMsgProps'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE CBB_WMB_BibForceAccount_001_SetFailMsgProps
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		SET OutputRoot=InputRoot;
		SET OutputRoot.MQMD.Expiry=-1;
		SET OutputRoot.MQMD.Persistence=1;		
	END;
END MODULE;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_25'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='Generate_XML_Error_Message'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

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

		SET OutputRoot.Properties.MessageFormat = 'XML'; 
		
			
		-- Extract the error specific details
		DECLARE ExceptionType CHARACTER; /* Indicates the type of exception */
		DECLARE ErrorNumber INTEGER 0; /* Indicates the error number */
		DECLARE ErrorSeverity INTEGER 0; /* Indicates the error number */
		DECLARE ErrorSource CHARACTER; /* Indicates the source of error */
		DECLARE cErrorText CHARACTER ''; /* Captures the error text */
		
		DECLARE nInsert INTEGER 0; 
		
		DECLARE nIndex INTEGER 1; 
		
		
		
		DECLARE pExceptionList REFERENCE TO InputExceptionList.*[1]; 
		
		
		WHILE pExceptionList.Number IS NOT NULL DO
			
			SET ExceptionType = FIELDNAME(pExceptionList);
			
			SET ErrorNumber = pExceptionList.Number;
			
			IF pExceptionList.Severity IS NOT NULL THEN
				SET ErrorSeverity = pExceptionList.Severity;
			END IF;
			
			IF pExceptionList.Label IS NOT NULL THEN
				SET ErrorSource = pExceptionList.Label;
			END IF;
			
			IF pExceptionList.Text IS NOT NULL THEN
				SET cErrorText = cErrorText || pExceptionList.Text || ' : ';
			END IF;
			
			
			SET nInsert = CARDINALITY(pExceptionList.Insert[]);
			
			
			IF nInsert > 0 THEN
				
				WHILE nIndex <= nInsert DO
					
					IF pExceptionList.Insert[nIndex].Text <> '' THEN
						
						SET cErrorText = cErrorText || pExceptionList.Insert[nIndex].Text || ' : ';
						
					END IF;
					
					SET nIndex = nIndex + 1;
					
				END WHILE;
				
			END IF;
			
			
			SET nIndex = 1;
			
			MOVE pExceptionList LASTCHILD;
			
			
		END WHILE; 
		
		DECLARE transferedDate CHARACTER; 
		DECLARE transferedTime CHARACTER; 
		DECLARE name CHARACTER; 
		DECLARE headerInfo REFERENCE TO Environment.Variables.HeaderInfo; 
		DECLARE recievedYear CHARACTER;
		DECLARE recievedMonth CHARACTER;
		DECLARE recievedDay CHARACTER;
		DECLARE recievedDate CHARACTER;
		DECLARE recievedTime CHARACTER;
		DECLARE temp CHARACTER;
		DECLARE	transferedYear CHARACTER;
		DECLARE	transferedMonth CHARACTER;
		DECLARE	transferedDay CHARACTER;
						
		SET recievedYear = EXTRACT ( YEAR FROM CURRENT_DATE);
		SET recievedMonth = EXTRACT ( MONTH FROM CURRENT_DATE);
		SET recievedDay = EXTRACT ( DAY FROM CURRENT_DATE);
		SET recievedTime = TRIM ( TRAILING '''' FROM ( SUBSTRING (CAST ( CURRENT_TIME AS CHARACTER ) FROM 7)));
			
		SET recievedDate = recievedMonth || '/' || recievedDay || '/' || recievedYear || ' ' || recievedTime ;		
				
		SET temp = TRIM ( TRAILING '''' FROM ( SUBSTRING (CAST ( InputRoot.MQMD.PutDate AS CHARACTER ) FROM 7))); 
		
		SET transferedYear = SUBSTRING ( temp FROM 1 FOR 4 );
		SET transferedMonth = SUBSTRING ( temp FROM 6 FOR 2 );
		SET transferedDay = SUBSTRING ( temp FROM 9 FOR 2 );
		
		SET transferedDate = transferedMonth || '/' || transferedDay || '/' || transferedYear;
		
		SET transferedTime = TRIM ( TRAILING '''' FROM ( SUBSTRING (CAST ( InputRoot.MQMD.PutTime AS CHARACTER ) FROM 10))); 
		
		SET name = headerInfo.ProcessName ||headerInfo.ProcessVersion || headerInfo.BPId || headerInfo.SubscriptionNumber ; 
		
		
		Set OutputRoot.XML.SiebelMessage.(XML.attr)"MessageType"='Integration Object'; 
		Set OutputRoot.XML.SiebelMessage.(XML.attr)"IntObjectName"='TP WMQ Error IO'; 
		Set OutputRoot.XML.SiebelMessage.(XML.attr)"IntObjectFormat"='Siebel Hierarchical'; 
		Set OutputRoot.XML.SiebelMessage.(XML.attr)"ProcessName"='DUMMY'; 
		Set OutputRoot.XML.SiebelMessage.(XML.attr)"ProcessVersion"='2.0'; 
		Set OutputRoot.XML.SiebelMessage.(XML.attr)"ProcessType"='CONNECTOR'; 
		
		-- Construct the error message based on the fields extracted
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.DataReferenceLanguage = 'ENU'; 
		
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.InboundMessage.OriginalMessage = CAST (InputBody.BLOB AS CHARACTER CCSID InputRoot.Properties.CodedCharSetId ENCODING InputRoot.Properties.Encoding); 
		
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.InboundMessage.ErrorMessage.ErrorType = ExceptionType;  
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.InboundMessage.ErrorMessage.ErrorSource = ErrorSource; 

		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.InboundMessage.ErrorMessage.ErrorNumber = ErrorNumber; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.InboundMessage.ErrorMessage.ErrorText = cErrorText; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.ErrorCode = 'E'; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.Error = 'E001'; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.MessageReferenceLanguage = 'ENU'; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.Name = name; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.ProcessedDate = ''; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.ReceivedDate = recievedDate; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.TransferredDate = transferedDate || ' ' || transferedTime; 
		SET OutputRoot.XML.SiebelMessage.ListOfTPWmqErrorIo.WmqError.Type = 'Connector'; 
		
		RETURN TRUE;
	END;

	CREATE PROCEDURE CopyMessageHeaders() BEGIN
		DECLARE I INTEGER 1;
		DECLARE J INTEGER 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;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_26'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='SetEnvironment'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

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

		SET Environment.Variables.EmailDetails.LocationId = 'SFA-China';
		SET Environment.Variables.EmailDetails.Subject = 'SFA-China : Error in processing message';
		 
		RETURN TRUE;
	END;

	CREATE PROCEDURE CopyMessageHeaders() BEGIN
		DECLARE I INTEGER 1;
		DECLARE J INTEGER 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;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_27'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='FormulateMail'
    dataSource='MICHBPR'
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE CBB_WMB_BibForceAccount_001_FormulateMail
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		 CALL CopyMessageHeaders();
		-- CALL CopyEntireMessage();
		
		-- Extract the error specific details
		DECLARE errorInfo CHARACTER ''; /* Captures the error text */
		
		DECLARE treeRef REFERENCE TO InputExceptionList.*[1];
		
		-- Move the reference to the last child of the exception tree from which the
		-- information can be derived from.
		WHILE treeRef.*[<].Number IS NOT NULL DO
			MOVE treeRef LASTCHILD;
		END WHILE;
		
		-- Constructs the error type and error description		
		DECLARE errorList REFERENCE TO InputExceptionList.*[1];
		DECLARE errorType CHARACTER;
		DECLARE errorDesc CHARACTER '';
		DECLARE nInsert INTEGER 0; 
		DECLARE nIndex INTEGER 1;
		
		DECLARE LF CHAR CAST(CAST(X'0D' AS BLOB) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId );
		DECLARE CR CHAR CAST(CAST(X'0A' AS BLOB) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId );
		DECLARE CRLF CHAR LF ||CR; 
		
		WHILE errorList.Number IS NOT NULL DO
			SET errorType = FIELDNAME(errorList);
			IF errorList.Text IS NOT NULL THEN
				SET errorDesc = errorDesc || errorList.Text || ' : ';
			END IF;
			SET nInsert = CARDINALITY(errorList.Insert[]);
			IF nInsert > 0 THEN
				WHILE nIndex <= nInsert DO
					IF errorList.Insert[nIndex].Text <> '' THEN
						SET errorDesc = errorDesc || errorList.Insert[nIndex].Text || ' : ';
					END IF;
					SET nIndex = nIndex + 1;
				END WHILE;
			END IF;
			SET nIndex = 1;
			SET errorDesc = errorDesc || CRLF;
			MOVE errorList LASTCHILD;
		END WHILE;
		
		SET errorInfo = errorInfo || treeRef.Text || ':';
		
		DECLARE ccId CHARACTER Environment.Variables.EmailDetails.CcId;
		DECLARE locId CHARACTER Environment.Variables.EmailDetails.LocationId;	
		
		SET OutputRoot.XML.Message.Subject = Environment.Variables.EmailDetails.Subject;
		
		SET OutputRoot.XML.Message.Body.Line[1] = 'The following error has been encountered : ' || errorInfo;
		SET OutputRoot.XML.Message.Body.Line[2] = 'Error Type : ' || errorType ;
		SET OutputRoot.XML.Message.Body.Line[3] = 'Error Description : '|| errorDesc;
		SET OutputRoot.XML.Message.Body.Line[4] = 'This is an autogenerated mail from the EAI hub. Do not reply to this mail';
		SET OutputRoot.XML.Message.EncodingBase64.(XML.attr)"ContentType"='text/plain';
		SET OutputRoot.XML.Message.EncodingBase64.(XML.attr)"Name"='attachment.xml';
		SET OutputRoot.BLOB.BLOB = BITSTREAM(InputRoot.BLOB.BLOB);
		
		DECLARE columns CHARACTER '';
		
		-- The column names end with a comma so that the next field can be separated. 
		-- The comma has to be put even for the last column. The last comma would be stripped
		-- before querying the table.
		
		IF Environment.Variables.EmailDetails.Subject IS NULL THEN
			SET OutputRoot.XML.Message.Subject = 'Error in processing Message';
		END IF;
		
		IF Environment.Variables.EmailDetails.CcId IS NULL THEN
			SET columns = columns || 'T.CCID,';
		END IF;
		
		IF Environment.Variables.EmailDetails.FromId IS NULL THEN
			SET columns = columns || 'T.FROMID,';
		END IF;
		
		IF Environment.Variables.EmailDetails.ToId IS NULL THEN
			SET columns = columns || 'T.TOID,';
		END IF;
		
		IF TRIM(columns) <> '' THEN
			
			IF locId IS NULL THEN
				RETURN;
			END IF;
			
			-- Strip the last comma in the string
			SET columns = SUBSTRING(columns FROM 1 FOR LENGTH(columns)-1);
			
			DECLARE Query CHARACTER;
			SET Query = 'SELECT ' || columns || ' FROM TMAIL_DETAILS AS T WHERE T.LocationId = ?';
			
			SET Environment.Variables.EmailDetails[] = 
				 PASSTHRU(Query,locId);
		END IF;
		
		SET OutputRoot.XML.Message.From = Environment.Variables.EmailDetails.FROMID;
		SET OutputRoot.XML.Message.To = Environment.Variables.EmailDetails.TOID;
		SET OutputRoot.XML.Message.Cc = Environment.Variables.EmailDetails.CCID;		
		
		RETURN TRUE;
	END;

	CREATE PROCEDURE CopyMessageHeaders() BEGIN
		DECLARE I INTEGER 1;
		DECLARE J INTEGER 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;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  SendMailPlugInNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_28'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='SendMailPlugIn'
    f=''
    h=''
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmMQOutputNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_29'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='CBB.WMB.ASND_VALIDACCOUNTERROR'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName='CBB.WMB.ASND_VALIDACCOUNTERROR'
    destinationMode='fixed'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_3'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='Add_XML_Decl'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE CBB_WMB_BibForceAccount_001_Add_XML_Decl
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		
		CALL CopyMessageHeaders();

		-- Setting XML declarations
		SET OutputRoot.XML.(XML.XmlDecl)='';
		SET OutputRoot.XML.(XML.XmlDecl).(XML.Version)='1.0';
		SET OutputRoot.XML.(XML.XmlDecl).(XML."Encoding")='UTF-8'; 
		SET OutputRoot.XML.(XML.ProcessingInstruction)"Siebel-Property-Set"='';
		SET OutputRoot.XML.(XML.ProcessingInstruction)"Siebel-Property-Set" = 'EscapeNames="false"';
		 
		SET OutputRoot.XML.SiebelMessage = InputRoot.XML.SiebelMessage;
		
		RETURN TRUE;
	END;

	CREATE PROCEDURE CopyMessageHeaders() BEGIN
		DECLARE I INTEGER 1;
		DECLARE J INTEGER 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;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='contentAndValue'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmThrowNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_30'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='Throw'
    messageCatalog=''
    messageNumber='3001'
    messageText=''
    InputTerminal
      uuid='in'
  ComIbmMQOutputNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_1'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='VALIDACCOUNT_IN_MSG_BACKUP.BackUpQueue'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName='CBB.WMB.ASND_VALIDACCOUNTBACKUP'
    destinationMode='fixed'
    transactionMode='no'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmFilterNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='VALIDACCOUNT_IN_MSG_BACKUP.Is Message To Be Backed Up'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    filterExpression='
CREATE SCHEMA ""

CREATE FILTER MODULE WMB_WMB_BibForceAccountBackup_10_001_TRUE
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		RETURN TRUE;
	END;

END MODULE;
'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='true'
    OutputTerminal
      uuid='false'
    OutputTerminal
      uuid='unknown'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_5'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='VALIDACCOUNT_IN_MSG_BACKUP.SetExpiry'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE WMB_WMB_BibForceAccountBackup_10_001_SetExpiry
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		
--		CALL CopyMessageHeaders();
		
		SET OutputRoot.MQMD.Expiry = 18144000;
		SET OutputRoot = InputRoot;		
				
		RETURN TRUE;
	END;

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

END MODULE;
'
    computeMode='message'
    validate='no'
    freeResources='no'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='complete'
    validateValueConstraints='full'
    validateFixup='none'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmResetContentDescriptorNode
    uuid='CBB_WMB_BibForceAccount_001#FCMComposite_1_36'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='Parse_Input_Msg'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='deferred'
    validateValueConstraints='full'
    validateFixup='none'
    messageDomain='XML'
    messageSet=''
    messageType=''
    messageFormat=''
    resetMessageDomain='yes'
    resetMessageSet='no'
    resetMessageType='no'
    resetMessageFormat='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
    sourceTerminal='true'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_5'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_5'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_1'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_16'
    sourceTerminal='first'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
    targetTerminal='in'
    LogicalConnection
      layer='1'
      sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_16'
      sourceTerminal='first'
      targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31'
      targetTerminal='Input'
    LogicalConnection
      layer='2'
      sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#InTerminal.Input'
      sourceTerminal='out'
      targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
      targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_16'
    sourceTerminal='second'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_36'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_17'
    sourceTerminal='first'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_25'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_17'
    sourceTerminal='second'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_26'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_19'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_2'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_2'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_3'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_21'
    sourceTerminal='catch'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_17'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_21'
    sourceTerminal='failure'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_24'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_21'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_16'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_23'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
    targetTerminal='in'
    LogicalConnection
      layer='1'
      sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_23'
      sourceTerminal='out'
      targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1'
      targetTerminal='Input'
    LogicalConnection
      layer='2'
      sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#InTerminal.Input'
      sourceTerminal='out'
      targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_1.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
      targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_24'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_22'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_25'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_29'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_26'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_27'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_27'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_28'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_28'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_30'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_3'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_23'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_3'
    sourceTerminal='true'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_5'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_5'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_31.WMB_WMB_BibForceAccountBackup_10_001#FCMComposite_1_1'
    targetTerminal='in'
  Connection
    sourceNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_36'
    sourceTerminal='out'
    targetNode='CBB_WMB_BibForceAccount_001#FCMComposite_1_19'
    targetTerminal='in'
MessageFlow
  uuid='Configuration'
  userTraceLevel='none'
  traceLevel='none'
  userTraceFilter='none'
  traceFilter='none'
  label='ConfigurationMessageFlow'
  additionalInstances='0'
  commitCount='1'
  commitInterval='5'
  coordinatedTransaction='no'
  ComIbmConfigurationNode
    uuid='ConfigurationNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='ConfigurationNode'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
  ComIbmTryCatchNode
    uuid='DisposalNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='FailedMessageDisposalNode'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='catch'
    OutputTerminal
      uuid='try'
  ComIbmMQInputNode
    uuid='InputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='InputNode'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='deferred'
    validateValueConstraints='full'
    validateFixup='none'
    messageDomainProperty='XML'
    messageSetProperty=''
    messageTypeProperty=''
    messageFormatProperty=''
    topicProperty=''
    queueName='SYSTEM.BROKER.EXECUTIONGROUP.QUEUE'
    transactionMode='yes'
    orderMode='default'
    logicalOrder='yes'
    allMsgsAvailable='no'
    matchMsgId='no'
    matchCorrelId='136363d3210100000080a394d38b997e0000000000000000'
    convert='no'
    convertEncoding='546'
    convertCodedCharSetId='0'
    commitByMessageGroup='no'
    validate='no'
    rootParserClassName='MqRoot'
    tempDynamicQueue='no'
    orderByCorrelIdMask='ffffffffffffffffffffffffffffffffffffffffffffffff'
    serializationToken=''
    hpo='no'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
    OutputTerminal
      uuid='catch'
  ComIbmMQOutputNode
    uuid='OutputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='outputNode'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName=''
    destinationMode='reply'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  Connection
    sourceNode='ConfigurationNode'
    sourceTerminal='out'
    targetNode='OutputNode'
    targetTerminal='in'
  Connection
    sourceNode='InputNode'
    sourceTerminal='failure'
    targetNode='DisposalNode'
    targetTerminal='in'
  Connection
    sourceNode='InputNode'
    sourceTerminal='out'
    targetNode='ConfigurationNode'
    targetTerminal='in'
MessageFlow
  uuid='PubSubControl'
  userTraceLevel='none'
  traceLevel='none'
  userTraceFilter='none'
  traceFilter='none'
  label='PubSubControlMsgFlow'
  additionalInstances='0'
  commitCount='1'
  commitInterval='5'
  coordinatedTransaction='no'
  ComIbmPSControlNode
    uuid='ControlNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='ControlNode'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='response'
    OutputTerminal
      uuid='publishRetained'
    OutputTerminal
      uuid='publishSystem'
    OutputTerminal
      uuid='forwardControl'
    OutputTerminal
      uuid='sendToMain'
  ComIbmMQInputNode
    uuid='InputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='InputNode'
    validateMaster='none'
    validateFailureAction='exception'
    validateTiming='deferred'
    validateValueConstraints='full'
    validateFixup='none'
    messageDomainProperty='XML'
    messageSetProperty=''
    messageTypeProperty=''
    messageFormatProperty=''
    topicProperty=''
    queueName='SYSTEM.BROKER.IPC.QUEUE.4484.2011010121211499'
    transactionMode='yes'
    orderMode='default'
    logicalOrder='yes'
    allMsgsAvailable='no'
    matchMsgId='no'
    matchCorrelId='no'
    convert='no'
    convertEncoding='546'
    convertCodedCharSetId='0'
    commitByMessageGroup='no'
    validate='no'
    rootParserClassName='MqRoot'
    tempDynamicQueue='yes'
    orderByCorrelIdMask='ffffffffffffffffffffffffffffffffffffffffffffffff'
    serializationToken=''
    hpo='no'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
    OutputTerminal
      uuid='catch'
  ComIbmMQOutputNode
    uuid='ListOutputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='ListOutputNode'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName=''
    destinationMode='list'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='setIdentity'
    requQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmMQeOutputNode
    uuid='MQeRetainedOutputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='MQeRetainedOutputNode'
    queueManagerName=''
    queueName=''
    destMode='list'
    request='no'
    replyToQMgr=''
    replyToQ=''
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmMQOutputNode
    uuid='MainControlOutputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='MainControlOutputNode'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName='QPSGBRK1'
    queueName='SYSTEM.BROKER.CONTROL.QUEUE'
    destinationMode='fixed'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmPSServiceNode
    uuid='MatchingNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='MatchingNode'
    subscriptionPoint=''
    implicitStreamNaming='true'
    InputTerminal
      uuid='in'
    InputTerminal
      uuid='inMatched'
    OutputTerminal
      uuid='response'
    OutputTerminal
      uuid='publish'
  ComIbmMQOutputNode
    uuid='ReplyOutputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='ReplyOutputNode'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName=''
    destinationMode='reply'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmSCADAOutputNode
    uuid='SCADARetainedOutputNode'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='SCADARetainedOutputNode'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='forwardControl'
    targetNode='ListOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='publishRetained'
    targetNode='ListOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='publishRetained'
    targetNode='MQeRetainedOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='publishRetained'
    targetNode='SCADARetainedOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='publishSystem'
    targetNode='MatchingNode'
    targetTerminal='in'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='response'
    targetNode='ReplyOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='ControlNode'
    sourceTerminal='sendToMain'
    targetNode='MainControlOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='InputNode'
    sourceTerminal='out'
    targetNode='ControlNode'
    targetTerminal='in'
  Connection
    sourceNode='MatchingNode'
    sourceTerminal='publish'
    targetNode='ListOutputNode'
    targetTerminal='in'
  Connection
    sourceNode='MatchingNode'
    sourceTerminal='response'
    targetNode='ReplyOutputNode'
    targetTerminal='in'
MessageFlow
  uuid='ee2368d3-2101-0000-0080-eda32f380a61'
  userTraceLevel='none'
  traceLevel='none'
  userTraceFilter='none'
  traceFilter='none'
  label='WMB_WMB_V2Tov1_10_001'
  additionalInstances='0'
  commitCount='1'
  commitInterval='0'
  coordinatedTransaction='no'
  ComIbmMQInputNode
    uuid='WMB_WMB_V2Tov1_10_001#FCMComposite_1_1'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='WMB.CNL.ARCV_VALIDACCOUNT'
    validateMaster='contentAndValue'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    messageDomainProperty='XML'
    messageSetProperty=''
    messageTypeProperty=''
    messageFormatProperty=''
    topicProperty=''
    queueName='WMB.CNL.ARCV_VALIDACCOUNT'
    transactionMode='yes'
    orderMode='default'
    logicalOrder='yes'
    allMsgsAvailable='no'
    matchMsgId='no'
    matchCorrelId='no'
    convert='no'
    convertEncoding='546'
    convertCodedCharSetId='0'
    commitByMessageGroup='no'
    validate='no'
    rootParserClassName='MqRoot'
    tempDynamicQueue='no'
    orderByCorrelIdMask='ffffffffffffffffffffffffffffffffffffffffffffffff'
    serializationToken=''
    hpo='no'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
    OutputTerminal
      uuid='catch'
  SendMailPlugInNode
    uuid='WMB_WMB_V2Tov1_10_001#FCMComposite_1_10'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='SendMailPlugIn'
    f=''
    h=''
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmMQOutputNode
    uuid='WMB_WMB_V2Tov1_10_001#FCMComposite_1_11'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='CBB.WMB.ASND_VALIDACCOUNTERROR'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName='CBB.WMB.ASND_VALIDACCOUNTERROR'
    destinationMode='fixed'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmThrowNode
    uuid='WMB_WMB_V2Tov1_10_001#FCMComposite_1_12'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='Throw'
    messageCatalog=''
    messageNumber='3001'
    messageText=''
    InputTerminal
      uuid='in'
  ComIbmMQOutputNode
    uuid='WMB_WMB_V2Tov1_10_001#FCMComposite_1_2'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='WMB.DMC.ARCV_VALIDACCOUNT'
    validateMaster='inherit'
    validateFailureAction='exception'
    validateTiming='immediate'
    validateValueConstraints='full'
    validateFixup='none'
    queueManagerName=''
    queueName='WMB.DMC.ARCV_VALIDACCOUNT'
    destinationMode='fixed'
    transactionMode='automatic'
    persistenceMode='automatic'
    format='        '
    newMsgId='no'
    newCorrelId='no'
    segmentationAllowed='no'
    alternateUserAuthority='no'
    messageContext='passAll'
    request='no'
    replyToQMgr=''
    replyToQ=''
    hpo='no'
    InputTerminal
      uuid='in'
    OutputTerminal
      uuid='out'
    OutputTerminal
      uuid='failure'
  ComIbmComputeNode
    uuid='WMB_WMB_V2Tov1_10_001#FCMComposite_1_3'
    userTraceLevel='none'
    traceLevel='none'
    userTraceFilter='none'
    traceFilter='none'
    label='TransformV2Tov1.1'
    dataSource=''
    transaction='automatic'
    treatWarningsAsErrors='no'
    throwExceptionOnDatabaseError='yes'
    initialStackSize='256'
    computeExpression='
CREATE SCHEMA ""

CREATE COMPUTE MODULE WMB_WMB_V2Tov1_10_001_TransformV2Tov1
	CREATE FUNCTION Main() RETURNS BOOLEAN
	BEGIN
		CALL CopyMessageHeaders(); 
		
		-- Setting CodedCharSetId
		--		SET OutputRoot.MQMD.CodedCharSetId = 819;
		--		SET OutputRoot.Properties.CodedCharSetId = 819;
		
		DECLARE inRef REFERENCE TO InputRoot.XML; 
		MOVE inRef FIRSTCHILD TYPE Name; 
		
		SET OutputRoot.XML.SiebelMessage.(XML.attr)BPId					= inRef.(XML.attr)BPId; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)CodePage				= inRef.(XML.attr)CodePage; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)DataReferenceLanguage= inRef.(XML.attr)DataReferenceLanguage; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)DateFormat			= inRef.(XML.attr)DateFormat; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)DateReceived			= inRef.(XML.attr)DateReceived; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)DateTransferred		= inRef.(XML.attr)DateTransferred; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)DecimalSeparator		= inRef.(XML.attr)DecimalSeparator; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)HoursCycle			= inRef.(XML.attr)HoursCycle; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)IntObjectFormat		= inRef.(XML.attr)IntObjectFormat; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)IntObjectName		= inRef.(XML.attr)IntObjectName; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)MessageId			= inRef.(XML.attr)MessageId; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)MessageReferenceLanguage= inRef.(XML.attr)MessageReferenceLanguage; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)MessageType			= inRef.(XML.attr)MessageType; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)PartnerReference		= inRef.(XML.attr)PartnerReference; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)ProcessName			= inRef.(XML.attr)ProcessName; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)ProcessType			= inRef.(XML.attr)ProcessType; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)ProcessVersion		= inRef.(XML.attr)ProcessVersion; 
		SET OutputRoot.XML.SiebelMessage.(XML.attr)SubscriptionNumber	= inRef.(XML.attr)SubscriptionNumber; 
		
		-- TRANSFORMATION OF V2 TO V1.1 FORMAT
		
		CREATE FIELD OutputRoot.XML.SiebelMessage.ListOfInterfaceAccountIo.Account; 
		DECLARE outRef REFERENCE TO OutputRoot.XML.SiebelMessage.ListOfInterfaceAccountIo.Account; 
		
		MOVE inRef TO inRef.ListOfInterfaceAccountIo.Account; 
		
		SET outRef.AccountStatus 				 = COALESCE(NULLIF(inRef.AccountStatus,''),''); 
		SET outRef.TranslatedAccountName 		 = COALESCE(NULLIF(inRef.AccountLegalName,''),''); 
		SET outRef.NumofalignmentPositions 		 = 0; 
		SET outRef.Numofbusdrivers	  			 = 0; 
		SET outRef.NumofBusfleets	  			 = 0; 
		SET outRef.NumofBuses		  			 = 0; 
		SET outRef.Numofcustomers 				 = COALESCE(NULLIF(inRef.NumofCustomers,'0'),'0'); 
		SET outRef.Numofemployees 		 		 = COALESCE(NULLIF(inRef.NumofEmployees,'0'),'0'); 
		SET outRef.Numoffleets					 = 0; 
		SET outRef.Numofindependantdrivers		 = 0; 
		SET outRef.NumofPrivatecustomers 		 = COALESCE(NULLIF(inRef.NumofPrivateCustomers,'0'),'0'); 
		SET outRef.Numofprofessionalcustomers 	 = COALESCE(NULLIF(inRef.NumofProfessionalCustomers,'0'),'0'); 
		SET outRef.NumofPubliccustomers 		 = COALESCE(NULLIF(inRef.NumofPublicCustomers,'0'),'0'); 
		SET outRef.Numoftruckdrivers			 = 0; 
		SET outRef.NumofTruckfleets				 = 0; 
		SET outRef.NumofTrucks					 = 0; 
		SET outRef.AccountCode 	 			 	 = COALESCE(NULLIF(inRef.AccountCode,'0'),'0'); 
		SET outRef.AccountsubType 	 			 = COALESCE(NULLIF(inRef.EUsubType,''),''); 
		SET outRef.ValidatedFlag				 = COALESCE(NULLIF(inRef.Validated,''),''); 
		SET outRef.AlignmentFlag 				 = ''; 
		SET outRef.Annualbudget 				 = 0; 
		SET outRef.BalancingFlag 				 = ''; 
		SET outRef.CasingcollectionFlag 		 = ''; 
		SET outRef.Chain 						 = ''; 
		SET outRef.Competitorannualbudget 		 = ''; 
		SET outRef.Competitorannualtirepotential = ''; 
		SET outRef.Competitormonthlyrevenues 	 = ''; 
		SET outRef.DefaultMileageUoM 	 		 = COALESCE(NULLIF(inRef.DefaultMileageUoM,''),''); 
		SET outRef.DefaultPressureUoM 	 		 = COALESCE(NULLIF(inRef.DefaultPressureUoM,''),''); 
		SET outRef.DefaultRTDUoM 	 			 = COALESCE(NULLIF(inRef.DefaultRTDUoM,''),''); 
		
		SET Environment.Variables.Address[] = (SELECT ADD FROM inRef.ListOfAddress.Address[] AS ADD WHERE ADD.Primary = 'Y'); 
		SET outRef.GPSHorizontalInfo 			 = COALESCE(NULLIF(Environment.Variables.Address.GPSLatitude,''),''); 
		SET outRef.GPSVerticalInfo 				 = COALESCE(NULLIF(Environment.Variables.Address.GPSLongitude,''),''); 
		SET outRef.CountyDistrict 			 	 = COALESCE(NULLIF(Environment.Variables.Address.CountyDistrict,''),''); 
		SET outRef.StreetDirectoryInfos 		 = COALESCE(NULLIF(Environment.Variables.Address.StreetDirectory,''),''); 
		
		SET outRef.EnduserBusiness				 = COALESCE(NULLIF(inRef.EUBusiness,''),''); 
		SET outRef.Endusertype					 = COALESCE(NULLIF(inRef.EUType,''),''); 
		SET outRef.Estimatedbudget 				 = 0; 
		SET outRef.FinancialConditions			 = COALESCE(NULLIF(inRef.FinancialConditions,''),''); 
		SET outRef.FleetType 					 = ''; 
		SET outRef.Michelinannualbudget 		 = 0; 
		SET outRef.Michelinmonthlyrevenues 		 = 0; 
		SET outRef.Monthlyrevenues 				 = 0; 
		SET outRef.Partnersince 				 = ''; 
		
		SET Environment.Variables.ProductLineDetail[] = (SELECT PLD FROM inRef.ListOfProductLines.ProductLineDetail[] AS PLD WHERE PLD.PrimaryProductLine = 'Y'); 
		SET outRef.ProductLine 				 	 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.ProductLine,''),''); 
		SET outRef.ProgramStartDate 			 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.StartProgram,''),''); 
		SET outRef.ProgramType 				 	 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.Program,''),''); 
		SET outRef.SalesArea 				 	 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.SalesArea,''),''); 
		SET outRef.Visitduration 				 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.VisitDuration,'0'),'0'); 
		SET outRef.VisitFrequency 				 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.VisitFrequency,'0'),'0'); 
		SET outRef.NumofParkingPositions 		 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.NumofParkingPositions,'0'),'0'); 
		SET outRef.AnnualTirepotential 	 		 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.AnnualTirePotential,'0'),'0'); 
		SET outRef.Michelinannualtirepotential	 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.AnnualMichelinTirePotential,'0'),'0'); 
		SET outRef.AccountType		 	 		 = COALESCE(NULLIF(Environment.Variables.ProductLineDetail.ProductLineBusinessOrientation,''),''); 
		
		SET outRef.RepairFlag 					 = ''; 
		SET outRef.SelectedDealerFlag 			 = 'Y'; 
		SET outRef.ShopType 					 = COALESCE(NULLIF(inRef.Type,''),''); 
		SET outRef.TubelessfittingFlag 			 = ''; 
		SET outRef.TubetypefittingFlag 			 = ''; 
		SET outRef.WinnerFlag					 = COALESCE(NULLIF(inRef.Winner,''),''); 
		SET outRef.CompetitorFlag 				 = ''; 
		SET outRef.Currency				 		 = COALESCE(NULLIF(inRef.Currency,''),''); 
		SET outRef.Dateofopening				 = COALESCE(NULLIF(inRef.Dateofopening,''),''); 
		SET outRef.AccountLastUpdate			 = COALESCE(NULLIF(inRef.AccountLastUpdate,''),''); 
		SET outRef.Language						 = COALESCE(NULLIF(inRef.Language,''),''); 
		SET outRef.LegalForm					 = COALESCE(NULLIF(inRef.LegalForm,''),''); 
		SET outRef.Site					 		 = COALESCE(NULLIF(inRef.Site,''),''); 
		SET outRef.MainFaxNum					 = COALESCE(NULLIF(inRef.MainFaxNum,''),''); 
		SET outRef.MainPhoneNum					 = COALESCE(NULLIF(inRef.MainPhoneNum,''),''); 
		SET outRef.AccountName					 = COALESCE(NULLIF(inRef.AccountName,''),''); 
		SET outRef.ParentAccount				 = COALESCE(NULLIF(inRef.ParentAccount,''),''); 
		SET outRef.Partnerflag					 = ''; 
		SET outRef.SalesRegion					 = COALESCE(NULLIF(inRef.SalesRegion,''),''); 
		SET outRef.New							 = COALESCE(NULLIF(inRef.New,''),''); 
		
		SET outRef.ListOfTerritories.Territory.Primary		 		 = 'Y'; 
		SET outRef.ListOfTerritories.Territory.TerritoryName		 = ''; 
		
		DECLARE accountRef REFERENCE TO inRef.ListOfAccountTeam.AccountTeam; 
		DECLARE accountInd INTEGER 1;		
		WHILE LASTMOVE(accountRef) DO
			
			SET outRef.ListOfAccountTeam.AccountTeam[accountInd].Primary	 = COALESCE(NULLIF(accountRef.(XML.attr)IsPrimaryMVG,''),''); 
			SET outRef.ListOfAccountTeam.AccountTeam[accountInd].Position	 = COALESCE(NULLIF(accountRef.Position,''),''); 
			
			SET accountInd = accountInd + 1;
			MOVE accountRef NEXTSIBLING REPEAT TYPE NAME; 
		END WHILE; 
		
		SET outRef.ListOfOrganization.Organization.Primary		 	 = COALESCE(NULLIF(inRef.ListOfOrganization.Organization.Primary,''),''); 
		SET outRef.ListOfOrganization.Organization.OrganizationName	 = COALESCE(NULLIF(inRef.ListOfOrganization.Organization.OrganizationName,''),''); 
		SET outRef.ListOfOrganization.Organization.Site		 		 = COALESCE(NULLIF(inRef.ListOfOrganization.Organization.Site,''),''); 
		
		DECLARE addressRef REFERENCE TO inRef.ListOfAddress.Address;
		DECLARE addressInd INTEGER 1;
		WHILE LASTMOVE(addressRef) DO
			
			SET outRef.ListOfAddress.Address[addressInd].AddressName		 		 = COALESCE(NULLIF(addressRef.AddressName,''),''); 
			SET outRef.ListOfAddress.Address[addressInd].CLLI 	 					 = ''; 
			SET outRef.ListOfAddress.Address[addressInd].City		 	 			 = COALESCE(NULLIF(addressRef.City,''),''); 
			SET outRef.List

Hello & welcome to Dani Web. Your text file is very long; you can't possibly expect someone to read through it can you? If you want to count something in a text file, like the number of nodes, then you need to first read the text file. You would then need to use an if statement to check whether the current line contains the keyword 'NODE' or whatever it is that represents a node or message flows.
In practice there are numerous ways of doing this, like using an array or using vectors:

public static void readFromFile(String fileToReadFrom)
	{
		try {
		
			int lineCount = 0;
			
			// Used to read from a file
			BufferedReader myFile = new BufferedReader( new FileReader( fileToReadFrom ) );
			String str;
			
			// This makes sure that the line it reads actually contains a value before moving on
			while( ( str =  myFile.readLine() ) != null )
			{
				int limit = str.length();
				int numSpaces = 0;
				char [] myArray = new char[ limit ];
				
				for( int i = 0; i < limit; i++)
				{
					// == used to compare two characters
					myArray[i] = str.charAt(i);
					if( myArray[i] == ' ' )
					{
						numSpaces++;
					}
				}
				
				System.out.println( "Number of Spaces = "+numSpaces );
				lineCount++;
			}
			myFile.close();
		    System.out.println(fileToReadFrom+" contain's "+lineCount+" lines");
			
		    // If there is nothing in the try block then there will be an error message in the catch line
		} catch (IOException e) 
			{
				JOptionPane.showMessageDialog( null, "Error: "+e.getMessage() );
			}
	}

In the code above I am counting the number of spaces in each line. Each line occupies the array when it moves. You could use the same method, with a-bit of tweaking to count the word NODE. This should hopefully get you started :P

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.