Difference between revisions of "FTP"

From MidrangeWiki
Jump to: navigation, search
m
m (External links: 2x scripting examples, 1 RPG and 1 CL)
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
The AS/400 can function both as an FTP server and an FTP client.
 
The AS/400 can function both as an FTP server and an FTP client.
 +
 +
{{Seealso|FTP (CMD)}}
 +
 
==Automating==
 
==Automating==
 
=== Scripting ===
 
=== Scripting ===
A common technique for automating FTP processing is to write the [[FTP (CMD)|FTP]] commands to a [[source physical file]] and then pipe the data in that file to the FTP command.
+
A common technique for automating FTP processing is to write the [[FTP]] commands to a [[source physical file]] and then pipe the data in that file to the FTP command.
  
 
To pipe the data to the FTP command, you do an [[OVRDBF]] for the file ''INPUT'' to the source physical file.   
 
To pipe the data to the FTP command, you do an [[OVRDBF]] for the file ''INPUT'' to the source physical file.   
  
After the file is overridden, just invoke the [[FTP (CMD)|FTP]] command with the appropriate hostname.  The FTP client will take it's input from the overridden file.
+
After the file is overridden, just invoke the [[FTP]] command with the appropriate hostname.  The FTP client will take it's input from the overridden file.
  
To capture the output, you can [[OVRDBF]] the file ''OUTPUT'' to another [[source physical file]].  The results of the [[FTP (CMD)|FTP]] command will be written to the output file.  You can programatically interpret the output.
+
To capture the output, you can [[OVRDBF]] the file ''OUTPUT'' to another [[source physical file]].  The results of the [[FTP]] command will be written to the output file.  You can programatically interpret the output.
  
 
=== FTP API ===
 
=== FTP API ===
Line 24: Line 27:
 
==External links==
 
==External links==
 
*[http://www.ietf.org/rfc/rfc0959.txt?number=959 RFC 959] official specification of the File Transfer Protocol (FTP) from [http://www.ietf.org www.ietf.org]
 
*[http://www.ietf.org/rfc/rfc0959.txt?number=959 RFC 959] official specification of the File Transfer Protocol (FTP) from [http://www.ietf.org www.ietf.org]
 +
*Scripting examples
 +
**RPG - [http://www.mcpressonline.com/programming/rpg/automate-your-file-transfers-using-ftp-on-the-ibm-i.html "Automate Your File Transfers Using FTP on the IBM i"] by Tom Synder, August 17, 2009 from http://www.mcpressonline.com
 +
**CL - [http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzaiq/rzaiqftpbatch.htm "FTP as batch job"] from the V5R1 IBM iSeries Information Center
  
 
==Categories==
 
==Categories==
 
[[Category:Definitions]]
 
[[Category:Definitions]]
 
{{stub}}
 
{{stub}}

Latest revision as of 13:22, 19 August 2009

FTP is an acronym which stands for File Transfer Protocol.

The AS/400 can function both as an FTP server and an FTP client.

See also: FTP (CMD)

Automating

Scripting

A common technique for automating FTP processing is to write the FTP commands to a source physical file and then pipe the data in that file to the FTP command.

To pipe the data to the FTP command, you do an OVRDBF for the file INPUT to the source physical file.

After the file is overridden, just invoke the FTP command with the appropriate hostname. The FTP client will take it's input from the overridden file.

To capture the output, you can OVRDBF the file OUTPUT to another source physical file. The results of the FTP command will be written to the output file. You can programatically interpret the output.

FTP API

Scott Klements has written an open source FTP API. Information can be found at http://www.scottklement.com/ftpapi/

Tips

Change the banner / welcome / hello screen

Standard FTP message 220 is shown when a client connects to an FTP server. On the AS/400, this is stored in message TCP120D in the MSGF below can be modified. [1]

WRKMSGD MSGID(TCP120D) MSGF(QTCP/QTCPMSGF)

External links

Categories

This article is a stub. You can help by editing it.