View previous topic :: View next topic
|
Author |
Message |
ammu b
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
hi,
i am new to mainframes.
I would like to know if it is possible to write reports in mainframes using COBOL. if so, how. please help me . is it possible only in IBM COBOL?
If there is any site, please tell.
Thank you,
Ammu |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You can create a report using just about anything you want, whether you want to use COBOL or Assembler or SORT or Easytrieve or SAS or any other of the myriad of software tools. |
|
Back to top |
|
|
ammu b
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
thank you superk for replying me.
I am not clear about ur reply. I would like to know, how to write a report using COBOL . what are the things to take care in the JCL while writing report. Is it possible to use report section in COBOL.
Thanks in advance.
ammu |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
ammu b wrote: |
I would like to know, how to write a report using COBOL.
|
That is an extremely elementary question that would be best left to a programming textbook or a programming class. Some of the basic items that have to be considered are: control and content of page headers and footers, page breaks, control breaks, total accumulators, control totals, page counts. This is a discussion that is beyond the scope of a technical forum. Maybe there's an educational forum elsewhere that you can use.
ammu b wrote: |
what are the things to take care in the JCL while writing report.
|
A "standard" report dataset is defined as 132 printer characters across by 66 print lines down. This dataset is normally allocated as RECFM=FBA, LRECL=133. The FBA (Fixed Block ANSI) format allows for the ANSI printer control characters to be added to the first byte. This "standard" format allows the use of standed computer output paper, which is typrically 13 7/8 inches wide by 11 inches down. Standard output is printed at 10 characters-per-inch which, if you take the 13 7/8 measurement and account for the printer form-feed strips, prints the data from the left-to-right edges. Normal vertical spacing is 6 lines-per-inch, which calculates to the 66 lines-per-page value on the 11-inch paper.
These value vary widely when the output device is a line-mode laser printer, an APA-page printer, or a Postscript page printer.
ammu b wrote: |
Is it possible to use report section in COBOL.
|
There is no such section in COBOL. |
|
Back to top |
|
|
KS
New User
Joined: 28 Feb 2006 Posts: 91 Location: Chennai
|
|
|
|
Hi ammu,
You can write a report using a simple program.You can find them in any of the COBOL books(look in MK Roy).
Report can also be written using the Report writer.Have a look at the following link to get to know more.Hope this helps .
www.csis.ul.ie/COBOL/Course/ReportWriterSS.htm
Thanks,
KS |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
KS, could you also please post the url for an IBM COBOL manual that shows how to construct this "RD" section for an OS/390 or z/OS environment. |
|
Back to top |
|
|
ammu b
New User
Joined: 24 Feb 2006 Posts: 3
|
|
|
|
Thank you, KS and superk for the help. I had reached that URL before. But i was searching whether i can use RD section in IBM COBOL.
Ammu |
|
Back to top |
|
|
KS
New User
Joined: 28 Feb 2006 Posts: 91 Location: Chennai
|
|
|
|
Sure Superk!
Pls find the details below :
- The RD needs to be defined in the Report section.
- Report section is a division of Data Division and must appear as the last section of Data division.
- A file need to be defined in the file control paragraph.
Syntax - FD <filename> REPORT IS <report-name-1>,<report-name-2...>
RD entry describes the following :
- Should have a dataname on which the control break takes place.
- These data items are called control data items and the word FINAL is accepted as control data items.
- FINAL break implies the highest break in control hierarchy and it takes place at the begining and at the end.
- Give the logical page size.
- The line numbers or positions where the report groups should appear on the page.
RD is followed by description of various report groups.Group items are at 01 level entry and the subordinate entries should also have the source where value is to be printed.
Ex -
RD MYREPORT
CONTROLS ARE FINAL ACCT-NO
PAGE 50 LINES
HEADING 2
FIRST DETAIL 6 LAST DETAIL 52
FOOTING 56
01 TYPE PAGE HEADING.
02 LINE NUMBER IS 2
03 COLUMN 20 PIC X(14) VALUE "EMPLOYEE REPORT"
03 COLUMN 52 PIC X(7) VALUE "PAGE-NO"
......
01 TYPE CONTROL FOOTING ACCT-NO.
Thats the info i have.Will try to find a link for more information.
Thanks,
KS
Am not sure of any links.Will try to find them.Mean while pls have a look at a program, |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Guys,
Report Writer is an optional installable with your compiler, I guess you need to pay more to get it installed... It is not there in the shop I work in!
Make sure that this is there in your shop before designing any thing with Report Writer in mind!!! |
|
Back to top |
|
|
|