| Author | Message | 
		
		  | Bichu | 
			  
				|  Posted: Thu Aug 18, 2016 1:30 am    Post subject: FTP from multiple directories |   |  | 
		
		  | Centurion
 
 
 Joined: 16 Oct 2011Posts: 124
 Location: London
 
 | 
			  
				| Hi All, 
 Is there anyway to read files from multiple directories using File Input node (FTP transport) in IIB. All the directories possibly would be relative to each other in the same server. Apart from overriding the directories in Local Environment, any option exists in FileInput node FTP Server directory option to achieve this.
 
 Thanks.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | smdavies99 | 
			  
				|  Posted: Thu Aug 18, 2016 2:33 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 10 Feb 2003Posts: 6076
 Location: Somewhere over the Rainbow this side of Never-never land.
 
 | 
			  
				| for the FileInput Node, the answer is No. 
 What about a FileReadNode?
 _________________
 WMQ User since 1999
 MQSI/WBI/WMB/'Thingy' User since 2002
 Linux user since 1995
 
 Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Bichu | 
			  
				|  Posted: Thu Aug 18, 2016 3:22 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 16 Oct 2011Posts: 124
 Location: London
 
 | 
			  
				| Thanks davies. 
 But now I have a strange problem. I couldn't see FTP properties on FileRead node.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Thu Aug 18, 2016 3:41 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| The FileRead node doesn't do FTP, afaik... maybe in v10?... 
 What do you mean "the directories are all relative to each other"?
 
 If you mean that they are all child directories of a single directory, then you might be able to use a wildcard pattern to read from the higher level directory.
 
 *might*.
 
 You need to go back to your design team, and explain to them that file transfer is a real world example of the Halting Problem.  Also explain to them that avoiding file/batch processing is one of the main reasons that MQ was written in the first place... in, what, the mid 90's? late 80's?
 
 So ask them why they are using 40 year old business processing instead of 30 year old business processing.  Particularly when 30 year old business processing is *a lot* more reliable.
 _________________
 chmod  -R ugo-wx /
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | adubya | 
			  
				|  Posted: Thu Aug 18, 2016 4:34 am    Post subject: |   |  | 
		
		  | Partisan
 
 
 Joined: 25 Aug 2011Posts: 377
 Location: GU12, UK
 
 | 
			  
				| IIB9 FileRead node has FTP capability according to the Infocenter. _________________
 Independent Middleware Consultant
 andy@knownentity.com
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | adubya | 
			  
				|  Posted: Thu Aug 18, 2016 4:39 am    Post subject: |   |  | 
		
		  | Partisan
 
 
 Joined: 25 Aug 2011Posts: 377
 Location: GU12, UK
 
 | 
			  
				| IIB9 FileRead node has FTP capability according to the Infocenter. 
 You can dynamically control where it picks up files from using FTP by setting the following LocalEnvironment properties
 
 LocalEnvironment.Destination.File.Remote.Remote.ServerDirectory
 LocalEnvironment.Destination.File.Remote.Remote.Server
 _________________
 Independent Middleware Consultant
 andy@knownentity.com
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Thu Aug 18, 2016 4:54 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| 
   
	| adubya wrote: |  
	| IIB9 FileRead node has FTP capability according to the Infocenter. |  If bichu isn't seeing them, then likely bichu is not on IIB v9.
 _________________
 chmod  -R ugo-wx /
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | adubya | 
			  
				|  Posted: Thu Aug 18, 2016 5:28 am    Post subject: |   |  | 
		
		  | Partisan
 
 
 Joined: 25 Aug 2011Posts: 377
 Location: GU12, UK
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Bichu | 
			  
				|  Posted: Thu Aug 18, 2016 5:52 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 16 Oct 2011Posts: 124
 Location: London
 
 | 
			  
				| Thanks for all the replies. I am in IIB9 and as adubya told FileRead node has FTP as per Infocenter. But I couldn't see the same in my toolkit 
 For using MQ, we need to have MQ client installed in all applications right? Here 3+ applications will be putting files to different directories(possibly all will be the childs of a parent directory) in a File repo server from which IIB will pick the files using FTP. Hence I thought of reading the files using a single node.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqjeff | 
			  
				|  Posted: Thu Aug 18, 2016 5:57 am    Post subject: |   |  | 
		
		  | Grand Master
 
 
 Joined: 25 Jun 2008Posts: 17447
 
 
 | 
			  
				| Why are those applications bothering to write a file? 
 That's a waste of time and processing speed on both sides.
 
 Dunno why you can't see the properties on the node if your toolkit is v9.
 
 Again, if all the directories are under the same root - like "/.../files/cust1" and "/.../files/cust2" and etc.  You might be able to configure the FTP part to read from "/../files" and use a pattern to get the right files out of each child directory.
 
 But again, this whole use of files is a waste of time and a significant increase in the fragility of the system.
 _________________
 chmod  -R ugo-wx /
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Thu Aug 18, 2016 6:03 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| mqjeff wrote: |  
	| 
   
	| adubya wrote: |  
	| IIB9 FileRead node has FTP capability according to the Infocenter. |  If bichu isn't seeing them, then likely bichu is not on IIB v9.
 |  
 Or is not on the right level. IIRC this isn't in base but was added in Fix Pack 3. Or 4. Or something.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | smdavies99 | 
			  
				|  Posted: Thu Aug 18, 2016 6:07 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 10 Feb 2003Posts: 6076
 Location: Somewhere over the Rainbow this side of Never-never land.
 
 | 
			  
				| 
   
	| mqjeff wrote: |  
	| But again, this whole use of files is a waste of time and a significant increase in the fragility of the system.
 |  
 You are 1000000% right here. But as I found out at firsthand, there is at least one part of the world that seem to only want to do things via files. No amount of discussion/complaining/banging fists on tables will get them to change their minds
 
 If I were involved in this I'd ask why the applications outputting the data can't write to MQ. It would save a lot of operational issues in the long run.
 _________________
 WMQ User since 1999
 MQSI/WBI/WMB/'Thingy' User since 2002
 Linux user since 1995
 
 Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Bichu | 
			  
				|  Posted: Thu Aug 18, 2016 6:22 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 16 Oct 2011Posts: 124
 Location: London
 
 | 
			  
				| 
   
	| mqjeff wrote: |  
	| Why are those applications bothering to write a file? 
 |  
 I have asked the same question to my architect. Hope he will revert back.
 As per my understanding, Source application has neither MQ clients installed nor they like to do that. One of the source application exposes web services and its a secured one to which the architects over here don't allow any significant changes. They suggest to use webservice for any data imports / exports from/to application.
 
 Also, the target application expects xml SFTPed to it.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Deepak.k | 
			  
				|  Posted: Thu Aug 18, 2016 11:03 pm    Post subject: |   |  | 
		
		  | Novice
 
 
 Joined: 18 Aug 2016Posts: 22
 
 
 | 
			  
				| Hi guys 
 In IIB 9.0.0.4 fileread node has ftp option.we are currently using 4r our prjt also.make fix pack for your toolkit.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Bichu | 
			  
				|  Posted: Fri Aug 19, 2016 1:03 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 16 Oct 2011Posts: 124
 Location: London
 
 | 
			  
				| Thanks Deepak. I am currently in 9.0.0.1. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |