I've been trying to use cp under OMVS to copy z/OS datasets into OMVS files and the copy to OMVS seems to work but the copy back to z/OS fails miserably with multiple records combined.
I don't see any cp option to support variable length records.
I don't have dsfs available yet.
Help (please)
UNIX files are byte stream not record organized. Once you copy data into a UNIX file, all information on record boundaries is lost. Therefore, when you copy a UNIX file to some MVS data set, z/OS UNIX has no information on where to split the byte stream into records, except from the data set's logical record length (LRECL).
There is one exception: "text" files. In text files, lines are delimited by an end-of-line character or characters. When copying such a file to an MVS data set, the end-of-line character(s) are stripped, and a new record is started by each.
There are options to the
cpcommand to tell is, what kind of data, and if applicable, whar kind of end-of-line character(s) to use on the UNIX file side.