Hi Amlan,

In respect to your query:

"It is not mandatory to code DCB parameters in JCL while creating new QSAM 
or BSAM dataset. The properties as per the COBOL code in INPUT-OUTPUT 
and FILE sections. If the values are coded in JCL and they conflict with
COBOL code then the program fails."

To understand what is happening here one needs to be conscious of the order
in which OPEN constructs the DCB information from the various sources
available. This is not a COBOL issue but an Open Processing one. 

There are three source for DCB information, Program, JCL, and File Label,
and the Open Merge process uses the three sources in that order.

This means that anything hard coded in the program cannot be changed in JCL
for instance. This led to the practice of coding BLOCK CONTAINS 0 so that
BLKSIZE on the JCL would be accepted by OPEN. 

The general concept produced a trend whereby if data sets were being read,
then DCB information was omitted from JCL so that the File Label would
provide any missing items for OPEN. Conversely if the data set were being
written, then DCB information tended to be included in the DD statement.
In either case, if the DCB were incomplete at this point then an S013
occurs.)

SMS is not really an issue here as the above remains substantially true,
although SMS does allow the short cut of providing DCB information via
DATACLAS thus allowing its omission from the DD statement.

If for some reason there is a conflict of DCB information subsequent to open
being successful, i.e. incorrect JCL parameters accepted in preference to
correct File Label attributes, then an S001 is likely.

The key in all of this is OPEN. If a data set is created via a DD statement
definition and the file is not opened, as would be the case with IEFBR14,
then the DCB information may well be incomplete in the File Label, and may
well produce an S001.

I hope this is of some assistance.

Kind regards - Terry


Terry Sambrooks
Director
KMS-IT Limited
228 Abbeydale Road South
Dore, Sheffield, S17 3LA, UK

Tel: +44 (0)114 262 0933
WEB: www.legac-e.co.uk

Company Reg: 3767263 at the above address

All outgoing E-mail is scanned, but it remains the recipient's
responsibility to ensure their system is protected from spy-ware, trojans,
viruses, and worms.  

----------------------------------------------------------------------
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