Compiler output to uninitialized data sets not supported

There are a couple of cases where the compiler fails if it tries to write to uninitialized data sets.

Sequential data sets

With Enterprise COBOL Version 4 and earlier, the compiler could write to a pre-allocated object file with no specific attributes from a previous compile step. This is not possible with Enterprise COBOL Version 5 and Version 6.

For example, with Enterprise COBOL Version 4, the compiler could write to a pre-allocated data set with no specified attributes (DISP=MOD) from a previous step. When the compiler had written to the data set, it had the following attributes:
RECFM=FB LRECL=80 BLKSIZE=3200 DSORG=PS 

With Enterprise COBOL Version 5 and Version 6, the attributes are not changed and the attempt to write to the file fails.

The file attributes will be
RECFM=U LRECL=** BLKSIZE=6144 DSORG=PS 

This is not valid input to the binder.

To address this, you can provide data control block (DCB) information as follows on the preallocation:
DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)

PDS or PDSE data set

With earlier versions of Enterprise COBOL, the compiler could write to a pre-allocated PDS object file with no specific attributes from a previous compile step. This is not supported with Enterprise COBOL Version 5 and Version 6.

For example, with Enterprise COBOL Version 4, the compiler could write to a pre-allocated PDS or PDSE with no specified attributes (DISP=MOD) from a previous step. The compiler will create an object file of attributes:
RECFM=FB LRECL=80 BLKSIZE=3200 DSORG=PO                     

With Enterprise COBOL Version 5 and Version 6, DISP=MOD is not supported for PDS or PDSE data sets.

If the PDS has undefined format (such as ouput from a previous step with no DCB), and you use DISP=SHR or DISP=OLD, Enterprise COBOL Version 5 will write but will not change the attributes. They will be left as:
RECFM=U LRECL=** BLKSIZE=6144 DSORG=PO    
which is not valid input to the binder.
To fix this, specify DCB information on the allocation step as:
DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)
Do not use DISP=MOD. Use only DISP=SHR or DISP=OLD.