Page 1 of 1

Can we find the total no. of lines in all members of a PDS?

Posted: Tue Dec 02, 2014 2:36 pm
by Angel
Hi,

For one of the requirements, I'd need to find the total Lines of Code in a PDS. The PDS has got 1500 members. Is there any way to find the total number of lines using some tool? Can Sort be an optio for this too?

Re: Can we find the total no. of lines in all members of a P

Posted: Tue Dec 02, 2014 2:54 pm
by enrico-sorichetti
with a bit of lateral thinking ... YES

just run a SRCHFOR with a string that YOU KNOW does not exist

the summary will tell how many members searched and how many lines searched

Code: Select all

********************************* Top of Data **********************************
  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS
     SEARCH-FOR SUMMARY SECTION            SRCH DSN: ENRICO.ISPF.EXEC

LINES-FOUND  LINES-PROC  MEMBERS-W/LNS  MEMBERS-WO/LNS  COMPARE-COLS  LONGEST-LI
        0         3124            0             34           1:80           80

PROCESS OPTIONS USED: ANYC

THE FOLLOWING PROCESS STATEMENTS (USING COLUMNS 1:72) WERE PROCESSED:
   SRCHFOR  ' AM SURE THAT IT IS NOT THERE'

******************************** Bottom of Data ********************************

Re: Can we find the total no. of lines in all members of a P

Posted: Tue Dec 02, 2014 4:30 pm
by zprogrammer
Also what you could do is create a REXX script to display the number of lines MEMBER wise

Re: Can we find the total no. of lines in all members of a P

Posted: Tue Dec 02, 2014 5:16 pm
by Anuj Dhawan
Unless i missed the obvious: This should help -

ISPF option 3.4, bring up the PDS on a selection list, enter PX beside the PDS. This prints the member names and line counts along with total lines. In the command line type LIST. Choose option 3 (keep and continue with new).

A data set of name &PREFIX.SPFx.LIST should give you a detailed report on your PDS.

Re: Can we find the total no. of lines in all members of a P

Posted: Mon Feb 22, 2016 2:30 pm
by Angel
Pandora-Box wrote:Also what you could do is create a REXX script to display the number of lines MEMBER wise
Thanks but I am not very comfortable with REXX.

Re: Can we find the total no. of lines in all members of a P

Posted: Mon Feb 22, 2016 2:46 pm
by Angel
enrico-sorichetti wrote:with a bit of lateral thinking ... YES

just run a SRCHFOR with a string that YOU KNOW does not exist

the summary will tell how many members searched and how many lines searched

Code: Select all

********************************* Top of Data **********************************
  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS
     SEARCH-FOR SUMMARY SECTION            SRCH DSN: ENRICO.ISPF.EXEC

LINES-FOUND  LINES-PROC  MEMBERS-W/LNS  MEMBERS-WO/LNS  COMPARE-COLS  LONGEST-LI
        0         3124            0             34           1:80           80

PROCESS OPTIONS USED: ANYC

THE FOLLOWING PROCESS STATEMENTS (USING COLUMNS 1:72) WERE PROCESSED:
   SRCHFOR  ' AM SURE THAT IT IS NOT THERE'
  
******************************** Bottom of Data ********************************
Thanks enrico for the help but it tells the "total" lines searched but not the number of line for every member in the PDS. Or did I get it wrong?

Re: Can we find the total no. of lines in all members of a P

Posted: Mon Feb 22, 2016 2:46 pm
by Angel
Anuj Dhawan wrote:Unless i missed the obvious: This should help -

ISPF option 3.4, bring up the PDS on a selection list, enter PX beside the PDS. This prints the member names and line counts along with total lines. In the command line type LIST. Choose option 3 (keep and continue with new).

A data set of name &PREFIX.SPFx.LIST should give you a detailed report on your PDS.


Thanks for the help Anuj! :good:

Re: Can we find the total no. of lines in all members of a PDS?

Posted: Mon Feb 22, 2016 3:20 pm
by enrico-sorichetti
I'd need to find the total Lines of Code in a PDS.
my reply and the results shown satisfy fully the original request.
... but it tells the "total" lines searched but not the number of line for every member in the PDS. Or did I get it wrong?
You asked the wrong question then

Re: Can we find the total no. of lines in all members of a PDS?

Posted: Sat Feb 27, 2016 6:02 pm
by Angel
Sorry for the confusion enrico. Reading it again and yes, it indeed is wrong. :(

Re: Can we find the total no. of lines in all members of a PDS?

Posted: Sat Jun 11, 2016 3:00 am
by prino
Angel wrote:For one of the requirements, I'd need to find the total Lines of Code in a PDS.
And which utterly imbecile PHB has come up with this utterly useless requirement?