In a recent note, Greg Price said:

> Date:         Wed, 1 Jun 2005 14:16:51 +1000
> 
> Well, here's my theory:
> 
Does this have to be done by theory and/or experiment, or is it made
clear in the documentation?

> Once a DD for a NEW disk data set has the following DCB attributes
> 1) RECFM specifying fixed-length or variable-length records,
> 2) LRECL more than zero
> 3) DSORG of PS or PO
> 4) BLKSIZE of zero
> THEN a System-Determined Blocksize (SDB) is placed into the data set
> labels during data set creation, way before OPEN happens.  In fact,
> OPEN won't happen if PGM=IEFBR14, for example.
> 
My experiments confirm this, as far as I've probed.

This introduces an unfortunate incompatibility -- the DCB OPEN exit
is thereby mostly disabled for setting BLKSIZE.  In particular, how
does IEBGENER allow BLKSIZE to be specified in the SYSUT2 DD statement,
but copied from SYSUT1 if omitted from DD?  I had imagined that it was
simply done in the DCB EXIT -- IF BLKSIZE==0 THEN Copy from SYSUT1.

> In summary, SDB gets two opportunities to run:
> 1) during allocation,
> 2) during OPEN,
> but only for TAPE or DASD when DSORG is PS or PO.
> 
It's more complicated than that.  I wrote a little assembler program.
I did not supply RECFM, LRECL, or BLKSIZE in the DCB macro.  To simulate
an "old" DCB, I did:

         XC    DCBDSORG,DCBDSORG

In the JCL:

    //SYSUT2  DD  SYSOUT=(,),RECFM=VB,LRECL=125

I then did:

         OPEN  (SYSUT2,OUTPUT)
         PUT   SYSUT2,TEXT
         CLOSE SYSUT2

... with no error, and successful write to SYSOUT.  Where did
BLKSIZE come from?  Again, are the rules clearly stated somewhere?

In:

    Title: z/OS V1R5.0 DFSMS: Using Data Sets
    Document Number: SC26-7410-03

I see:

#   3.2.3.1.2 "z/OS V1R5.0 DFSMS: Using Data Sets"

    3.2.3.1.2 System-Determined Block Size

   If you do not specify a block size for the creation of a data set, the system
   attempts to determine the block size. ...

   The system determines the block size for a data set as follows:

    1. OPEN calculates a block size.
        [ ... ]

(Much abridged, but) There is no suggestion that SDB operates before OPEN,
but a crude experiment seems to show this is so, as you surmised.

It fails to make clear whether SDB operates before or after the DCB exit.

It fails to describe the operation of SDB for SYSOUT data sets, but an
experiment seems to show it's effective for SYSOUT.

Etc.

-- gil
-- 
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to