| Author | 
		  Message
		 | 
		
		  | mansoorafzal | 
		  
		    
			  
				 Posted: Tue May 19, 2009 12:10 am    Post subject: Name of Output file in Message Broker 6.1 | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 19 May 2009 Posts: 14
  
  | 
		  
		    
			  
				Hi,
 
 
I am new to IBM WebSphere and working with Message Broker 6.1. 
 
I have used FileOutput node to generate the output file. I want to append the date time stamp in the name of the output file.
 
How can I achieve this?
 
 
Thanks in advance,
 
Best Regards. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gs | 
		  
		    
			  
				 Posted: Tue May 19, 2009 12:20 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Master
 
 Joined: 31 May 2007 Posts: 254 Location: Sweden 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Tue May 19, 2009 12:41 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				
   
	| Code: | 
   
  
	SET FileName = CAST(CURRENT_TIMESTAMP AS CHAR FORMAT 'yyyyMMdd-HHmm');
 
SET OutputLocalEnvironment.Destination.File.Name =  'FRED-' || FileName;  | 
   
 
 
 
Make sure the compute node sets the localenvironment. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mansoorafzal | 
		  
		    
			  
				 Posted: Tue May 19, 2009 10:24 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 19 May 2009 Posts: 14
  
  | 
		  
		    
			  
				I have tried to do as you have mentioned but got the following exception:
 
 
ExceptionList:
 
 
( ['MQROOT' : 0x832e258]
 
  (0x01000000):RecoverableException = (
 
    (0x03000000):File                 = 'F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp' (CHARACTER)
 
    (0x03000000):Line                 = 739 (INTEGER)
 
    (0x03000000):Function             = 'ImbDataFlowNode::createExceptionList' (CHARACTER)
 
    (0x03000000):Type                 = 'ComIbmFileOutputNode' (CHARACTER)
 
    (0x03000000):Name                 = 'Converter_MessageFlow#FCMComposite_1_2' (CHARACTER)
 
    (0x03000000):Label                = 'Converter_MessageFlow.BaseII_Flexcube_Target_Output' (CHARACTER)
 
    (0x03000000):Catalog              = 'BIPv610' (CHARACTER)
 
    (0x03000000):Severity             = 3 (INTEGER)
 
    (0x03000000):Number               = 2230 (INTEGER)
 
    (0x03000000):Text                 = 'Node throwing exception' (CHARACTER)
 
    (0x01000000):RecoverableException = (
 
      (0x03000000):File     = 'ComIbmFileOutputNode.java' (CHARACTER)
 
      (0x03000000):Line     = 539 (INTEGER)
 
      (0x03000000):Function = 'locateOutputFile' (CHARACTER)
 
      (0x03000000):Type     = '' (CHARACTER)
 
      (0x03000000):Name     = '' (CHARACTER)
 
      (0x03000000):Label    = '' (CHARACTER)
 
      (0x03000000):Catalog  = 'BIPv610' (CHARACTER)
 
      (0x03000000):Severity = 3 (INTEGER)
 
      (0x03000000):Number   = 3325 (INTEGER)
 
      (0x03000000):Text     = '' (CHARACTER)
 
      (0x01000000):Insert   = (
 
        (0x03000000):Type = 5 (INTEGER)
 
        (0x03000000):Text = 'BaseII_Flexcube_Target_Output' (CHARACTER)
 
      )
 
      (0x01000000):Insert   = (
 
        (0x03000000):Type = 5 (INTEGER)
 
        (0x03000000):Text = 'Converter_MessageFlow' (CHARACTER)
 
      )
 
      (0x01000000):Insert   = (
 
        (0x03000000):Type = 5 (INTEGER)
 
        (0x03000000):Text = 'null' (CHARACTER)
 
      )
 
      (0x01000000):Insert   = (
 
        (0x03000000):Type = 5 (INTEGER)
 
        (0x03000000):Text = 'null' (CHARACTER)
 
      )
 
    )
 
  )
 
)
 
 
Seems that there is something that I have skipped. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Tue May 19, 2009 11:11 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				Did you declare FileName as CHAR? Or just combine those two lines of code into one.
 
 
   
	| Code: | 
   
  
	
 
SET OutputLocalEnvironment.Destination.File.Name =  'FRED-' || CAST(CURRENT_TIMESTAMP AS CHAR FORMAT 'yyyyMMdd-HHmm');  | 
   
 
 
 
If you want seconds in the filename, just add 'sssss" to the format string. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mansoorafzal | 
		  
		    
			  
				 Posted: Tue May 19, 2009 11:36 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 19 May 2009 Posts: 14
  
  | 
		  
		    
			  
				I have declared it as CHARACTER.
 
 
Now, I have also tried to set the Directory and Name in LocalEnvironment / File in Mapping Node but the exception is the same. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Wed May 20, 2009 1:04 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				Get it working in a basic mode first - set all the necessary properties on the fileoutput node.
 
 
When that works, add the compute node prior to it. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Wed May 20, 2009 4:31 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
   
	| zpat wrote: | 
   
  
	| Make sure the compute node sets the localenvironment. | 
   
 
 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |