Lines numbers in source don't match object

Lines numbers in source don't match object

Post by Douglas Han » Sun, 06 Sep 1998 04:00:00



Benny,

Quote:>I'm  using v3r7m0 and rpgle.
>If there is a problem with the program at run time the line number
>does not match the lines in the source.
>Why ?

It is showing the "source listing line number" from the compile
listing as opposed to the original source sequence number.  You also
have to use this value with the ILE de*, which caused numerous
complaints to IBM.

To IBM's credit, they not only made it possible to change this
behavior in future releases, they made PTF's available last Feb for
releases as far back as V3R2.  The following PTF numbers may have been
superceded by now, but ordering them should get you what you need.
You need two PTFs: one for the RPG compiler and one for run-time
support.  For the sake of others, I am including the PTF numbers for
more than just your V3R7 need:

         Compiler (product 57xxRG1) | Runtime (product 57xxSS1)
         -------------------------- | ------------------------
 V3R2    SF46001                    | SF45788
 V3R6    SF45749                    | SF45430
 V3R7    SF46327                    | SF46321
 V4R1    (use V3R7 compiler + PTF)  | SF46462
 V4R2    SF45191                    | SF45189

Read the cover letters for the PTFs.  Basically, you need to add  one
of the following statements to your source and recompile:

     H Option( *SrcStmt )
     H Option( *NoDebugIO )
     H Option( *SrcStmt : *NoDebugIO )

Note that the PTF's do not change the syntax checking in SEU, so SEU
will complain about the statement, but the compiler will accept it
once the PTFs are applied.  (Unless a more recent PTF has fixed this.)

The *SrcStmt option is what you asked about -- it makes error messages
report the original source sequence number and also is what you would
use in the de* when setting breakpoints, etc.  The *NoDebugIO is
another answer to complaints -- it causes the de* to not stop at
each field being moved to/from the buffer when stepping thru code and
reaching an I/O statement.

Note that with V4R2+ systems, the Option() keyword already existed so
they just added two additional allowable values, but for V3Rx systems
the Option() control spec keyword did not previously exist.

I always add Option( *SrcStmt : *NoDebugIO ) to all my V3R7 source now
when writing new modules or maintaining old modules.

Doug