Manage Learn to apply best practices and optimize your operations.

FTP from AS/400 to PC folder

By using the CPYTOSTMF command you can create a stream file in the IFS that can be sent via FTP to anywhere you want.

How do I FTP a physical file (eg, ZOCNPF) from AS/400 system to a PC folder in a text (TXT) format.

There is a command available in the OS/400 that will help you do this, CPYTOSTMF. Use this command to create a stream file in the IFS that you can then FTP anywhere you want.

The HELP information for this command follows:

The Copy To Stream File (CPYTOSTMF) command copies either a database file member or a save file to a stream file. Optional conversion of the data and reformatting is performed when copying a database file member. This command cannot be used to copy to or from a database file member on a remote system. Any overrides in effect for the database file member or the save file are not used by this command.

This command can operate on regular files and on the /dev/null character special file. A regular file is a file that supports the integrated file system input/output (I/O) operations open, read, and write.

For more information about integrated file system commands, see the Integrated file system information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

Dig Deeper on Data backup, storage and retrieval on iSeries