T. Büscher
T. Büscher

Reputation: 88

Enterprise Cobol 5.2 Debugger Linenumbers exceeded

I have the "wonderful" task of maintaining a legacy program that I didn't write. The Cobol program runs in a z/OS 2.2 environment and is compiled with IBM Enterprise Cobol 5.2. For debugging I would like to compile the program with the option CBL LIST, TEST (EJPD, SOURCE). Unfortunately, my source code has more than 999999 lines, so there is an error when compiling. Is there a way to circumvent the limitation of the number of lines or is there only a way to split the program?

Upvotes: 1

Views: 137

Answers (2)

cschneid
cschneid

Reputation: 10765

The 999999 limit on number of lines has been present since at least VS COBOL II, released in the mid-1980s. It's also present in Enterprise COBOL 6.3, the latest version prior to the compiler as of this update.

Perhaps someone is having you on, presenting you with uncompilable source. This is a compiler limit, and as @SaggingRufus has indicated, the solution would be to break the program up into multiple modules.

I would contend that a million+ lines of source code is incomprehensible.

Other mechanisms available to you include evaluating the code, looking for statements that span multiple lines for no good reason...

MOVE
A
TO
B

...is just silly.

As an aside, maintaining code you didn't write is part of the job. It used to be normal to put the new employees through a period of maintaining the existing code base to get them familiar with shop standards, etc.

Upvotes: 6

SaggingRufus
SaggingRufus

Reputation: 1834

Depending on the JES version, I believe you can you the WARNING parameter which would look something like this

//JOB10 JOB 1234,ME,LINES=(999999,WARNING)

This tells the system to continue even if the line limit is hit and only issue a warning.

Alternatively, you could output this compile listing to a file rather than a SYSOUT. Then the line limit would not apply

Also keep in a mind the having that many line in the JES spool is not a good thing, so I would recommend going the file route.

Upvotes: 1

Related Questions