On Tue, 16 Aug 2016 15:14:25 -0700, Tom Brennan wrote:
>
>I was thinking more of an RC <> 0 case with no extra code or settings to
>catch errors.  Maybe like this example where TEMP.DATA doesn't exist and
>we never see "HERE 2" displayed:
>
>WRITE HERE 1
>ALLOC F(X) DA(TEMP.DATA) SHR REUSE
>WRITE HERE 2
>
And you want no chance to recover, perhaps by writing a message
to the terminal such as "Try a different data set name"?

In Rexx the error is non-fatal.  Does this make Rexx unacceptable?

I recall discovering long ago that FREE DD(X) was fatal if X was not
allocated, but ALLOCATE DD(X) when X was already allocated issued
an error message but was not fatal.  So I resorted to protecting myself
by routinely coding:
    ALLOCATE DD(X) DUMMY
    FREE DD(X)

... works all the time, but I felt like washing my hands whenever I had
to do that.

>In Unix I might code this:
>
>mkdir somedir
>touch somedir/new.file
>
Well, "sh -e" makes all errors fatal.  But that's the "extra code or settings"
that you appear to loathe.  Or you could just test the status after "mkdir".
Oops!  Extra code again.

Sometimes I want an error to be fatal; sometimes I want to be able
to check status and decide whether I want to quit.  In any case, I
like to have the choice.

>And I can run that as many times as I want and the script doesn't die if
>the directory already exists (which is what I want anyway).


>>UNIX protects directory integrity even as z/OS protects VTOC integrity.
>
>Well that's good to know, at least the file system is protected!
>
>> In both cases, UNIX and z/OS, it's elective.
>
>I can't completely remember, but the one time I needed unix fopen() to
>be exclusive, I think I also needed to call flock().  So I had to add
>extra code to match what was already built in to z/OS.
> 
"Built in"?  You mean you didn't even have to code DISP=OLD!?

In a few cases, the syntax of JCL is more economical.  In the great
majority the syntax of UNIX shell is more economical.  An example

    //STEP    EXEC  PGM=IEBGENER
    //SYSPRINT  DD  SYSOUT=(,)
    //SYSIN   DD *
    //SYSUT2  DD  DISP=(,CATLG),SPACE=(1000,1000),UNIT=SYSALLDA,DSN=OUTPUT.FILE
    //SYSUT1  DD  DISP=SHR,DSN=INPUT.FILE

versus:

    cp input.file output.file

I see some "extra code or settings" in the first example.  There aren't
even any defaults.

A modern desktop system provides a means of presenting an urgent
unsolicited message to the user, such as sounding the audible alert,
popping up a window with attributes "always on top, on all screens"
and text "System coming down in 5 minutes; please save your data!"
that I could ponder, dismiss, and take proper action.

Older desktop systems sounded the audible alert and presented the
message, yes, interleaved with other output.  Still, I could refresh
the screen (ctrl-L), save my data, and log off.

ISPF/TSO/MVS/3270 believes erroneously that it's protecting the
integrity of something if I turn away with the keyboard unlocked to
consult a manual for those 5 minutes.  I type another half-screen
of text and press ENTER.  Only then do I hear the audible alert
and see the warning (which may vanish immediately), much too
late to save my data.  I don't consider this integrity.  At least it
should sound the audible alert regardless of the state of the terminal.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to