A TP followed by a conditional branch is more expensive then having no instruction there. So it depends on exactly what you're doing and the percent of bad data which approach is least expensive. OTOH, an inexperienced programmer is more likely to get it right with TP.
________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu> Sent: Saturday, April 4, 2020 8:12 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: ESPIE question (does ESPIE "cover" ATTACH'd sub-tasks) On Sat, 4 Apr 2020 23:54:58 +0000, Seymour J Metz wrote: >If I expected a lot of bad data, I might use TP. But if I expected them to be >rare, I'd probably set an (E)SPIE. > Performance? Do the pertinent exceptions set testable condition codes with maskable interrupts? Anything but a cache fault is cheap, and TP won't throw a cache fault unless one was about to happen anyway. >________________________________________ >From: Ed Jaffe >Sent: Saturday, April 4, 2020 2:03 PM > >On 4/4/2020 10:29 AM, Charles Mills wrote: >> Let's say you were writing a report generator. You are processing data of >> unknown quality using field definitions generated by inexperienced >> programmers, and report programs written by non-programmers. You might >> expect a fair number of arithmetic operations on packed fields that >> contained invalid data, and a fair number of divisions by zero. Let's posit >> that ABENDing on the first such condition is not acceptable to user >> management. >> >> Would you use ESPIE to trap S0C7's and S0C9's, or would you validate the >> data with explicit "hand-coded" tests before every arithmetic operation? > >The TP (TEST DECIMAL) instruction comes in handy here... -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN