zoukankan      html  css  js  c++  java
  • AS400 批量FTP

    在SNA网络连接中,AS/400的两块以太网卡能否实现互为备份
    解答 AS/400 FTP 提供批处理功能(BATCH FTP),用户无须在FTP交互式环境单独输入FTP子命令。

    整个过程包含三部分:

    1、CL 程序 - Samplib/SampFile BATCHFTP
    2、FTP的子命令文件 - Samplib/SampFile CMDFTP
    3、FTP命令执行结果输出 - Samplib/SampFile OUTFTP


    例:
    CL 程序:


    ************************************************************
    SAMPLIB/SAMPFILE BATCHFTP:
    ----------------------
    PGM
    OVRDBF FILE(INPUT) TOFILE(SAMPLIB/SAMPFILE) MBR(BATCHFTP)
    OVRDBF FILE(OUTPUT) TOFILE(SAMPLIB/SAMPFILE) MBR(OUTFTP)
    FTP RMTSYS(SYSxxx)
    ENDPGM
    ************************************************************


    FTP 子命令:

    ************************************************************
    SAMPLIB/SAMPFILE CMDFTP:
    ---------------------
    USERID PASSWORD
    CD SAMPLIB
    SYSCMD CHGCURLIB SAMPLIB2
    GET QCLSRC.BATCHFTP QCLSRC.BATCHFTP (REPLACE
    QUIT
    ************************************************************

    FTP 命令输出:


    ************************************************************
    FTP Output Redirected to a File
    FTP Input from Overridden File
    Connecting to host name SYSxxx
    at address x.xxx.xx.xxx using port 21.
    220-QTCP at SYSxxx
    220 Connection will close if idle more than 5 minutes.
    215 OS/400 is the remote operating system.
    The TCP/IP version is "V4R1M0"
    Enter login ID (USERID):
    > USERID PASSWORD
    331 Enter password.
    230 USERID logged on.
    250 Now using naming format "0".
    257 "QGPL" is current library.
    Enter an FTP subcommand.
    > CD SAMPLIB
    Enter an FTP subcommand.
    250 Current library changed to SAMPLIB.
    > SYSCMD CHGCURLIB SAMPLIB2
    Enter an FTP subcommand.
    > GET QCLSRC.BATCHFTP QCLSRC.BATCHFTP (REPLACE
    200 PORT subcommand request successful.
    150 Retrieving member BATCHFTP in file QCLSRC in library SAMPLIB.
    250 File transfer completed successfully.
    147 bytes transferred in 0.487 seconds. Transfer rate 0.302 KB/sec.
    Enter an FTP subcommand.
    > QUIT
    221 QUIT subcommand received.
    ************************************************************

  • 相关阅读:
    eclipse中误删tomcat后,文件都报错,恢复server时无法选择tomcat7.0解决办法
    java web多组件协作实现用户登录验证
    设计模式--享元模式
    设计模式--中介者模式
    设计模式--职责链模式
    设计模式--观察者模式与命令模式
    设计模式--桥接模式
    设计模式--迭代器模式
    设计模式--组合模式
    设计模式--备忘录模式
  • 原文地址:https://www.cnblogs.com/wildfish/p/1031829.html
Copyright © 2011-2022 走看看