Re: QteStartViewCreation - create source debugger views



Steve Richter wrote:
...
When are the QteStartViewCreation ... QteEndViewCreation apis supposed
to be called? Before the module is created or after? Within the
QbnStartPreProcessor ... QbnEndPreProcessor set of APIs or outside?
When the CRTRPGMOD command is run what should the DBGVIEW parm be set
to?

QteStartViewCreation is called when you start reading the source file,
and QteEndViewCreation is called after you have finished reading the
source file and writing the output file, and before you call the next
stage in the compile (CRTRPGMOD).

I don't think the Qbn functions are relevant to the debug view
functions. (The RPG preprocessor (which runs before the SQL precompiler
with RPGPPOPT(*LVL1)) doesn't call those functions at all.) I don't
know anything about these functions, but I imagine you would call
QbnStart before you begin preprocessing, and call QbnEnd after the RPG
compiler returns.

When you call CRTRPGMOD, set DBGVIEW to anything that gets the compiler
to create a source view (anything except *LIST). If you don't request a
source view, your debug views would be dropped since the compiler
wouldn't be providing the mapping between your output view and its
source view.


The documentation references the *STATEMENT view. Is that something the
compiler creates in this case or once you create one debugger view do
you have to create them all?

The compiler creates the statement view. You only have to create your
source view and your output view; other views are created by earlier or
later stages of the compilation. When your output file is read as an
input file by the next stage in the compile, the debugger will use the
view information to map the statements in the new input file to the
original file.

If you compile a program with CRTSQLRPGI RPGPPOPT(*LVL1)
DBGVIEW(*SOURCE), and look at the various debug views in the debugger,
you will see this list (v5r3):

ILE RPG Root Source View - created by RPG preprocessor for the original
input file
ILE RPG Output View - created by RPG preprocessor for output
tempfile1
SQL Output View - created by SQL precompiler for output
tempfile2
ILE RPG Listing View - created by RPG compiler
ILE RPG Copy View - created by RPG compiler

The SQL precompiler would also have created an input view for tempfile1,
and the RPG compiler would have created an input view for tempfile2.
Since the input view and the previous output view are for exactly the
same source file, the debugger merges these views into one. Each stage
in the compile should assume there may have been previous stages, and
each stage except the final one (the compiler) assumes that there may be
a later stage. So when you call QteStartViewCreation, you would
normally say "*NO" for the discard-previous-views parameter.

If you added "Richter Root Source View" and "Richter Output View", the
views would look like this; "Richter Output View" would be merged with
"ILE RPG Root Source View".

Richter Root Source View
Richter Output View
ILE RPG Output View
SQL Output View
ILE RPG Listing View
ILE RPG Copy View


The QteAddViewMap API documentation says you have to map a view back to
the statement view. But if the statement view is created by the
compiler, then the creating of other views would have to wait for the
compile to complete. But if you wait for the compile to complete, how
do you store the debug views in the module?


I think those references to the statement view in the documentation only
refer to the case where the "To" view is *STATEMENT. Your "To" view
would be a view number that you got from QteAddViewDescription.
.



Relevant Pages

  • Re: QteStartViewCreation - create source debugger views
    ... QbnEndPreProcessor set of APIs or outside? ... QteStartViewCreation is called when you start reading the source file, ... set DBGVIEW to anything that gets the compiler ... ILE RPG Root Source View - created by RPG preprocessor for the original ...
    (comp.sys.ibm.as400.misc)
  • Re: Ten Commandments (On Topic!)
    ... group can be different from compiler to compiler whereas `parsers' can be written in 100% portable fortran. ... one can use NAMELIST strictly for the user-prepared part of the input file since that is where it is very useful. ... to correctly transfer the data from the input file to the variables). ...
    (comp.lang.fortran)
  • Language lawyer interpretation needed
    ... OpenWatcom v1.2 F77 compiler is being checked against the NIST test suite. ... they carry the proper input in comments, so I was able to construct an input file ... With the source file and the input file "changed" to avoid tab replacement, ...
    (comp.lang.fortran)
  • Re: noob question re: space delimited input
    ... Thanks George, dpb, and Richard. ... I am going to try with a different compiler, ... I have a test input file that called 'input.txt' containing: ... removed, so maxSize is probably ...
    (comp.lang.fortran)
  • Re: Realia Cobol help please
    ... > I'm running a very old version of Realia Cobol, ... > Is there any way to concatenate multiple files to an input file? ... no other compiler can do it either. ...
    (comp.lang.cobol)