Lines of Code of the natural Application

Hi,

Could you please help me how to find the Total lines of code of the application inventory. I guess one of the idea if using SPOD would be to just list all the pgms ( assuming that the inventory is just 1000 objects) and import to excel sheet.

If however in the mainframe world is there a similar solution like this ?

Thanks and Regards
Thiru

http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat827mf/syscom/list_m.htm#list_profile
Look at the COUNT-SOURCE-LINES and TOTAL-LINES-DISPLAY-BATCH parameters of the LISTPROF subcommand. (Don’t turn them on as the default as this my have a performance impact.)

If you don’t have Natural Security credentials to modify LISTPROF, then you can use a brute force method. Run the following commands in batch, sending the output to a file.

LOGON library
List Count
List SEQuential *

The number of lines in the output file is approximately the number of lines of source code. There will be a couple of ‘extra’ lines per object for headers and footers, so use the COUNT report to determine how many lines to subtract.

1 Like

Thank you Ralph. Seems as a useful way.
Theres a possibility that the JCL fails with space abend since we may not be sure how much space to allocate as this solution basically lists out the whole inventory code one by one.

I had another idea, that is use the LIST COUNT and get the summart details ( It gives the total inventory size - 16000 Kilo bytes) Then I found the size of some random programs and its total lines of code individually. ( for e.g Pgm 1 had 15K bytes for 400 lines of code)
So I took a rough estimate of
Total LOC of inventory = 16000000 * 400/15000

(I understand that it considers maps also in the total inventory list)

Kindly let me know if its a viable solution to get rough estimates or could it give ambigious results.

Thanks and Regards
Thiru