IBM Support

Using IEBGENER to clear out multi-volume datasets with SYSUT1 DD DUMMY will result in incorrect and unexpected output.

Question & Answer


Question

Using IEBGENER to clear out multi-volume datasets will result in unexpected and incorrect output.

Answer

        Description:

        Using IEBGENER to clear out multi-volume datasets will result in unexpected and incorrect output. An example of the JCL used follows:
        //CLERDATA EXEC PGM=IEBGENER
        //SYSUT1 DD DSN=NULLFILE,DCB=(LRECL=xx,BLKSIZE=xxxx,RECFM=xx)
        //SYSUT2 DD DSN=CLEARED,DISP=OLD,VOL=SER=(xxxxxx,xxxxxx)
        //SYSPRINT DD DUMMY
        //SYSIN DD DUMMY

        The expected results are that the data on the volumes would be cleared out completely. However, due to IEBGENER design, the data on the volumes after the initial volume would not be cleared out. When SYSUT1 is DD DUMMY or NULLFILE, then the first read will go to end of data immediately, and only one read will occur before EODAD is called. On SYSUT2, an open for output will occur with a close following immediately. If SYSUT2 is multi-volume, the Format 1 DSCB will be updated with the last volume indicator placed on the first volume. The subsequent volumes will be left untouched. The user will be left with the first volume considered empty, and will contain the last volume indicator. All other volumes will still contain data, and the last volume will also contain a last volume indicator.

        When the dataset is opened again with a DISP=NEW, the data will appear as expected on the first volume. If the dataset is opened with a DISP=MOD, the dataset will extend to the last volume and the data will be placed after the last volume indicator on the last volume and not the first volume. So when the dataset is again opened for a read, it will appear as though the dataset is empty and the data is 'gone' and it will not be recognized on the last volume.


        Resolution:

        Delete the dataset and re-allocate it instead of trying to 'clear it out'. This can be done by a simple 2-step IEFBR14 job, for example.

[{"Product":{"code":"SWG90","label":"z\/OS"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"5695DF114 - DFSMS\/MVS UTILITIES (IEB IEH)","Platform":[{"code":"","label":"OS\/390"},{"code":"","label":"MVS\/ESA"},{"code":"PF035","label":"z\/OS"}],"Version":"1.1.0;1.2.0;1.3.0;1.4.0;1.5.0;1.6.0","Edition":"","Line of Business":{"code":"LOB56","label":"Z HW"}}]

Historical Number

7044800

Document Information

Modified date:
03 September 2021

UID

isg3S1000786