I am a Java programmer that has done some work on the mainframe and Unix end of WebSphere end-to-end, but now am working on a COBOL to Java conversion task, after not ever coding for z/OS directly, and IBMJZOS is still new to me.
I am trying to see if I can improve read performance of fixed block datasets by not relying on IBMJZOS ZFile access that per code seen in this shop seems to read one record at a time. Our code is built upon using the CobolDatatypeFactory object.
The file being read has over a million (1,001,042 to be exact) records, and has an LRECL of 120, and BLKSIZE of 27960. Per JES output, there were 4298 block reads done on the file during a job run.
I've tried using ZFileRecordReader with slight success, but since its ZFile newReader method is deprecated, and the JavaDoc for it seems to point to using RecordReader, I went looking into FileFactory as an alternative. The filename is being specified via //DD:
Using IBMJZOS 2.4.8 under JDK 8 64-bit on the USS system going to that fixed-block dataset, BufferedInputStream is not maintaining the 'fixed record' layout as data flows into the buffered stream, and is instead dropping trailing spaces. Noted 0x15 (EBCDIC newline) delimiter characters separating the records, which was strange to me since the input file is fixed block. I could not find a way to control this behavior, which may be fixable if there was a way to specify that the file is fixed-block.
Any suggestions on either improving read performance of fixed block records or figuring out why FileFactory BufferedInputStream behaves this way would be appreciated.
Thanks.
------------------------------
Albert Stein
------------------------------