0

I want to check number of lines in the source code of cobol on mainframe. cobol source code resides in one of the PDS on mainframes.

Note: I am new to Mainframe OS. Previously I was working on AS/400 OS. Trying to see Mainframe OS through IBMi lens.

Nicolas
  • 45
  • 1
  • 5
  • How are you accessing the source code? If you're using [ISPF](https://www.ibm.com/docs/en/zos/2.1.0?topic=editor-how-use-ispf), scroll to the bottom of the code and look at the line count. – Gilbert Le Blanc Mar 23 '22 at 07:13
  • Yes, I did the same but when I checked.. in every line the count is increment to 10, 100,1000,10000. Basically the lines are incrementing. – Nicolas Mar 23 '22 at 08:52
  • If the source is in a PDS member, and it was edited with ISPF, the member list's *Size* column has the number of lines. – phunsoft Mar 24 '22 at 17:15

1 Answers1

1

If all the source code is in one dataset or PDS member, simply Edit or View the dataset and issue the primary command 'X all' to exclude all lines. There will be an information line showing how many lines are excluded which - because you excluded ALL lines - will be the number of lines in the dataset.

Steve Ives
  • 7,894
  • 3
  • 24
  • 55