On 8/10/2011 9:17 AM, MONTERO ROMERO, ENRIQUE ELOI wrote:
Hi to all,

I am looking for which is the DCB order to allocate a dataset. I mean, Program 
DCB, JCL DCB, Dataset DCB.....

Is there some IBM doc that explains such order?

Best regards

Enrique Montero

Sigh.

DCB's have _nothing_ to do with allocation. DCB information is
used by the OPEN routines. SPACE and DATACLAS JCL parameters
affect allocation.

As far as sources for filling in DCB parameters and the priority
of these sources, there was a recent, tedious thread on this
listserv. The DCB fields that participate in what is called the
"DCB merge" are: RECFM, LRECL, BLKSIZE, BUFNO, OPTCD, DSORG;

ignoring the impacts of the DCBE and OPEN exits and OPEN RDJFCB,
the order of priority for DCB sources at OPEN time is:

1. If a parameter has a non-zero value coded in the program,
   that value is used

2. If a value is omitted from the program but coded in
   the JCL, the JCL value will be used

3. If a value is omitted from the program and the JCL
   but exists in a label, the value from the label is
   used

After the merge, OPEN checks for completeness; if only
the BLKSIZE remains un-initialized, if a new data set
is being created, and if the LRECL and RECFM are supplied,
and if RECFM is not U, the system will compute an optimal
blocksize and place it in the DCB. Next OPEN checks for
consistency; if all is well, OPEN gets buffers and, for
input files, primes the buffers.


The primary information source is DFSMS Using Data Sets
(SC26-7410; from the z/OS Internet library, you can
download DGT2D4A0.PDF for the z/OS V1R13 version); check
out chapter 21 "Specifying and Initializing Data Control
Blocks", the section "Using OPEN to Prepare a Data Set
for Processing"; p332 has a diagram with a detailed explanation.

Note that high level languages might modify this behavior
using exits behind the scenes; check the docs for the language
of interest.


--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

* Special promotion: 15% off on all DB2 training classes
    scheduled by September 1, taught by year end 2011

* Check out our entire DB2 curriculum at:
    http://www.trainersfriend.com/DB2_and_VSAM_courses/DB2curric.htm

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

Reply via email to