I would like to send a variable length binary file to the mainframe from a unix and/or linux system. The case is as follows. I send a file from the mainframe to the unix using BINARY and SITE RDW. The file is on the unix. Now, I want to send it back to the mainframe.
I used options such as BINARY, SITE RDW RECFM=VB LRECL=121.
Because we are sending as binary, the RDW is recognized as data and gets stored. Also, every line is being filled up to 121 and there is no variable length except maybe the last line.
How do i let the mainframe or ftp know when is the end of a line so it can save properly?
I've googled for weeks and haven't found a solution yet. The only thing i found was maybe to pad the file down with spaces to make it fixed length, and then post-process it on the mainframe. however, i don't know how to do this either.
I can append a (fake) BDW to the file if necessary. Also, I would prefer any manipulations on the unix side as i don't know mainframe as well.
as of now, we are using the VB file from the mainframe to process using SAS in the UNIX (just our group at the company, the mainframe will never go away). We transfer the VB file over to the unix with the RDW intact, and we have a python script that appends a fake BDW to the data so SAS could read it via RECFM=VB.
Now, sometime, we might do changes to the raw data file (VB), and we have to send it out, and in order to do this, we have to get the file back on the mainframe. I don't have to do it yet (no cases yet), but i think we may have to do it in the future.
If we can do this, then our group could do all of our analysis on the unix and we'll just get and send files to the mainframe.