Actually, it's not a problem as long as the physical record size is a multiple of the LRECL. Yes, it gets an I/O error, but the error recovery determines that the record is OK and passes it up to the program.I can't remember if reading smaller blocks than BLKSIZE is a problem or not.
People have been running jobs like this to correct DCB attributes for 50 years, though the BLKSIZE has changed. Just so long as the BLKSIZE you choose is greater than or equal to the BLKSIZE used create the PDS, you'll be OK.
// EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DUMMY,DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
//SYSUT2 DD DISP=OLD,DSN=your-PDS(FIXDCB),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=32720)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DUMMY,DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
//SYSUT2 DD DISP=OLD,DSN=your-PDS(FIXDCB),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=32720)
//SYSIN DD DUMMY
Now NicC noted he would use BLKSIZE=0. Yes, that would be correct for a new data set, but not here. Others have noted 32720 or 32000 are inappropriate. True, but it does not matter here. We are trying to fix a problem, not continue use of the data set. This real data set will be abandoned anyway. We just have to transfer the uncorrupted members to a new, replacement data set.
Your next step is to prepare and run a job like this.
// EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//I DD DISP=OLD,DSN=your-PDS
//O DD DISP=(NEW,CATLG),...,SPACE=(...),
// DCB=(RECFM=FB,LRECL=80),
// DSN=new-PDS
//SYSIN DD *
COPY INDD=I,OUTDD=O
//SYSPRINT DD SYSOUT=*
//I DD DISP=OLD,DSN=your-PDS
//O DD DISP=(NEW,CATLG),...,SPACE=(...),
// DCB=(RECFM=FB,LRECL=80),
// DSN=new-PDS
//SYSIN DD *
COPY INDD=I,OUTDD=O
Now I cannot provide any reliable guidance as to what you should specify in the SPACE parameter, for two reasons.
- Allocated and used blocks is unreliable because BLKSIZE is unreliable. All I can say is it unlikely to be very large.
In fact there is something seriously wrong with allocated and used blocks in the display we see. - Rahulrkdd didn't provide any information about directory blocks.
After rahulrkdd has the replacement data set he can delete the original data set and rename the replacement data set to match the original data set