View previous topic :: View next topic
|
Author |
Message |
gowrishankari_s
New User
Joined: 15 Feb 2007 Posts: 4 Location: hyderabad
|
|
|
|
Why does any program with a report section always compiles with maxxcc=4?? Wht can be done to resolve that? The warning that is given is
as follows:
"Code from "PERFORM (line 1862.02)" to "MOVE (line 1862.03)" can never be executed and was therefore discarded. " |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Look at the code and determine why the compiler says that the code can never be executed and fix it or remove it. |
|
Back to top |
|
|
gowrishankari_s
New User
Joined: 15 Feb 2007 Posts: 4 Location: hyderabad
|
|
|
|
But since its a RD section in the program, and the compiler options are correct, and while executing the program, the report is generated perfectly!!
Then why the discrepancy? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Well, what can I say, the last time I coded an RD was when it was included with the compiler. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Look at the generated code and see why the problem lines were generated in the first place. While your code may perform perfectly as-is, you may be able to remove the problem statements by slightly changing your code and that may remove the cc=4. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I've seen posts before referring to a "REPORT SECTION" in COBOL. Is there really such a thing? I've never been able to find details on it in the usual Enterprise COBOL Reference manuals. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Well, once upon a time there was - i've not seen it used for a long time.
As the internal sort has an SD, the report had an RD and on it went from there. . . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
superk wrote: |
I've seen posts before referring to a "REPORT SECTION" in COBOL. Is there really such a thing? I've never been able to find details on it in the usual Enterprise COBOL Reference manuals. |
A long, long time ago, in a far, far simpler world, it came with the compiler. Last I heard it was an add-on cost-extra product of some sort. Back then, I liked it. |
|
Back to top |
|
|
nandu404
New User
Joined: 20 Sep 2006 Posts: 4
|
|
|
|
Hi,
Following is the info I got from a CBT I have.
COBOL Report Writer first appeared in 1961, as a means of performing all the printing functions that might be required of a program.
It is an integral part of COBOL and has been included in every COBOL standard (1968, 1974, and 1985).
Report Writer is implemented as a built-in feature by most COBOL compilers. In others, such as IBM's VS COBOL II and certain compilers for Personal Computers, it is implemented through a Precompiler (a "front-end" language processor).
From 1980 onwards, many new features were added to precompiler implementation. These succeeded in widening Report Writer's potential so that it is now a completely general-purpose output generator. The higher-level subset of COBOL that resulted was called Level 2 Report Writer (RW2 on the PC).
Summary of Features
==============
Report Writer should really be called the "COBOL Output Writer" because it has very little in common with most report generators. For a start, it's built into the COBOL language and cannot be used "stand-alone". Next, it's completely general-purpose (like COBOL itself) so it can handle any layout that may be dreamt up. There's no run-time overhead either.
If you know COBOL (not necessary to appreciate this demonstration), you will know that the COBOL DATA DIVISION is highly developed, but that COBOL relies on procedural "verbs" (MOVE, ADD and so on) to manipulate the data. Report Writer takes this to a fine art by generating print data from the data descriptions alone. (At the highest level, the program still has control because Report Writer has three principal "verbs" that initiate large-scale processes.)
Because report code is kept in one place (the REPORT SECTION) Report Writer coding is easy to maintain. Like the rest of COBOL it uses English words that make the meaning clear. |
|
Back to top |
|
|
|