ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Old MC Magazine program Anyone remember

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Old MC Magazine program Anyone remember

    Some years ago, there was utility either in MG Mag, News 36/38 or some like that It was called PROFILE written in OCL and RPGII. it took a program and when run, it would print out the 'C' specs with counts next to each line and how many times the line was executed If anyone has an Idea, I have almost all the old issues, but I need help to find it

  • #2
    The term for that is "Code Coverage", in case that helps you find it.

    I have no idea where you might find that program, but if you use Rational Developer, you can generate such a report if you run a program in debug in Code Coverage mode.

    Comment


    • #3
      Attached is the RPG Profile code I have. Its been updated for more updated code but it has not been completely finished, YMMV. I take NO responsibility for the state of the source attached. If it does not work for you, you and/or someone else will need to figure it out.

      Also, RDi code coverage (CC) is basic. (Based on my last experience with CC) It only reports if the line was executed but with the tool attached (FIXED format only code) you can get a execution line count, which can be good to discover if some sections over execute.
      Attached Files

      Comment


      • #4
        If I understand how it works correctly, it takes a program source file and modifies it to add a counters after every executable line?

        Comment


        • #5
          Wow,
          Thanks a ton
          I tried to open the files, but our internet policing is too strong. I'll save it so I can open at home & try it out.
          I'll bet you cleaned it up a lot since it was OCL

          Stu Mintz

          Comment


          • #6
            I wonder if I could bug you for a couple of problems. I was able to compile 4 pgms, but
            PRF004RG and PRF006RG ran into problems
            PRF004RG needs /COPY members HSPECLE
            ​ and UTL000RGPR​ which I do not have
            PRF006RG needs ​def for $Prfldta

            Would you have those?
            ​Thanks Again
            Stu


            PRF004RG

            0003.00 /COPY QCPYSRC,HSPECLE
            SQL1002 30 2 Member HSPECLE file QCPYSRC in *LIBL for /COPY not found.

            0010.00 /COPY QCPYSRC,UTL000RGPR
            SQL1002 30 10 Member UTL000RGPR file QCPYSRC in *LIBL for /COPY not found.

            0099.00 exec sql set option commit = *none;
            SQL5066 0 99 Precompile option COMMIT changed by SET OPTION statement.

            0209.00 exec sql VALUES ( ifnull( ( select char('1')

            0210.00 from QTEMP/$SOURCE
            SQL1103 10 209 Position 43 Column definitions for table $SOURCE in QTEMP not found.


            PRF006RG
            0003.00 Dcl-F $Prfldta DISK(*EXT) Usage( *Input :*Output :*UPDATE )
            0004.00 Extfile( Globalstmttbl ) Usropn Keyed;
            SQL1001 30 3 External file definition for $PRFLDTA not found.

            Comment


            • #7
              Attached is an updated source set. I removed the unneeded copy books and you just need to create the table yourself for PRF006RG based on the create table statement within.

              The programs PRF005RG and PRF006RG, I don't recall if they truly worked so, YMMV.

              Sorry but I don't have the true originals.
              Attached Files

              Comment


              • #8
                Matt, sorry to bug you, but I uploaded the new sourct for PRF004RG and

                PRF004RG:
                0002.00 /COPY QCPYSRC,HSPECLE
                0010.00 /COPY QCPYSRC,UTL000RGPR

                compile errors:
                MSG ID SEV RECORD TEXT
                SQL1002 30 2 Member HSPECLE file QCPYSRC in *LIBL for /COPY not found.
                SQL1002 30 10 Member UTL000RGPR file QCPYSRC in *LIBL for /COPY not


                PRF006RG
                0003.00 Dcl-F $Prfldta DISK(*EXT) Usage( *Input :*Output :*UPDATE )
                0004.00 Extfile( Globalstmttbl ) Usropn Keyed;​

                compile errorsL
                MSG ID SEV RECORD TEXT
                SQL1001 30 3 External file definition for $PRFLDTA not found.​​



                do you have the source for
                HSPECLE
                UTL000RGPR
                $PRFLDTA

                Thank You
                Stu Mintz

                Comment

                Working...
                X