Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOC counter

Status
Not open for further replies.

richard27

Programmer
Oct 25, 2008
4
AU
Can anyone help me with REXX code to count the lines of code in COBOL program (excluding comments and blank lines).

Please help..I need this desperately
 
If your cobol source is in member of source physical file, you have to use your platform specific command to read it from REXX.
For example on the iSeries (aka AS/400) I can use OVRDBF command to override STDIN with a LIB/FILE(MEMBER) and then use PARSE LINEIN to process STDIN.
 
Thanks.

Actually I am new to REXX and don't know about the commands you talking about.

The requirement is to read all the members from the source PDS on Z/OS and count LOC in each member and write it to an output file.

Thanks.
 
I have no idea about z/OS, but I guess there are z/OS commands for working with source members.
And these commands you can then use from within your REXX program.
 

Whenever this question comes up, I always recommend working from the compiler listing rather than the source. The compiler has all kinds of function for calculating statements (which is really what you want, right?) and it makes no sense for anyone to re-do that work.

I mean: if I spread a single statement over 12 lines you want that counted as "1" rather than "12". The alternative is that I can manipulate your statistic to suit my personal needs.

Frank Clarke
--Is it time for another Boston Tea Party?
 
The requirement that I have is to generate an inventory list.
i.e for each COBOL source PDS, I need to know all the members name, the input and output files, total lines of code,etc.
Hence want to do so in a way which is quick and easy to use.
 

Inside each large problem is one or more smaller problems scrabbling to get out.


Frank Clarke
--Is it time for another Boston Tea Party?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top