Donald, You seem to be asking about what happens to the "real" R14, is that correct? How do you define "real", If you are asking where the contents of R14 at the point the LINK(X) or ATTACH(X) macro is issued in the calling program are stored, the answer is simple, they aren't. Both of these macros (along with most other IBM defined macros) clearly document the contents of the registers when control returns to the caller. For ATTACH(X), R14 is used a work register by the system. For LINK(X), if the LINK(X) is successful, when the target program gets invoked, R14 will contain the return address, which will be the address of the SVC 3 instruction in the CVT. If the link fails, and an ERRET routine was coded, on entry to the ERRET, R14 was used as a work register by the system. Since the system uses R14 (most system macros use without saving Registers 14, 15, 0 and 1) if you care about the contents, it is the coder's responsibility to save them before issuing the macro, and restoring them after the macro expansion (and at any error points that the macro could pass control to).
=============================================== Wayne Driscoll OMEGAMON DB2 L3 Support/Development wdrisco(AT)us.ibm.com =============================================== From: Donald Likens <dlik...@infosecinc.com> To: IBM-MAIN@bama.ua.edu Date: 07/05/2011 08:30 AM Subject: Re: Real return address for link and attach Sent by: IBM Mainframe Discussion List <IBM-MAIN@bama.ua.edu> This has all been interesting but I don't think my question has been answered (sorry if I missed it). Some said I could get the real return address in the save area trace but I do not think that is correct since the calling program saves the registers and R14 points to LINK(x) or ATTACH(x) when the calling program is called. As for the PRB/SVRB discussion application programs run under a PRB. It was my understanding that attach returned to the OS but in my case I am seeing some pretty wierd things going on if the attached task ends immediately. As to the reference to LINK/Attach manuals it simply states that the registers are changed (I had already looked there). It didn't say what it did with the real R14. Any help is appreciated. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html