When moving SMF files (which are RECFM=VBS) I use TYPE E MODE B And this preserves the RDWs .
Lennie -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Jason Cai Sent: 24 October 2024 08:17 To: [email protected] Subject: How to FTP a Variable-Length File to the Mainframe Hi all I followed these procedures: 1. Created a Variable-Length Dataset on the Mainframe Dataset Name: TEST.DATA1 Logical Record Length (LRECL): 10 Record Format :VB Content: The dataset contains 2 records: 000001 AAA 000002 BB 2. Downloaded the Dataset to Linux Using an FTP on the z/OS platform, I downloaded the dataset to Linux with the following commands: ftp -v -n <<EOF open [linux_server_address] user [username] [password] prompt binary locsite rdw put TEST.DATA1 close bye 3. Uploaded the File Back to the Mainframe from Linux On a Linux platform, I attempted to upload the file back to the mainframe using the following FTP commands: ftp -v -n <<EOF open [mainframe_address] user [username] [password] prompt binary quote site rdw recfm=vb lrecl=10 put TEST.DATA1 TEST.DATA2 close bye EOF Problem Statement I expected TEST.DATA2 to be identical to TEST.DATA1, but the RDWs were misinterpreted, resulting in incorrect data. How can I correctly FTP a variable-length file to the mainframe so that the uploaded dataset matches the original? Could you please provide guidance on the correct procedure to FTP a variable-length file to the mainframe, ensuring that the dataset on the mainframe is restored to its original format? I don't know where I went wrong in step 3. Uploaded the File Back to the Mainframe from Linux. Any suggestions and help would be greatly appreciated Thanks a lot! Jason Cai ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
