Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Report section in a cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
gowrishankari_s

New User


Joined: 15 Feb 2007
Posts: 4
Location: hyderabad

PostPosted: Fri Apr 20, 2007 2:47 pm    Post subject: Report section in a cobol program
Reply with quote

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
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 20, 2007 3:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
gowrishankari_s

New User


Joined: 15 Feb 2007
Posts: 4
Location: hyderabad

PostPosted: Fri Apr 20, 2007 3:28 pm    Post subject: Re: Report section in a cobol program
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 20, 2007 4:42 pm    Post subject:
Reply with quote

Well, what can I say, the last time I coded an RD was when it was included with the compiler.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2007 7:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Apr 20, 2007 8:17 pm    Post subject: Re: Report section in a cobol program
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2007 9:04 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2007 9:07 pm    Post subject:
Reply with quote

Here's a link to more complete info. . .

http://www.emunix.emich.edu/info/cobol/books/atrwri.htm
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 20, 2007 9:33 pm    Post subject: Re: Report section in a cobol program
Reply with quote

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
View user's profile Send private message
nandu404

New User


Joined: 20 Sep 2006
Posts: 4

PostPosted: Thu Apr 26, 2007 12:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us