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.
Hey Bob, it's been a few years since one of your Tuesdays Tips (I still think you should publish them) used a Set Opton for SQL that included the compile option (compileopt = 'dbgview(*source). If I remember correctly you thought embedding SQL options was just a fantastic option that was overlooked by most. I started using that a while back and now I've noticed that if the program is compiled that way with the embedded set option then only the session that created the compile has the ability to see the source when using debug.
I now understand that the source is put up in qtemp if you compile it interactive as QSQLTEMP1. Is there someway to use the set option method and invoke the precompiler to do what it normally does? Where does the source go when you compile it without the set option?
I think I was advocating DBGVIEW(*LIST) for that feature, however (at least on my system on v7.2) the CRTSQLRPGI command includes the DBGVIEW parameter and also the *SOURCE option. I would "just" change the command deafult to make it work as expected.
But yes, I too saw that QSQLTEMP1 issue recently. I haven't tested it, but perhaps using the actual CRTSQLRPGI DBGVIEW parameter causes the thing to change the OIR of the module so it "just works"? I don't know. Try it and let us all know.
Thanks.