0

Is it possible to count the number of rows of code for Cobol programs for a certain subsystem in Endevor? Someone told me that Endevor can generate reports with this information but I can't find any information about this.

I'm aware that the metric (number of rows) isn't necessarily relevant, but I was asked the question and would like to answer it, even though I don't really see the point of this exact metric. I'm parallel to answering the question try to turn the focus to a more meaningful metric, here any advice and recommendations are much appreciated. Thoughts are, number of verbs and so on...

bek
  • 691
  • 1
  • 9
  • 17
  • I'm sure the total number of lines (rows of code, what would that mean?) of any element would be recorded. I'm not sure they'd be any use to you. One person's line can easily be another person's four lines. Even beyond that, counting lines doesn't give you much. The best actual statistics are on the compiler listing (and in the executable code). They are split between data and procedure (so have some more meaning) but, really, what does a count of the lines give anyone? – Bill Woodger Mar 17 '17 at 11:32
  • @BillWoodger The down-vote was harsh, but ok :) I clarifed the intent of the question, I would like to be able to answer it and at the same time try to change the focus to a more meaningful metric. – bek Mar 18 '17 at 12:23
  • You want me to downvote the question? Curious request. I'm sure Endevor can provide counts of lines in its elements. However, as I said, since some people will cram into one line what others may write over four lines, and since there is no distinction between data/procedure, and since I don't know whether it can "count" the lines in copybooks used in an element as well, or whether it can ignore blank lines and comments, it is not just that LOC may not mean much, but for sure LOsomethingwe'renotreallyclearabout means even less and is not worth pursuing. Manuals? – Bill Woodger Mar 18 '17 at 14:53
  • On the compile listing are counts of source statements (lines, including expanded copybooks), data division statements (one per statement, no matter how many source lines it occupies) and procedure division statements (one per statement, no matter how many source lines it occupies). The number of statements are also included in the object code. Have a look at the Programming Guide where it explains the compiler listing. There are some tools, even a free one, COBANAL, which pull information from the object code. – Bill Woodger Mar 18 '17 at 15:00
  • How many programs are you looking at? Which compiler are you using (version and release)? What is the intention of the counting? If someone seriously wants the count of source lines, just give them anything. They won't know how to show otherwise. To produce something "more useful" will take work, which costs money. What does the client really want? Counting lines in Endevor is not going to give it to them, unless they just want some figure. In which case, just give them some figure. If not, indicate what is wanted, not how a bad method won't provide for it. – Bill Woodger Mar 18 '17 at 15:04

1 Answers1

0

Endevor provides a large set of statistics available via its BC1PCSV0 utility. Try looking up Broadcom Endevor user documentation and review the section on Reporting and "Comma Separated Value (CSV) Reporting Utility" in particular.

The JCL to run this looks something like:

//*---------------------------------------------------
//* Extract stats from ENDEVOR into CSV formatted DS
//*...................................................
//STEP2    EXEC PGM=NDVRC1,REGION=0M,
//         PARM='CONCALL,DDN:CONLIB,BC1PCSV0'
//*   INPUT -- SCL FOR CSV UTILITY
//CSVIPT01 DD *
LIST ELEMENT *
FROM ENVIRONMENT PR0CYCLE
SYSTEM SYSALL
SUBSYSTEM *
TYPE %COB*
STAGE 2
TO FILE APIEXTR
.
/*
//APIEXTR  DD DSN=your-csv-data-set-name-goes-here,
//         DISP=(NEW,CATLG,DELETE)
//         AVGREC=K,
//         LRECL=4092,
//         RECFM=VB,
//         SPACE=(1000,(100,10)),
//         UNIT=SYSDA
//CSVMSGS1 DD SYSOUT=*
//C1MSGSA  DD SYSOUT=*
//BSTERR   DD SYSOUT=*
//SYMDUMP  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*

The particular statistic you are looking for is: "ELM LAST LL # STMTS"