Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Good morning. I remember reading somewhere on the web how you can set up your ILE RPG program to actually give you the error line number within a procedure instead of just the line number associated with the call to the procedure, but I can't find it anywhere.
Can someone please enlightment me?
Thanks!
Chris
You're not thinking of OPTION(*SRCSTMT) on the Header Spec are you?
No, Bob. I have that in the H spec already. I have a dump that shows the error line number as the call to the procedure rather than the line number in the procedure where the "receiver too small to hold result" actually is.
Don't know. Sorry. You might try wrapping the entire body of the subproc implementation in a MONITOR/ON-ERROR rouitne. That may do it. Probably what's happening is the error is not being trapped inside the subproc so it causes the "call to the subproc ended in error" message to appear. If you try it, it'll still show up in the joblog, but not explode the call to the subproc.
That's exactly what it is. I just saw a way of coding the program so it gives the actual line number within the subproc, but I can't remember where it was! Urrggggghhh!! Lol.
If I find it, I'll be sure to post it. I'm sure others have run into the same problem. Thanks for the input, Bob!