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

JES2/3, JCL, utilities.
User avatar

Topic author
Angel
Active Member
Posts: 101
Joined: Sat Jun 08, 2013 8:13 pm
Has thanked: 1 time

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

Postby Angel » Tue Dec 02, 2014 2:36 pm

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?



Online

enrico-sorichetti
Global Moderator
Global Moderator
Posts: 822
Joined: Wed Sep 11, 2013 3:57 pm
Been thanked: 69 times

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

Postby enrico-sorichetti » Tue Dec 02, 2014 2:54 pm

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 ********************************


cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)


zprogrammer
Global Moderator
Global Moderator
Posts: 603
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars
Has thanked: 7 times
Been thanked: 7 times

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

Postby zprogrammer » Tue Dec 02, 2014 4:30 pm

Also what you could do is create a REXX script to display the number of lines MEMBER wise


zprogrammer

User avatar

Anuj Dhawan
Founder
Posts: 2393
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Has thanked: 152 times
Been thanked: 66 times

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

Postby Anuj Dhawan » Tue Dec 02, 2014 5:16 pm

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,
Anuj

User avatar

Topic author
Angel
Active Member
Posts: 101
Joined: Sat Jun 08, 2013 8:13 pm
Has thanked: 1 time

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

Postby Angel » Mon Feb 22, 2016 2:30 pm

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.



User avatar

Topic author
Angel
Active Member
Posts: 101
Joined: Sat Jun 08, 2013 8:13 pm
Has thanked: 1 time

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

Postby Angel » Mon Feb 22, 2016 2:46 pm

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?



User avatar

Topic author
Angel
Active Member
Posts: 101
Joined: Sat Jun 08, 2013 8:13 pm
Has thanked: 1 time

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

Postby Angel » Mon Feb 22, 2016 2:46 pm

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:



Online

enrico-sorichetti
Global Moderator
Global Moderator
Posts: 822
Joined: Wed Sep 11, 2013 3:57 pm
Been thanked: 69 times

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

Postby enrico-sorichetti » Mon Feb 22, 2016 3:20 pm

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


cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)

User avatar

Topic author
Angel
Active Member
Posts: 101
Joined: Sat Jun 08, 2013 8:13 pm
Has thanked: 1 time

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

Postby Angel » Sat Feb 27, 2016 6:02 pm

Sorry for the confusion enrico. Reading it again and yes, it indeed is wrong. :(



User avatar

prino
Registered Member
Posts: 53
Joined: Sun Jun 01, 2014 4:15 am
Location: Oostende, Belgium
Been thanked: 1 time

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

Postby prino » Sat Jun 11, 2016 3:00 am

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?


Robert AH Prins
robertahprins @ the.17+Gb.Google thingy


Return to “JCL - Job Control Language.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest