Page 1 of 1

override LRECL AND RECFM in DCB ?

PostPosted: Tue Sep 28, 2010 6:08 pm
by diptisaini
//DD2 DD DSNAME=file1,DISP=OLD,DCB=(RECFM=VB,LRECL=80,
// BLKSIZE=80)

//DD3 DD DSNAME=File2,DISP=(,CATLG,DELETE),UNIT=SYSDA,
// ,VOLUME=SER=600,DCB=(RECFM=FB)

My requirement is that in DD2 LRECL=80 and BLKSIZE=80 so in dd3 file2 will be created with same LRECL=80 and BLKSIZE=80 so is it possible to do that ?

Re: override LRECL AND RECFM in DCB ?

PostPosted: Tue Sep 28, 2010 6:53 pm
by Bill Dennis
You can code LRECL=80,BLKSIZE=80 for DD3 but the DCB in the program may override your values.

Is DD2 really a RECFM=VB file or is it also FB ?

BTW, unblocked files on disk REALLY waste space and cause you to over-allocate!

Re: override LRECL AND RECFM in DCB ?

PostPosted: Tue Sep 28, 2010 8:18 pm
by NicC
Besides - if your lrecl is 80 and your blocksize is 80 your file is not blocked except in the sense that each record is a block which destroys the reason for blocking and your performance will be really bad.

Re: override LRECL AND RECFM in DCB ?

PostPosted: Tue Sep 28, 2010 9:16 pm
by steve-myers
NicC wrote:Besides - if your lrecl is 80 and your blocksize is 80 your file is not blocked except in the sense that each record is a block which destroys the reason for blocking and your performance will be really bad.
That's not necessarily really true for tape drives that compress data, A major part of tape drive data compression is they combine your records into large physical records and write them that way; the result is especially marked for unblocked data. But what NicC says is very true for disk data.

Assembler programmers have an extra point to influence the contents of the DCB: they can use a DCB OPEN exit to alter the contents of a DCB during OPEN. AFAIK, the capability is not available in high level languages. You have this hierarcy:
  • The DCB as specified at the time of the OPEN.
  • The DCB after it has been altered by the DCB open exit after JCL DCB attributes and data set label DCB attributes have been merged into the DCB by OPEN processing.
  • The DCB parameters as specified in JCL.
  • The DCB attributes retrieved from the data set label (for tape data sets) or the format 1 DSCB (for disk data sets.