I have a Java batch job and I am writing into a file in the writer.
I am writing into a MVS Dataset and using ZFile's write(byte[] buf) to write into the file.
However instead of writing each record in a new line it is being written in the same line (even though there is a "\n" in the Java string at the end). Is there any parameter that needs to be passed for this?
The recfm is fb and type is record. The record length is 80, but all records may not be of length 80
String pdsName = ZFile.getSlashSlashQuotedDSN("A.B.C.D");
try {
// dsnFile = new ZFile(pdsName ,"wb,type=record,recfm=fb,lrecl=80,noseek");
} catch (ZFileException e) {
e.printStackTrace();
}
for(Object o: listOfStrings){
String s = (String)o;
try {
dsnFile.write(s.getBytes());
} catch (ZFileException e) {
e.printStackTrace();
}
}