As I understand, the *PSSR subroutine is used to allow your program to die gracefully; there is not really a means of resolving an error and resuming normal program flow.
Instead, you may want to look into the monitor opcode and its usage. I've recently started to employ this in my own programs.
http://www.ibmsystemsmag.com/i5/october02/enewsletterexclusive/8838p1.aspx
The *PSSR subroutine is from long ago and far away. It was originally designed to work within the RPG cycle. Of course, that time RPG could only run in a cycle so it worked just fine.
You may notice some return options available to *PSSR. If you are using anything other than the RPG cycle, these probably will not give the results you may desire.
The MONITOR op code, as mentioned by Koohiisan, is a good alternative. In fact, it may well be the preferred alternative.
The *INZSR subroutine will run before any other 'C specs.
It's run by the cycle and does not need to be called.
It will run first even if you don't think you're using the cycle.
The *PSSR subroutine will be called on most errors if no other error handling is specified.
Monitor would take priority. This routine can be used to log the error, reset values, etc. It works
for all RPG programs. If you use this routine you will usually want to code a program end *inlr = *on in it. Typically it is coded to skip the fancy stuff if it's called a second time .. ie: if an error occurs while logging an error.
Phil
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 3  Replies