View previous topic :: View next topic
|
Author |
Message |
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
Hi,
Can anybody help me in how to find the number of lines of code in a PDS library?
Thx,
Satish |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Any reason to need to know this. Not once in 30+ years have I ever needed to know something like this |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Take a look at CBTTAPE, file 382 (program UNLOAD). It produces a list of members together with the record count for each member. I wrapped it with REXX to sum the records of the whole PDS.
O. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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. |
|
Back to top |
|
|
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
We moved the production libraries to Endevor libraries for programs,jcls,procs,copybooks, dcl gen's etc .... So for this the client wants the total count lines of code moved to Endevor for each library and they want this for a cost n space estimation....
Please let me know if any.
Thx,
satish |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
satish kanamarlapudi wrote: |
Please let me know if any. |
Did you happen to notice what Robert has suggested... just before your post. |
|
Back to top |
|
|
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
Hi Robert,
My libraries are moved fresh to Endevor and they dont have the count in the libraries.
BROWSE NDVR.PROD.DWHS.CBL List saved
Command ===> Scroll ===> PAGE
Name Prompt Size Created Changed ID
_________ DIV200
_________ DIV201
_________ DIV203
_________ DWSARCS1
_________ DWSDRG01
_________ DWSDRG04
_________ DWS005
_________ DWS009
_________ DWS012
_________ DWS014
_________ DWS017
_________ DWS017A
_________ DWS018
_________ DWS019
_________ DWS025
_________ DWS026
_________ DWS027
_________ DWS030
_________ DWS031
_________ DWS033
_________ DWS034
_________ DWS035
_________ DWS036
_________ DWS037
_________ DWS038
_________ DWS039
_________ DWS039A
_________ DWS040
_________ DWS046
_________ DWS047
_________ DWS048
_________ DWS049
_________ DWS051
_________ DWS053
_________ DWS054
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So i had written a REXX tool to take care of this :-
I opened the libray i want to get the Lines of code and then issued the command 'SAVE SOMENAME' then the member names is stored in the PDS 'USERID.SOMENAME.MEMBERS' . So from here i went on reading the member name only and eliminated the description part in the record and read it from the library member till last line and went on till the last record in 'USERID.SOMENAME.MEMBERS' and each and every time while reading the next record i added the lines of code to the total count.
/*REXX*/
TRACE R
ADDRESS TSO
INPDS1 = 'SXK0000.SOMENAME.MEMBERS'
INPDS2 = 'ATID.DSXK.SCL'
"ALLOC DA('"INPDS1"') F(INDD4) SHR REUSE"
"EXECIO * DISKR INDD4 (STEM IFILE."
OUTPDS = 'ATID.REXX.EXEC(RPT805TZ)'
"ALLOC DA('"OUTPDS"') F(OUTDD4) SHR REUSE"
L2 = 0
DO I = 1 TO IFILE.0
A=WORD(IFILE.I,1)
SAY A
PDS=INPDS2'('A')'
SAY PDS
"ALLOC DA('"PDS"') F(INDD1) SHR REUSE"
"EXECIO * DISKR INDD1 (STEM JFILE. FINIS"
L1 = 0
DO J = 1 TO JFILE.0
L1 = JFILE.0
END
"FREE FI(INDD1)"
L2 = L2 + L1
END
SAY L2
OUT.1 = L2
SAY OUT.1
"EXECIO * DISKW OUTDD4 (STEM OUT. FINIS"
EXIT
Please let me know if any.
Thx,
satish |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
endevor has all kinds of reports; I have seen several user 'generatable' reports that include the line count of an element.
Forcing ISPF statistics to be generated and accumulated probably cost more than the actual move to endevor. |
|
Back to top |
|
|
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
I dont know how to generate those reports, and here we need total count of the whole library(not the single member count).
Thx,
satish |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Can't you just print the contents of the PDS to a formatted sequential dataset (using either PRINTDS or IEBPTPCH) and then count the number of records in that dataset? |
|
Back to top |
|
|
satish kanamarlapudi
New User
Joined: 23 Jul 2008 Posts: 29 Location: Little Rock - Arkansas
|
|
|
|
For printing the contents, see below the size is spaces as they r moved freshly, otherwise tht would be my 1st option....
BROWSE NDVR.PROD.DWHS.CBL List saved
Command ===> Scroll ===> PAGE
Name Prompt Size Created Changed ID
_________ DIV200
_________ DIV201
_________ DIV203
_________ DWSARCS1
_________ DWSDRG01
_________ DWSDRG04
_________ DWS005
_________ DWS009
_________ DWS012
_________ DWS014
_________ DWS017
_________ DWS017A
_________ DWS018
_________ DWS019
_________ DWS025
_________ DWS026
_________ DWS027
_________ DWS030
_________ DWS031
_________ DWS033
_________ DWS034
_________ DWS035
_________ DWS036
_________ DWS037
_________ DWS038
_________ DWS039
_________ DWS039A
_________ DWS040
_________ DWS046
_________ DWS047
_________ DWS048
_________ DWS049
_________ DWS051
_________ DWS053
_________ DWS054 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
I would say that still the fastest way would be to build the ISPF statistics,
ISPF reading will be certainly be faster than rexx reading
Code: |
"EXECIO * DISKR INDD1 (STEM JFILE. FINIS"
L1 = 0
DO J = 1 TO JFILE.0
L1 = JFILE.0
END |
why loop for the number of lines ...
ah...to be sure that L1 gets primed properly
Code: |
"EXECIO * DISKR INDD1 (STEM JFILE. FINIS"
L1 = JFILE.0 |
is more than enough, if You have faith in a single move |
|
Back to top |
|
|
|