View Full Version : ILE-PSSR [ Source Listing Line Number Not Refresh ]
01-01-1995, 02:00 AM
I coded an ILE pgm using *PSSR with program status data structure to capture some of the exception information. When the exception happened in *INZSR I found that the Source Listing Line(position 21 to 28) for the subsequent exception in the same pgm is not refreshed. E.g Pgm_A call Pgm_B and suppose exception happened in *INZSR of Pgm_A then the source listing line number in pgm SDS will have *INIT to indicate exception had happened under pgm initialization routine, when another exception happen in Pgm_A or Pgm_B the source listing line number in pgm SDS still having *INIT instead of the exact source listing line number. The *PSSR routine will log the exception to a log file then return to the 1st line of the C-Spec of the pgm ENDSR '*DETL'. Why the system didn't refresh the source listing line field but the rest of the fields in pgm SDS are refreshed ?? Would really appreatiate if someone can help or point out any error I have made.
07-04-2000, 01:33 PM
The RPG runtime puts *INIT in the psds statement subfield whenever an error occurs during the *INIT phase of the cycle. If you get an error in the *INZSR and then ENDSR *DETC, you never complete the *INIT phase, so you always get *INIT as the statement. By the way, any RESET operations you try to do will fail with RNX0123 since the reset values never get saved at the end of the *INZSR. If you expect to get errors during your *INZSR processing, try moving it to an ordinary subroutine and calling it at the beginning of your calcs based on a flag: <pre> D initDone s n inz(*off) C if not initDone C exsr inzsr C eval initDone = *on C endif </pre> An alternative is to move the *INZSR calculations to a subprocedure, and call it with an (E) extender from your *INZSR: <pre> C *INZSR begsr C callp(e) init C endsr </pre> Barbara Morris, IBM Toronto Lab, RPG Compiler Development
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.