Paul Gilmartin wrote:
Ummm... no.  A syntax error is immediately fatal to both shell script and
Rexx alike.  Both provide means to trap the error and recover.  In both
cases an error in a host (system) command sets a status (RC) value
which the programmer can test and process as proper.

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

In Unix I might code this:

mkdir somedir
touch somedir/new.file

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

Does C under z/OS behave differently from C under UNIX?  From
experiments under MVS decades ago, I recall:

I don't know. In the past (maybe with the pre-linker?) if the target was a PDS, I'd get a perfectly good load module that ran under MVS. If I pointed to a USS file, I'd get a perfectly good executable USS file. I do remember needing code changes when trying to port from mainframe to Windows or Linux, but MVS to USS needed no changes other than the target. I think I did write a mini NNTP server on the mainframe one day, with multiple tasks, and I don't remember any overlaying of messages. But under testing there probably wasn't nearly enough activity for that.

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.

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

Reply via email to