Yeah, as a software designer I have debated the return code or the like for the deletion of a nonexistent item. You can argue either way: in one sense what the user requested failed to happen, but on the other hand s/he wanted it not to exist and now it does not exist. QED.
While complaining about IEBCOPY I thought about the JCL error issue. I did not mention it because bitching about JCL is like bitching about the weather. There are many things that might have been done differently that would have made JCL errors much easier to spot in the listing. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Friday, March 6, 2020 5:27 PM To: [email protected] Subject: Re: Two related alias entry address questions On Fri, 6 Mar 2020 16:44:09 -0500, Charles Mills wrote: >> IEBCOPY did exactly what you told it to do, so the Return Code should be >> zero! > >By that logic, every program should always return a zero. If I code > > LR 16,1 > >then the assembler will generate a halfword of zeros, because there is no >register 16. The assembler always generates zeros for invalid instructions. >Thus the assembler has done exactly what I told it to do. Nonetheless, it will >give me an RC 8 or 12. > >Yes, I read that section of the manual. IBM clearly does not promise anything >in particular in the way of return codes, so it is certainly possible to argue >that the 0 is correct. > >Nonetheless it utterly violates the principle of least astonishment. > +1 Grrr... But I've even complained of seeing a "I" suffix on messages reporting JCL errors fatal from the programmer's point of view. The rationale is that it's "Informative" from the operator's point of view. How many operators peruse JCL messages nowadays? I have mixed feelings about: o REPLACE gives RC=4 if the object didn't previously exist. o "rm -f" gives status 0 if the file never existed. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
