How to FTP a variable length file from linux to mainframe z/OS

时光总嘲笑我的痴心妄想 提交于 2020-01-03 06:30:11

问题


I could not FTP a variable length file to mainframe; the operation was success, but the dataset generated on mainframe is not correct; can anyone help me.

procedures.

  1. I have created a variable length dataset on mainframe.

    DSN=.TEST.DATA1
    LRECL=16
    

    Its content have 5 records, each has 12 characters: 000001 11AAAA000001 000002 11AAAA000002 000003 11AAAA000003 000004 11AAAA000004 000005 11AAAA000005

  2. download the dataset to linux using FTP client on a linux platform ftp -v -n< user prompt binary quote site rdw get TEST.DATA1 close bye EOF

  3. the file was downloaded successfully.
  4. upload the file back to mainframe ftp -v -n< user prompt binary quote site rdw recfm=v lrecl=16 put TEST.DATA1 TEST.DATA2 close bye EOF
  5. the new generated dataset TEST.DATA2 on mainframe is not correct.

     000001     11AAAA00
     000002 0001    11AA
     000003 AA000002
    000004 11AAAA000003 000005 11AAAA00 000006 0004 11AA 000007 AA000005

    It seems the RDW field was treated as data field, this is not I expected; I wish the TEST.DATA2 has same as TEST.DATA1.

Thanks.

来源:https://stackoverflow.com/questions/24377435/how-to-ftp-a-variable-length-file-from-linux-to-mainframe-z-os

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!