I just have to comment on what a tremendous waste of resource and effort this is.

What criteria will your management use to determine "complexity"?

How does LOC equate to complexity and, again, what is "complexity"?
Does 10,000,000 lines of code make a system complex?
Is 5,000,000 a simplistic system?

Where will you get statistics of other "complex" systems for comparison?

What will you do if/when you come up with an answer? What's the end game?

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of tim ken
Sent: Wednesday, June 28, 2023 12:49 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: SQL query to know lines of code for all the programs and it's associated modules

< snip >

This statistics is required to have a complete overview of how complex a
particular IBM i environment is?

< /snip >

On Tue, 27 Jun 2023 at 23:10, Peter Dow <petercdow@xxxxxxxxx> wrote:

Just to add to Buck's list, does 'all the programs' include all of IBM's
proprietary system programs?

Are you planning on comparing this to all the same statistics from a
Windows sytem? a Linux system?

On 6/27/2023 10:01 AM, Buck Calabro wrote:
On 6/27/2023 12:15 PM, tim ken wrote:

Is there any SQL query which could provide lines of code used inside
all
the programs and all the associated modules used in the entire IBM i
system?

What do these mean:
'provide lines of code'
'all the programs'
'all the associated modules'
'entire IBM i system'

The reasons that clarifications are needed:
Does 'provide' mean a count, a copy of each actual line, something else?
Does 'line of code' refer to source lines, compiled MI lines,
something else?
If source lines, how does one account for continuations, are they a
single line of code, multiple, something else?

It is very difficult to understand what value any of this might
provide; what question is being answered, what decisions will be made
based upon this information, what the actual business problem is.


Also in this SQL query can we know how many lines are commented and how
many lines are actual program and module code separately in different
columns against each program and it's associated module name ?

Again, clarification is needed. How do you want to treat right-hand
comments? As a commented line, as a line of code, something else?
Remember that a comment varies according to the programming language.
A comment in Cobol is different to a comment in RPG 3, RPG IV, CL,
Python, DDS... Our hypothetical SQL statement would need quite a few
CASE statements to pick these out. What about blank lines?
Continuations of comment lines?

If you are after a rough idea of the size of your application code, I
would use DSPFD to an OUTFILE() and query the number of
members/records in the source files found there.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.