On Fri, 15 May 2009 10:53:52 -0600, Steve Comstock 
<st...@trainersfriend.com> wrote:

>I've been watching this thread evolve and I'd like to throw
>in some thoughts here.
>
>There was some change in behavior in COBOL + QSAM a few years
>ago, and the documentation never did, to my perception, do a
>good job of pointing this out.
>
>Here is an extract from one page in our course "Enterprise COBOL
>Update I: Essentials":
>
>While not strictly a change to the language, there has
>been a change to the way OPEN works that is worthwhile
>knowing about
>
>* Historically, coding BLOCK CONTAINS ensured the value
>   in your program would be used for block size
>
>* If you wanted to obtain the existing block size (for
>   input files) or to set the blocksize in JCL (for
>   output files) you coded BLOCK CONTAINS 0 RECORDS in your FD
>
>The new behavior is this:
>
>* Block size in the label overrides BLOCK CONTAINS value
>   in the program
>
>* The implications are:
>
>   + For input files, may now simply omit the BLOCK CONTAINS
>     clause: it will be ignored / overridden
>
>   + For output files, BLOCK CONTAINS 0 is required if DSORG,
>     LRECL, and RECFM are not specified on the DD statement
>
>   + BLOCK CONTAINS 0 is not necessary if you code DSORG,
>     LRECL, and RECFM on the DD statement (the system will
>     choose blocksize for you)
>
>--------------
>[of course, if you pre-allocate the file using ISPF 3.2 or
>  some other mechanism, existing label information will be
>  used there, too.]
>
>--------------

You are the man, Steve!  I think that almost totally covers it.  What I would 
add is something specifically addressing the "pre-existing file" issue that you 
mention in your "epilog" above.  I would word it this way

* The implications are:

   + For input files, may now simply omit the BLOCK CONTAINS
     clause: it will be ignored / overridden

   + For output files, BLOCK CONTAINS 0 is only if 1) the file is not already 
defined and 2) RECFM and BLKSIZE are not specified on the DD statement.

   + in all other cases BLOCK CONTAINS 0 is ignored / overridden


I don't, however, thing that the following is strictly true.
   + BLOCK CONTAINS 0 is not necessary if you code DSORG,
     LRECL, and RECFM on the DD statement (the system will
     choose blocksize for you)

Well, it is true in that it is not necessary to have "BLOCK CONTAINS 0".  
However if it is not present it appears to behave as if "BLOCK CONTAINS 1" 
was specified, unless there is also an explicit BLKSIZE on the DD.

>Regarding your systems and applications programmers with
>MVS experience: COBOL has gone through extensive changes
>of late, and the experience of these people may be somewhat
>out of date.
>
>I really recommend the course mentioned above. It's only
>two days but it catches experienced programmers up to
>speed in terms of new features and approaches.

If it were my decision I would do it.  Let me see if I can convince TPTB.

Only a few of us are working on the z/OS project right now.  Would you think 
that those few should get this education now and do the rest when we are 
closer to cutover?  I worry about cost (having the class twice), but we're 
doing that in other situations, so I guess we could do that here as well.

(Probably makes sense to respond to me directly at 
frank.swarbr...@efirstbank.com.)

Thanks again Steve!!

Frank

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