IBM fixed IEBGENER to not clobber the SYSUT2 directory. Changing the behavior 
of OPEN would have broken a lot of code.

The decision that file globbing should be in the shell makes it much more 
fragile than it would otherwise have been. I prefer the TSO approach of proving 
services and letting the command invoke, e.g., IKJPARSE with parameters 
describing what input is valid.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Charles Mills [[email protected]]
Sent: Thursday, November 5, 2020 6:03 PM
To: [email protected]
Subject: Re: Gwyn's Maxim (was: FSUM7197 pax ...)

> Probably there's a "dusty deck" somewhere whose inexcusably clever
> author relied on the behavior

Well, you can certainly see some JCL somewhere where there is for example

// SET DSN1=SOME.PDS(FOO)

And there are a bunch of references to DSN=&DSN1, most of which really "want" 
the member qualification, but one of which is a DISP=(OLD,DELETE) that is in 
fact working as the coder intended. If I had coded that I don't think I would 
consider it inexcusably clever.

IIRC they did fix another trap for the unwary. A program opens DD1 as an output 
SAM dataset. Someone executes the program and codes //DD1 DD DSN=SOME.PDS, when 
what they really meant was SOME.PDS(FOO). IIRC back in the good old days MVS 
would overwrite the directory of SOME.PDS, with the obvious negative 
consequences. I think they fixed that and the described scenario now fails. I 
will leave testing it as an exercise for the reader.

> Shell doesn't know what's a file and what's a switch.

Well, if it is expanding pax * to pax file file file file could it not 
recognize that one such file looked a heck of a lot like a switch?

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Paul Gilmartin
Sent: Thursday, November 5, 2020 12:42 PM
To: [email protected]
Subject: Gwyn's Maxim (was: FSUM7197 pax ...)

https://secure-web.cisco.com/1kA1nzS5bWbEveUQu96rFIxSd-w35tunHkOaalpolTZTe2jBLFVW0vP7ZSrQnnGIPgpSe3Vpiv3vsfh6sedWX9btx5QaEIrGhx-I3TYvh8O5--QIceF1_5Lh9ebdxX22YlACn5vu2Y_sePOvVjgOJg6I3kiY798_Uz_ic0IB2su6__oEc3fBsnVGbBlJGncN4VIphgY8-Hcpx6kvbsJDT7Kg-QPwF8Rt-F5zG1Eh3mFxiXV_ECxxdNt3YJQJ572-x_QQfUvKh-KUwl4VzKMKk3JKeUDrpyI5czZzEnCZl_AEGrNXTNpe7J4pt-cEo-ObAjs9t1Jgax9aqK1C4eOtfClC9SKiWl19riXAjKlT3fRgTTBMCGKUcK3MPIXT-9UtyTBfvasrhhCINL0Gnc_WCKnuHnpYMOMMig83J1pN7iE0NeEq5dx28VJSRIk6E8kCh/https%3A%2F%2Fopensource.com%2Fbusiness%2F14%2F12%2Flinux-philosophy

On Thu, 5 Nov 2020 06:46:15 -0800, Charles Mills wrote:

>What the heck were the UNIX designers thinking when they allowed the casual 
>creation of a filename of -x? There may be a legitimate reason why someone 
>would want to create a file named -x but if so, then *they* should be made to 
>jump through some small hoop and "escape" the name in some way. The innocent 
>victim who stumbles into this situation should not be the one made to jump 
>through hoops. Will UNIX allow the creation of a file named "rm *"? That could 
>have some interesting side effects.
>
Even worse, a file named "-rf *".

This resembles the plaint of a JCL novice who has just encountered, painfully,
the astonishing behavior of:
    //SYSUT1 DD DSN=&SYSUID..PDS(MEMBER),DISP=(OLD,DELETE)

That should be fixed for DYNALLOC, JCL, TSO, globally by making the
TU for member mutex with the TU for delete.  Who volunteers to bell
the RFE cat?

Probably there's a "dusty deck" somewhere whose inexcusably clever
author relied on the behavior and whose heirs haven't access to the
source.

>How did I inadvertently create a file named -x? I had a pax command
>
>pax -wzvf /my/archive.pax *
>
>I had an error that I thought might be solved by -x os390. Looking at the 
>above command I forgot that /my/archive.pax "went with" the -f and coded
>
>pax -wzvf -x os390 /my/archive.pax *
>    ...
>Heck, if the shell is going to expand the * then it could generate a warning 
>"hey, did you know that one of your files has a name that looks just like a 
>switch?"
>
Shell doesn't know what's a file and what's a switch.  That's the
responsibility of the utility, even as JCL shouldn't know what PARM means:
     //STEP  EXEC  PGM=BPXBATCH,PARM='sudo rm -rf /'

-- gil

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

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

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

Reply via email to