| Author | 
		  Message
		 | 
		
		  | mvs | 
		  
		    
			  
				 Posted: Wed Aug 26, 2009 5:39 pm    Post subject: FileOutput Node | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 06 Jul 2007 Posts: 85
  
  | 
		  
		    
			  
				All,
 
I have requirement, convert the message to file and place into the mainframe.
 
 
We are using FileOutput node to send files in aix box. In that node we are specifing directory structure like
 
/var/mqsidev/Filoutput
 
 
In MainFrame, it will not follow the directory struct like windows or Unix.
 
 
I am not sure how to use(settings) the fileOut node to send the file to main frame.
 
 
 
Help is greately useful. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Wed Aug 26, 2009 9:47 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				The HFS or ZFS on the mainframe is exactly like a Unix file system.
 
 
Get the FTP syntax working manually from a command line and learn how to use the correct format of the put file name to handle z/OS dataset names (there is a large IBM manual on z/OS TCPIP for example).
 
 
Then use the FileOutput node. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | smdavies99 | 
		  
		    
			  
				 Posted: Wed Aug 26, 2009 11:17 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land. 
  | 
		  
		    
			  
				There are some other posts (within the last two months) that document the gory details of how to configure this. _________________ 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvs | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 10:59 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 06 Jul 2007 Posts: 85
  
  | 
		  
		    
			  
				Thanks Zpat and smdavies99.
 
I was going thru some of the posts and i am still getting the exception.
 
 
The file system is Legacy main frame MVS file structure. i never worked on this and i don't know much about main frame.
 
 
the File Structure looks like below
 
'TSOHRBB.E002385.SAMPLE'
 
 
root directory is TSOHRBB
 
subdirectory is E002385
 
file name :SAMPLE | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 11:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvs | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 1:23 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 06 Jul 2007 Posts: 85
  
  | 
		  
		    
			  
				zpat,
 
i am able to do the FTP from my windows machine and Aix box
 
----------
 
 
C:\>ftp mvshost2
 
Connected to mvshost2.btmna.com.
 
220-FTPD1 IBM FTP CS V1R8 at MVSHOST2.BTMNA.COM, 21:17:41 on 2009-08-27.
 
220 Connection will close if idle for more than 10 minutes.
 
User (mvshost2.btmna.com:(none)): e002385
 
331 Send password please.
 
Password:
 
230 E002385 is logged on.  Working directory is "E002385.".
 
ftp> cd /
 
250 HFS directory / is the current working directory
 
ftp> pwd
 
257 "/" is the HFS working directory.
 
ftp> cd tmp
 
250 HFS directory /tmp is the current working directory
 
ftp> lcd
 
Local directory now C:\.
 
ftp> put samy.txt '/tmp/samy.txt'
 
200 Port request OK.
 
125 Storing data set /tmp/samy.txt
 
250 Transfer completed successfully.
 
ftp: 14 bytes sent in 0.00Seconds 14000.00Kbytes/sec.
 
ftp> lcd
 
Local directory now C:\.
 
ftp> dir
 
200 Port request OK.
 
125 List started OK
 
total 16
 
-rw-r-----   1 OEDFLT   OMVSGRP       13 Aug 27 21:18 samy.txt
 
-rw-r-----   1 OEDFLT   OMVSGRP     2271 Aug 27 20:25 test.text
 
250 List completed successfully.
 
ftp: 139 bytes received in 0.00Seconds 139000.00Kbytes/sec.
 
ftp>
 
-------
 
 
It looks some settings for fileoout node is the issue.
 
I was doing according to manual and tried  mqpaul post. Still i am getting the exception | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Thu Aug 27, 2009 10:11 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				OK, so you are able to transfer files to the HFS. This is no different from sending files to Unix.
 
 
Now you need to learn how to send files to a standard dataset (which would normally be a DSORG=PS).
 
 
Clue: don't issue CD /
 
 
Generally best to preallocate the dataset to get the correct RECFM and LRECL. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvs | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 8:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 06 Jul 2007 Posts: 85
  
  | 
		  
		    
			  
				Hi,
 
It looks i resolved most of the issues.
 
Now i am getting the Access error. "The FileOutput node cannot write to the output directory because the file system prevents suitable access, which should include the abilities to: read and write files; move, create and delete files; and create subdirectories with the same properties."
 
 
I am able to put afiles and able to create directories using FTP.
 
 
 
-------------------
 
C:\>ftp mvshost2
 
Connected to mvshost2.btmna.com.
 
220-FTPD1 IBM FTP CS V1R8 at MVSHOST2.BTMNA.COM, 14:52:14 on 2009-08-28.
 
220 Connection will close if idle for more than 10 minutes.
 
User (mvshost2.btmna.com:(none)): e002385
 
331 Send password please.
 
Password:
 
230 E002385 is logged on.  Working directory is "E002385.".
 
ftp> cd //
 
250 "" is the working directory name prefix.
 
ftp> cd TTSS
 
250 "TTSS." is the working directory name prefix.
 
ftp> cd E002385
 
250 "TTSS.E002385." is the working directory name prefix.
 
ftp> dir
 
200 Port request OK.
 
125 List started OK
 
Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname
 
USRB47 3390   **NONE**    1    1  VB     256  6233  PS  SAMZ.TXT
 
250 List completed successfully.
 
ftp: 131 bytes received in 0.00Seconds 131000.00Kbytes/sec.
 
ftp> lcd
 
Local directory now C:\.
 
ftp> put Test.txt 'TTSS.E002385.Test.txt'
 
200 Port request OK.
 
125 Storing data set TTSS.E002385.TEST.TXT
 
250 Transfer completed successfully.
 
ftp: 19 bytes sent in 0.00Seconds 19000.00Kbytes/sec.
 
ftp> dir
 
200 Port request OK.
 
125 List started OK
 
Volume Unit    Referred Ext Used Recfm Lrecl BlkSz Dsorg Dsname
 
USRB47 3390   **NONE**    1    1  VB     256  6233  PS  SAMZ.TXT
 
USRB07 3390   2009/08/28  1    1  VB     256  6233  PS  TEST.TXT
 
250 List completed successfully.
 
ftp: 197 bytes received in 0.00Seconds 197000.00Kbytes/sec.
 
ftp>
 
-------------
 
 
 
I am setting the Properties like below
 
 
 
 server directory            file name           Directory name          works? 
 
--------------------------------------------------------------------------------- ------------------------
 
1        //TTSS.E002385        	    FTPTEST.txt                     Not Setting       		NO -  BIP3325E(see below) 
 
 
 
 
 BIP3325E: File node ''FileOutput'' in message flow ''EGTW_FTP'' cannot use the directory ''null''
 
 for file name ''FTPTEST.txt''.
 
 
Test    server directory           file name           Directory name          works? 
 
--------------------------------------------------------------------------------- ------------------------
 
1        //TTSS        	    				FTPTEST.txt             E002385 	NO - BIP3314W (see below) 
 
 
 
BIP3314W: File node ''FileOutput'' in message flow ''EGTW_FTP'' cannot write to output directory
 
''/E002385''. The FileOutput node cannot write to the output directory because the file system prevents suitable access, which shoul
 
d include the abilities to: read and write files; move, create and delete files; and create subdirectories with the same properties.
 
Check that a suitable directory exists and that the file system permits the required processing.See the WebSphere Message Brokers online documentation section "FileOutput node" for more information.
 
 
Test    server directory         file name           Directory name          works? 
 
--------------------------------------------------------------------------------- ------------------------
 
1        //        	    				'TTSS/E002385/FTPTEST.txt     not Setting 	NO - BIP3325E (see below) 
 
 
 
BIP3325E: File node ''FileOutput'' in message flow ''EGTW_FTP'' cannot use the directory ''null''
 
 for file name ''TTSS/E002385/FTPTEST.txt''.
 
 
 
 
 
It looks setting the directory name is getting error. if i set some name to directory it give can not resolve the directory. 
 
if i don't set i am getting cannot use the directory ''null'' for file name ''FTPTEST.txt''.
 
 
 
Any help is greatly apprciated. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 8:11 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				Always use UPPER case dataset names.
 
 
Look at the mainframe system log for RACF violations (ICH408I messages).
 
 
What credentials are being used for the FTP? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvs | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 8:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 06 Jul 2007 Posts: 85
  
  | 
		  
		    
			  
				I checked the Mainframe system log. there is no autherntication error logs.
 
 
I am using the same credentials for both FTP and broker to connect to the mvshost2 server.
 
 
SET OutputLocalEnvironment.Destination.File.Directory = '//TTSS'; 
 
It looks the above is statement is giving error.
 
 
If i commented the above line i am getting the "cannot use the directory ''null''  for file name ''FTPTEST.txt''. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 9:21 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				Don't set a directory (still less one that looks like JCL with a double slash).
 
 
Just set a file name (MVS dataset) using single quotes. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvs | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 9:33 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Voyager
 
 Joined: 06 Jul 2007 Posts: 85
  
  | 
		  
		    
			  
				If i don't set the directory i am getting below the exception
 
 
 
I am setting the server directory of the fileoutput node : //TTSS 
 
In Basic tab, i am not setting any thing for Directory and setting file name to 'Wrongfile';
 
 
Please find the below user trace log might helpful to find the problem
 
 
------------------
 
2009-08-28 13:17:22.278638     7268   UserTrace   BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'EGTW_FTP.TESTQ.VISWA1'.
 
2009-08-28 13:17:22.278944     7268   UserTrace   BIP6060I: Parser type ''Properties'' created on behalf of node 'EGTW_FTP.TESTQ.VISWA1' to handle portion of
 
 incoming message of length 0 bytes beginning at offset '0'.
 
2009-08-28 13:17:22.279038     7268   UserTrace   BIP6061I: Parser type ''MQMD'' created on behalf of node 'EGTW_FTP.TESTQ.VISWA1' to handle portion of incom
 
ing message of length '364' bytes beginning at offset '0'. Parser type selected based on value ''MQHMD'' from previous parser.
 
2009-08-28 13:17:22.279224     7268   UserTrace   BIP6061I: Parser type ''BLOB'' created on behalf of node 'EGTW_FTP.TESTQ.VISWA1' to handle portion of incom
 
ing message of length '20387' bytes beginning at offset '364'. Parser type selected based on value ''NONE'' from previous parser.
 
2009-08-28 13:17:22.279712     7268   UserTrace   BIP2537I: Node 'EGTW_FTP.Data2File': Executing statement   ''BEGIN ... END;'' at ('.EGTW_FTP_Data2File.Main
 
', '2.2').
 
2009-08-28 13:17:22.279792     7268   UserTrace   BIP2537I: Node 'EGTW_FTP.Data2File': Executing statement   ''DECLARE TestMsg CHARACTER;'' at ('.EGTW_FTP_Da
 
ta2File.Main', '8.3').
 
2009-08-28 13:17:22.279852     7268   UserTrace   BIP2537I: Node 'EGTW_FTP.Data2File': Executing statement   ''SET TestMsg = 'The Sample msg placing to MainF
 
rame from WMB fileoutput Node';'' at ('.EGTW_FTP_Data2File.Main', '10.3').
 
2009-08-28 13:17:22.279914     7268   UserTrace   BIP2537I: Node 'EGTW_FTP.Data2File': Executing statement   ''SET OutputRoot.BLOB.BLOB = CAST(TestMsg AS BLO
 
B CCSID InputRoot.MQMD.CodedCharSetId ENCODING InputRoot.MQMD.Encoding);'' at ('.EGTW_FTP_Data2File.Main', '13.3').
 
2009-08-28 13:17:22.280124     7268   UserTrace   BIP2539I: Node 'EGTW_FTP.Data2File': Evaluating expression ''TestMsg'' at ('.EGTW_FTP_Data2File.Main', '13.
 
35'). This resolved to ''TestMsg''. The result was '''The Sample msg placing to MainFrame from WMB fileoutput Node'''.
 
2009-08-28 13:17:22.280200     7268   UserTrace   BIP2539I: Node 'EGTW_FTP.Data2File': Evaluating expression ''InputRoot.MQMD.CodedCharSetId'' at ('.EGTW_FTP
 
_Data2File.Main', '13.57'). This resolved to ''InputRoot.MQMD.CodedCharSetId''. The result was ''437''.
 
2009-08-28 13:17:22.280236     7268   UserTrace   BIP2539I: Node 'EGTW_FTP.Data2File': Evaluating expression ''InputRoot.MQMD.Encoding'' at ('.EGTW_FTP_Data2
 
File.Main', '13.96'). This resolved to ''InputRoot.MQMD.Encoding''. The result was ''546''.
 
2009-08-28 13:17:22.280438     7268   UserTrace   BIP2539I: Node 'EGTW_FTP.Data2File': Evaluating expression ''CAST(TestMsg AS BLOB CCSID InputRoot.MQMD.Code
 
dCharSetId ENCODING InputRoot.MQMD.Encoding)'' at ('.EGTW_FTP_Data2File.Main', '13.30'). This resolved to ''CAST('The Sample msg placing to MainFrame from WM
 
B fileoutput Node' AS BLOB CCSID 437 ENCODING 546 )''. The result was ''X'5468652053616d706c65206d736720706c6163696e6720746f204d61696e4672616d652066726f6d205
 
74d422066696c656f7574707574204e6f6465'''.
 
2009-08-28 13:17:22.280628     7268   UserTrace   BIP2566I: Node 'EGTW_FTP.Data2File': Assigning value       ''X'5468652053616d706c65206d736720706c6163696e67
 
20746f204d61696e4672616d652066726f6d20574d422066696c656f7574707574204e6f6465''' to field / variable ''OutputRoot.BLOB.BLOB''.
 
2009-08-28 13:17:22.280690     7268   UserTrace   BIP2537I: Node 'EGTW_FTP.Data2File': Executing statement   ''SET OutputLocalEnvironment.Destination.File.Na
 
me = 'TTSS.FTPTEST.txt';'' at ('.EGTW_FTP_Data2File.Main', '15.3').
 
2009-08-28 13:17:22.280736     7268   UserTrace   BIP2566I: Node 'EGTW_FTP.Data2File': Assigning value       '''TTSS.FTPTEST.txt''' to field / variable ''Out
 
putLocalEnvironment.Destination.File.Name''.
 
2009-08-28 13:17:22.280782     7268   UserTrace   BIP2537I: Node 'EGTW_FTP.Data2File': Executing statement   ''RETURN TRUE;'' at ('.EGTW_FTP_Data2File.Main',
 
 '20.3').
 
2009-08-28 13:17:22.280848     7268   UserTrace   BIP4007I: Message propagated to 'out' terminal of node 'EGTW_FTP.Data2File'.
 
2009-08-28 13:17:22.305222     7268   Error       BIP2628E: Exception condition detected on input node 'EGTW_FTP.TESTQ.VISWA1'.
 
                                       The input node 'EGTW_FTP.TESTQ.VISWA1' detected an error whilst processing a message.  The message flow has been rolle
 
d-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again.  Following messages will indicate
 
the cause of this exception.
 
                                       Check the error messages which follow to determine why the exception was generated, and take action as described by th
 
ose messages.
 
2009-08-28 13:17:22.305240     7268   RecoverableException  BIP2230E: Error detected whilst processing a message in node 'EGTW_FTP.FileOutput'.
 
                                       The message broker detected an error whilst processing a message in node 'EGTW_FTP.FileOutput'. An exception has been
 
thrown to cut short the processing of the message.
 
                                       See the following messages for details of the error.
 
2009-08-28 13:17:22.305254     7268   RecoverableException  BIP3325E: File node ''FileOutput'' in message flow ''EGTW_FTP'' cannot use the directory ''null''
 
 for file name ''TTSS.FTPTEST.txt''.
 
                                       The file node cannot create the directory or cannot move a file into or out of the directory with that name.
 
                                       Ensure that the file and directory names are correctly specified in the message flow. The names may contain invalid ch
 
aracters or the directory may be ineligible for use, or the broker may not have the authority to perform the action required. See the WebSphere Message Broke
 
rs online documentation sections "FileInput node" and "FileOutput node" for more information.
 
2009-08-28 13:17:23.306412     7268   UserTrace   BIP2631I: Backed out message being propagated to failure terminal; node 'EGTW_FTP.TESTQ.VISWA1'.
 
                                       Node 'EGTW_FTP.TESTQ.VISWA1' has received a message which has previously been backed out because of a processing error
 
 in the message flow.  The MQMD 'backoutCount' of the message exceeds (or equals) the 'backoutThreshold' defined for the WebSphere MQ input queue.  The messa
 
ge broker is propagating the message to the failure terminal of the node.
 
                                       Examine the other messages and the message flow to determine why the message is being backed out.  Correct this situat
 
ion if possible.  Perform any local error recovery processing required.
 
 
------------------ | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | zpat | 
		  
		    
			  
				 Posted: Fri Aug 28, 2009 10:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 19 May 2001 Posts: 5867 Location: UK 
  | 
		  
		    
			  
				I told you once already about upper case dataset names.
 
 
Sorry, I give up on this thread. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |