The following code can be used to process an FTP command via a batch program.
Assumptions:
- The source physical file is labeled QFTPSRC with two source members
- The value FTPIN contains valid FTP commands
- The value FTPOUT is an optional empty source member to contain FTP log statements
CLRPFM FILE(LIBRARY/QFTPSRC) MBR(FTPOUT)
OVRDBF FILE(INPUT) TOFILE(LIBRARY/QFTPSRC) +
MBR(FTPIN)
OVRDBF FILE(OUTPUT) TOFILE(LIBRARY/QFTPSRC) +
MBR(FTPOUT)
FTP RMTSYS('xxx.xxx.xxx.xxx')
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.
No comments:
Post a Comment