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

JES2/3, JCL, utilities.
Post Reply
User avatar
Angel
Registered Member
Posts: 95
Joined: Sat Jun 08, 2013 8:13 pm
India

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

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 838
Joined: Wed Sep 11, 2013 3:57 pm

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

Post 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 ********************************
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: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

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

Post by zprogrammer »

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: 2816
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post 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.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Angel
Registered Member
Posts: 95
Joined: Sat Jun 08, 2013 8:13 pm
India

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

Post 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.
User avatar
Angel
Registered Member
Posts: 95
Joined: Sat Jun 08, 2013 8:13 pm
India

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

Post 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?
User avatar
Angel
Registered Member
Posts: 95
Joined: Sat Jun 08, 2013 8:13 pm
India

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

Post 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:
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 838
Joined: Wed Sep 11, 2013 3:57 pm

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

Post 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
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
Angel
Registered Member
Posts: 95
Joined: Sat Jun 08, 2013 8:13 pm
India

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

Post by Angel »

Sorry for the confusion enrico. Reading it again and yes, it indeed is wrong. :(
User avatar
prino
Registered Member
Posts: 68
Joined: Sun Jun 01, 2014 4:15 am
Location: Vilnius, Lithuania
Contact:

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

Post 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?
Robert AH Prins
robertahprins @ the.17+Gb.Google thingy
Some z/OS code here
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”