Well, you're perhaps lucky you got an actual error, and not one of those hex fullword values! (OK, not really, because that would have more likely been unique, and wouldn't have led you down the wrong path of "What is it that's R/O?")
Which leads me to wonder: how did people find out what those hex fullword errors meant before they could Google them? Not that I think they're all online, but many seem to be. Is there a secret manual I've never found that lists them? The corollary question is, of course, why did IBM let Mortice-Kern (I assume it was M-K) display those instead of real error messages? The kindest word I can come up with is "Lazy". Yes, Microsoft does it too; that's the opposite of an excuse. -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Charles Mills Sent: Monday, September 15, 2025 10:38 PM To: [email protected] Subject: Re: Why MVS data set read-only from UNIX? Well, super, guys, thanks. As you can tell I am kind of shell-naive. Much of my "UNIX" experience is writing z/OS C++ programs where pretty much any file can be /unix or //DD:MVSDD or //MVS.DATA.SET or //VSAM.FILE so I kind of proceeded as though all of UNIX was like that. Lesson noted. I know just enough shell to be almost dangerous. Much like in @Phil's recent COBOL compiler plaint, a more informative error message would sure be a help. "MVS data sets not supported in this context" would have pointed me in the right direction. (It's not just IBM. I was just on a hotel reservation site where "credit card not valid" turned out to mean "the room you requested is not available on that night.") After I saw @Gil's reply I got to thinking the answer was a pipe to cp but thanks for confirming and giving me the syntax -- I would have had to wade through a VERY long doc page. >HTH Very much. Thanks again, Charles. On Tue, 16 Sep 2025 00:35:21 +0000, Farley, Peter <[email protected]> wrote: >Gil is correct, only Unix utilities that use the underlying C function >“fopen(…)” can read or write "//'userid.TEMP.OUT2'". Since shell redirection >means the writing program is the shell itself (/bin/sh) and that program does >NOT support MVS datasets directly, you cannot do that. > >Some Unix utilities like “awk” do in fact directly support MVS datasets as >input or output, BUT it is NOT documented to do so (as gil has rightly said >several times when I have brought up this “awk” behavior), so letting any >important work depend on that observed-but-not-documented fact could be risky. > >Instead, you could try to pipe your command output to the “cp” command (which >IS documented to support MVS datasets) and tell “cp” to write to >"//'userid.TEMP.OUT2'" like this: > >(your command(s) here) | cp - "//'userid.TEMP.OUT2'" > >The first operand to “cp” of “-“ (minus sign or hyphen) tells “cp” to use >stdin as the input source and the second operand "//'userid.TEMP.OUT2'" as the >output destination. > >HTH > >Peter ---------------------------------------------------------------------- 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
