Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
No.of lines of code in a PDS library

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Wed Oct 15, 2008 4:27 pm    Post subject: No.of lines of code in a PDS library
Reply with quote

Hi,

Can anybody help me in how to find the number of lines of code in a PDS library?

Thx,
Satish
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 15, 2008 4:52 pm    Post subject:
Reply with quote

Any reason to need to know this. Not once in 30+ years have I ever needed to know something like this
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Oct 15, 2008 4:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Wed Oct 15, 2008 5:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Wed Oct 15, 2008 5:08 pm    Post subject: Re: No.of lines of code in a PDS library
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Oct 16, 2008 12:19 am    Post subject: Re: No.of lines of code in a PDS library
Reply with quote

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
View user's profile Send private message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Thu Oct 16, 2008 12:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Oct 16, 2008 1:07 am    Post subject:
Reply with quote

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
View user's profile Send private message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Thu Oct 16, 2008 1:14 am    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Thu Oct 16, 2008 1:21 am    Post subject: Reply to: No.of lines of code in a PDS library
Reply with quote

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
View user's profile Send private message
satish kanamarlapudi

New User


Joined: 23 Jul 2008
Posts: 29
Location: Little Rock - Arkansas

PostPosted: Thu Oct 16, 2008 1:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10309
Location: italy

PostPosted: Thu Oct 16, 2008 2:31 am    Post subject: Reply to: No.of lines of code in a PDS library
Reply with quote

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 icon_biggrin.gif

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
This topic is locked: you cannot edit posts or make replies. How to save expanded jcl's into one l... enrico-sorichetti CLIST & REXX 13 Thu Jul 27, 2017 2:45 pm
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us