Could You post a corrected version of the code, please ? :)
Regards, Thomas Berg _________________________________________ Thomas Berg Specialist A M SWEDBANK > -----Ursprungligt meddelande----- > Från: IBM Mainframe Discussion List [mailto:[email protected]] För > Gerhard Postpischil > Skickat: den 20 oktober 2011 06:43 > Till: [email protected] > Ämne: Re: z/OS Control block question > > On 10/19/2011 6:38 PM, Roberts, John J wrote: > > I just ran a test using my z/OS 1.11 system and it worked. > > And a stopped clock is correct twice a day..... > > If I had a dollar for every problem in your little code segment, > I could buy something nice at Starbucks. > > 1. There is no check to handle a deleted entry. > > 2. The code should save the caller's AMODE (e.g., BSM 14,0 / STM > 14,12,12(13) at start; BSM 0,14 at end) and switch to AMODE 31, > as pointed out by Shmuel. Having AMODE and RMODE statements in > your assembly indicates a preference, but is not enforced at > execution time. > > 3. The code is inefficient. There are unused registers, but it > accesses TIOELNGH twice. It would be simpler to do an ICM at the > top of the loop, branch out of the loop on zero, and at the end > of the loop, just add that register to 14. > > 4. Your RX instructions use index registers rather than base > registers [e.g., L 2,0(1) instead of L 2,0(,1)]. That may cause > problems when called by a program that uses access registers. > And if you don't need to update the access register, the code is > easier to maintain if that's shown explicitly [LA 15,54(15,0)] > > 5. And as I mentioned originally, you must either treat the JFCB > address as an SVA (preferred), or test whether it's an address. > While SVAs are odd, IBM has made no commitment to that effect, > so using SWAREQ is the preferred approach. > > Gerhard Postpischil > Bradford, VT > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

