You could establish recovery at "HERE" and use IEALSQRY to get the linkage stack level and remember it somewhere (maybe in your recovery routine parameter structure).
Later on, you throw a user abend on "Ooops" (maybe with some unique identity in the reason code field) and then use your recovery routine to set SDWALSLV and then drive your retry routine. Rob Scott Rocket Software ________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Thomas David Rivers <[email protected]> Sent: Wednesday, July 02, 2025 3:41 PM To: [email protected] <[email protected]> Subject: Saving/Restoring the linkage-stack ptr (CR15) EXTERNAL EMAIL Let's consider the situation where you are using BAKR/PR to save/restore the current registers without having to manage your own stack (very handy.) Now, let's consider the situation where you'd like to essentially "clean up" this stack and restore the state to a previous location. Something like: remember my stack pointer (state #1) HERE: DS 0H BAKR BAKR .... BAKR Ooops - some error happened. don't PR, instead restore the state to state #1 to "branch back" to the higher-level stack. (because of, say, some error condition...) and branch back to HERE. I know CR15 holds the stack-pointer, but changing that would require authorization... and I imagine z/OS is going to want to clean-up intervening program-stack states. Since this would need to be authorized, are there any z/OS macros to save and restore the current state of the program-stack? - Thanks - - Dave R. - -- [email protected] Work: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com<http://www.dignus.com> ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ================================ Rocket Software, Inc. and subsidiaries ? 77 Fourth Avenue, Waltham MA 02451 ? Main Office Toll Free Number: +1 855.577.4323 Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy ================================ This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
