AS/400 RPGLE: How to use *PSSR subroutine

450 pts.
Tags:
AS 400
RPGLE
INFDS used with INFSR to catch all file and program errors. By using INFSR (*PSSR), we can make a single *PSSR subroutine that will handle both file exceptions and program exceptions exception - How to handle errors in RPGLE? How to use *PSSR subroutine?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • GregManzo
    *PSSR's are fantastic. :-) We use a standard *PSSR routine that gets /COPY'd into every program.
    In a nutshell, a *PSSR gets control if your program has any errors (outside of a MONITOR block), and allows you to handle the crash in a safe and more graceful way. eg: INFSR(*PSSR) will get control if the file open fails (level check or file not found, etc.) and you avoid that nasty *ENQ message that most users don't know what to do with anyway.
    Our *PSSR does a formatted dump of program variables (in case we need it for debugging), Rollback to clean up uncommitted changes, and logs the error to a file. (developers with large numbers of dumps in production get publicly ridiculed by their peers).
    2,970 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: