Re: Gwyn's Maxim (was: FSUM7197 pax ...)

2020-12-12 Thread Bob Bridges
Yeah, boy, I did that once.  I was compiling my COBOL code, and chafed yet 
again at how sloppy the JCL proc was.  I decided to make my own version, 
decently aligned and all the DD names in a conceptually logical order.  In the 
process I fixed a few things; for example, I allowed the JCL to delete, from 
the PDS shared by all the developers, the member that I no longer needed.

I ran it around noon.  There were, I would guess, not quite 50 of us in the 
department, so I wiped out about four hours' work for let's guess 30 or 40 
programmers.  I was not a popular newbie that day.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Of all tyrannies, a tyranny sincerely exercised for the good of its victims 
may be the most oppressive. It may be better to live under robber-barons than 
under omnipotent moral busybodies. The robber-baron's cruelty may at some point 
be satiated; but those who torment us for our own good will torment us without 
end, for they do so with the approval of their own conscience.  -CS Lewis */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Thursday, November 5, 2020 15:42

https://opensource.com/business/14/12/linux-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=(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.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Gwyn's Maxim (was: FSUM7197 pax ...)

2020-11-05 Thread Seymour J Metz
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 [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Charles Mills [charl...@mcn.org]
Sent: Thursday, November 5, 2020 6:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
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=, 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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Thursday, November 5, 2020 12:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
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=(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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Gwyn's Maxim (was: FSUM7197 pax ...)

2020-11-05 Thread Charles Mills
> 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=, 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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Thursday, November 5, 2020 12:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Gwyn's Maxim (was: FSUM7197 pax ...)

https://opensource.com/business/14/12/linux-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=(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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Gwyn's Maxim (was: FSUM7197 pax ...)

2020-11-05 Thread Seymour J Metz
"When the only tool you have is a pipe, everything looks like a filter."


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, November 5, 2020 3:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Gwyn's Maxim (was: FSUM7197 pax ...)

https://secure-web.cisco.com/1A7riZAPpr7boeK8ALMZCZTcsWrAD-ueyShFiA0hGSb0JnXAB9iXit1YkpYeISqRcMkVid4NR0HzMd_kBWzPx2KH9Yox8M1rB0s3QuED6mXI_nXCeF9vkG6TE2i3TzaPjgoX1Agsr613PPvZr-vZNu64QzEOC8OfkrTBUkN_jdqrLS-KIkF8E8deFrT-ThadFUD-Xj-sYa4i_AJOZ9wLAbO-ta5AA8TQO0Cp_v8FnfQ0RayCU8b5rIYCBniyHGkj4l188oyX_cSAGJf2UUEmsmO6lzD_QlKgc3Q60vQaBG11euFAtWhpN76k074Pwm9ZBjuP5QJ_Kk3UpURu1B6pbGw-deceq7EmXEiJIrOtnSQH_Gj_O8ixdhCo2MxYd5Qtm3J7uBgMTNObxNxCds-ecj-cjG27DUCfiRLQoQ7UYUnnoTXk7gjGXHubqPZulogpQ/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=(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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN