问题
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.
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
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
- the file was downloaded successfully.
- 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
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 AA000005It 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