Got a lot of 4gl to debug lately, most of which use lots of temp tables. Using the "interactive" debugger, I can break after the insert into tmp_table. And I would like to do a select * query on that tmp_table, is that possible in the interactive debugger?
Or how to do it on a 3rd party sql client? A simple select * from tmp_table would result in Error: The specified table (tmp_table) is not in the database. (State:S0002, Native Code: FFFFFF32)
On a similar approach to what Jonathan describes, at a previous workplace, we had a library function with a name similar to
FUNCTION dump_temp_table(tablename)
that took as an argument a tablename and unloaded that table to the file tablename.unl. You simply called that function from the debugger using the call command passing the tablename you were interested in as an argumentUsing Genero I was quickly able to recreate with the following ...
... if using 4gl you should be able to come up with something similar (replacing the modernized Genero syntax such as STRING and SFMT with CHAR etc)