On Wed, 1 Sep 2010 16:20:02 -0700, glen herrmannsfeldt
<[email protected]> wrote:

>The reminds me of some problems with Fortran many years ago.
>(Before OPEN was added, though I believe it is still optional.)
>
>It seems that Fortran opens the DDNAME for INOUT by default.
>That is true even if the first operation is READ, as one is allowed
>to REWIND (or BACKSPACE) and then WRITE.
>
>There were some cases where that was not desired, and the
>solution, if I remember it right, is LABEL=(,,,IN).
>(I could get out a JCL book.)
>
>As for the question, I don't know how common it is to open
>for INOUT (or OUTIN), but that will restrict the ability to
>test for input only.
>
>-- glen

Glen,

You're spot on with LABEL=(,,,IN), an obscure JCL option known mostly to
FORTRAN programmers, and a sure way to make a DD input-only.

Also years ago, I earned my stripes with our senior MVS systems programmer,
when he was debugging an abend with a vendor's OCO FORTRAN program. The JCL
said DISP=SHR, the operators took the write ring off the tape, yet still the
step abended (because FORTRAN was opening the dataset INOUT).

Fresh from a couple years working in a research company that used FORTRAN, I
suggested LABEL=(,,,IN), and voila, I earned a friend for life.

Scott

Reply via email to