Midrange News for the IBM i Community


Posted by: redboxeri5
Programmer/Analyst
Ft Worth TX
Set Options in RPG for SQL
has no ratings.
Published: 10 Jun 2015
Revised: 10 Jun 2015 - 685 days ago
Last viewed on: 25 Apr 2017 (1679 views) 

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.

Set Options in RPG for SQL Published by: redboxeri5 on 10 Jun 2015 view comments(1)

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?  

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: bobcozzi
Site Admin ****
Chicagoland
Comment on: Set Options in RPG for SQL
Posted: 1 years 10 months 16 days 11 hours 41 minutes ago

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.