I have a problem in my Java Batch utility.
In my code I assign files from the JCL-Job to IRandomAccessRecordFiles.
If I do not assign the file my Java program does not recognize it and simply runs without any exceptions:
IRecordFile file = RecordFile.getInstanceOf("//DD:SYS021");
IRandomAccessRecordFile rfile = RandomAccessRecordFile.getInstanceOf(file,
IConstants.JRIO_READ_WRITE_MODE);
IRandomAccessRecordFile rfile = RandomAccessRecordFile.getInstanceOf(file,
IConstants.JRIO_READ_WRITE_MODE);
In JCL I tested running the program with or without the SYS021-DD-Statement and both won't produce any errors...
//SYS021 DD DSN=USER1.TEST800,DISP=SHR Ausgabedatei
or
//*SYS021 DD DSN=USER1.TEST800,DISP=SHR Ausgabedatei
The method exists() of IRecordFile does not help me, because it is always true...
If I read files I can simply ask if the first read-command is -1 and then throw an Exception, but what can I do with a new, empty outfile?
Regards
Oliver