ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to retrieve lines of code??

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

  • How to retrieve lines of code??

    Hi

    I need to get the program lines including the commented one of a particular source PF in a Lib.

    For ex:: My library is Qsys,if I use a SRCPF for RPG is QRPG

    Then for Cobol is QCBL in the same library.

    If each SRCPF contains 10 program each? I need to count the 20 Programs lines.

    if a program contains 50 lines its ok to count ,but say if its thousands,its hard.

    Is there any logic to determine??

    can any CL program used to determine it??

  • #2
    Re: How to retrieve lines of code??

    if you simply want to know the number of lines in any pgm then use "display member description" or opt 8 against the member in WRKMBRPDM and over there you will find a parameter called 'Number of records'.It shows number of lines in that pgm.
    Thanks,

    Abhishek KUMAR

    Comment


    • #3
      Re: How to retrieve lines of code??

      you can also refer to this link
      Thanks,

      Abhishek KUMAR

      Comment


      • #4
        Re: How to retrieve lines of code??

        Thanks for ur replies abhishek..
        ya i did with the member description '8' option and found the lines,but this is for temp process if i need to do periodically means its horrible. so its better 2 write a CL to fetch na..
        lets think of it.. if i found solution..il post it..
        thank u once again

        Comment


        • #5
          Re: How to retrieve lines of code??

          just DSPFD to an outfile and do a quick SQL with a sum of the record count...

          Code:
          DSPFD FILE(THSRC/QCLSRC) TYPE(*MBR) OUTPUT(*OUTFILE) OUTFILE(QTEMP/TEMP)
          
          STRSQL
          
          SELECT sum( MBNRCD ) FROM qtemp/temp
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment

          Working...
          X