Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Report Writer control behavior
VMS 7.3  COBOL 2.7

I'm trying to figure out if this is a bug or this is the way Report
Writer controls are supposed to work.

Command procedure with source:
http://eisner.encompasserve.org/~ho...-CONTROL-01.COM

Output of the above:
http://eisner.encompasserve.org/~ho...-CONTROL-01.LOG

At the bottom of the log file, look between the "*** begin ***" and
"*** end ***" lines.  In the first set, notice that A is paired with
bravo, B with charlie, ...  In the second set, A is paired with alpha,
B with bravo, ...  Scroll up in the log file, look at source lines 41
and 50 along with the rest of the code.

I'm curious how other COBOL compilers behave.

Report this thread to moderator Post Follow-up to this message
Old Post
B Hobbs
03-29-04 02:50 AM


Re: Report Writer control behavior
bdhobbs18@yahoo.com (B Hobbs) wrote in message news:<e86c07c4.0403272229.263
2c738@posting.google.com>...

> Command procedure with source:
> http://eisner.encompasserve.org/~ho...-CONTROL-01.COM
> Output of the above:
> http://eisner.encompasserve.org/~ho...-CONTROL-01.LOG

My bad, use the following links instead:
http://eisner.encompasserve.org/~ho...ROL-01-COM.HTML
http://eisner.encompasserve.org/~ho...ROL-01-LOG.HTML

Report this thread to moderator Post Follow-up to this message
Old Post
B Hobbs
03-29-04 02:50 AM


Re: Report Writer control behavior
Xref: kermit comp.lang.cobol:86426

Am  27.03.04
schrieb  bdhobbs18@yahoo.com (B Hobbs)
auf  /COMP/LANG/COBOL
in  e86c07c4.0403272229.2632c738@posting.google.com
ueber  Report Writer control behavior

BH> At the bottom of the log file, look between the "*** begin ***" and
BH> "*** end ***" lines.  In the first set, notice that A is paired with
BH> bravo, B with charlie, ...  In the second set, A is paired with
BH> alpha, B with bravo, ...  Scroll up in the log file, look at source
BH> lines 41 and 50 along with the rest of the code.

Unfortunately I could not check out your example program since the
compiler I have installed does not support the Report Writer module
(until today I thought, it would).


here are some parts of your program.

Comment No. 1: if you want summary reporting, you can use
GENERATE <report-name>
instead of
GENERATE <detail-name>


Comment No. 2:

If the lines you want to see on your listing are just the CONTROL
FOOTINGS, you will see displayed the control item governing this
control, but other items configured for that line, like the one
SOURCE DATA-MNEMONIC
which does not reference a control item, will use as source the
CURRENT value of that data item AT THE TIME this control footing is
produced.

And it is produced when the control item has been replaced by a
value different from the one which is summarized in this control
footing.

That's why I think the behaviour of your REPORT-1 is correct and as
should be expected.

Since you configured the data item DATA-MNEMONIC as a control item
in REPORT-2, the program will provide a separate storage for this
control item, to find out if the current value has changed. Obviously,
the compiler arranges for using this control value in the control
footing, since it is configured as a subordinate control, instead of
the current value of the data item AFTER the change in the primary
control item.

I hope that helps...


Yours,
L. Willms






01 data-report.
11 data-letter pic x.
11 pic x.
11 data-mnemonic pic x(8).

01 one pic 9 comp value 1.

report section.
rd report-1 control data-letter.
01 detail-1 type detail.
01 footing-1 type control footing data-letter.
11 line plus 1.
21 column 1 pic x source data-letter.
21 column 5 pic x(8) source data-mnemonic.
21 column 16 pic zz9 sum one.

* Add data-mnemonic to control list.
rd report-2 control data-letter data-mnemonic.
01 detail-2 type detail.
01 footing-2 type control footing data-letter.
11 line plus 1.
21 column 1 pic x source data-letter.
21 column 5 pic x(8) source data-mnemonic.
21 column 16 pic zz9 sum one.

procedure division.


initiate report-1.
perform varying i from 1 by 1 until i > 12
move data-in(i) to data-report
generate detail-1
end-perform.
terminate report-1.

initiate report-2.
perform varying i from 1 by 1 until i > 12
move data-in(i) to data-report
generate detail-2
end-perform.
terminate report-2.



Report this thread to moderator Post Follow-up to this message
Old Post
Lueko Willms
03-29-04 02:50 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:27 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.