What I am saying is that, on INPUT, a dataset's physical DCB attributes
from its DSCB on DASD cannot be overriden by a JCL or program DCB.
Consider the following JCL where
SYS1.RECFMVBA.LRECL137.BLK27998 has physical
DCB=(RECFM=VBA,LRECL=137,BLKSIZE=27998,DSORG=PS)
SYS1.RECFMFBA.LRECL137.BLK27948 has physical
DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948,DSORG=PS):
//IEBGENER EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//SYSUT1 DD DISP=SHR,DSN=SYS1.RECFMVBA.LRECL137.BLK27998,
//* cannot override dataset's DCB on DASD via JCL, for INPUT:
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//*
//SYSUT2 DD DISP=SHR,DSN=SYS1.RECFMFBA.LRECL137.BLK27948,
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//*
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//*
//SYSUT1 DD DISP=SHR,DSN=SYS1.RECFMVBA.LRECL137.BLK27998,
//* cannot override dataset's DCB on DASD via JCL, for INPUT:
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//*
//SYSUT2 DD DISP=SHR,DSN=SYS1.RECFMFBA.LRECL137.BLK27948,
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//SYSIN DD *
REPRO INFILE(SYSUT1) +
OUTFILE(SYSUT2)
//*
According to you, the DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948) on SYSUT1
(opened for input) should override the dataset's
DCB=(RECFM=VBA,LRECL=137,BLKSIZE=27998,DSORG=PS) on DASD. But that is
not the case.
If you set up and run the jobsteps above, both IEBGENER and IDCAMS
report "IEB351I I/O ERROR <etc.> SYSUT1, READ, WRNG.LEN.RECORD, etc."
when reading SYSUT1. This is because the dataset's DASD DSCB/DCB
attributes override those coded in the JCL (and would also override the
programs's DCB, if hard-coded), for INPUT.
If SYSUT1 and SYSUT2 are switched round as in:
//IEBGENER EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
//SYSUT2 DD DISP=SHR,DSN=SYS1.RECFMVBA.LRECL137.BLK27998,
//* can override dataset's DCB on DASD via JCL, for OUTPUT:
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//*
//SYSUT1 DD DISP=SHR,DSN=SYS1.RECFMFBA.LRECL137.BLK27948,
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//*
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//*
//SYSUT2 DD DISP=SHR,DSN=SYS1.RECFMVBA.LRECL137.BLK27998,
//* can override dataset's DCB on DASD via JCL, for OUTPUT:
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//*
//SYSUT1 DD DISP=SHR,DSN=SYS1.RECFMFBA.LRECL137.BLK27948,
// DCB=(RECFM=FBA,LRECL=137,BLKSIZE=27948)
//SYSIN DD *
REPRO INFILE(SYSUT1) +
OUTFILE(SYSUT2)
//*
Then SYSUT1's JCL DCB matches the one on DASD's DSCB and no I/O error
occurs when reading SYSUT1.
Likewise, no I/O error occurs when writing to SYSUT2 (although its JCL
DCB does not match the one on DASD) because the JCL's DCB overrides the
one on DASD, for OUTPUT.
To say that the order of priority for INPUT is 'program DCB -> JCL DCB
-> DASD DCB' is meaningless if neither the program DCB nor JCL DCB can
modify/override the DASD's DSCB/DCB to avoid physical I/O errors on INPUT.
I don't think I 'got it wrong' ...
Cheers,
Chris Poncelet
.
Tom Marchant wrote:
On Thu, 28 Jul 2011 12:04:37 -0700, Dale Miller wrote:
2) There is a difference between the relative priority of DCB
information, and the actual mechanism involved. The order of priority
was stated correctly,
stated correctly by whom? AFAIK, CM Poncelet got it wrong.
but the exact mechanism is a little more complex
and does depend on
a) whether the DISP is NEW (or MOD if the dataset is not found and
must be created), or OLD/SHR(or MOD if the dataset is found)
Label (DSCB or tape label) is only used for an existing data set
b) whether the file is opened for INPUT or OUTPUT.
Mr. Poncelet made the same assertion. I'm pretty sure that it is incorrect.
Do you have a manual reference that you can cite to justify it?
one can
TEMPORARILY override the dataset attributes with a DD card if the OPEN
is for INPUT
No. See for example the JCL Reference manual.
<quote>
12.16.3 Completing the Data Control Block
The system obtains data control block information from the following sources,
in override order:
- The processing program, that is, the DCB macro instruction in assembler
language programs or file definition statements or language-defined defaults
in programs in other languages.
- The DCB subparameter of the DD statement.
- The data set label.
Therefore, if you supply information for the same DCB field in your processing
program and on a DD statement, the system ignores the DD DCB subparameter.
If a DD statement and the data set label supply information for the same DCB
field, the system ignores the data set label information.
</quote>
----------------------------------------------------------------------
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