Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Write reports in mainframes using COBOL

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

New User


Joined: 24 Feb 2006
Posts: 3

PostPosted: Sat Apr 22, 2006 10:09 am    Post subject: Write reports in mainframes using COBOL
Reply with quote

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

superk

Moderator Team Head


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

PostPosted: Sat Apr 22, 2006 8:12 pm    Post subject: Re: report writing in mainframes.
Reply with quote

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

New User


Joined: 24 Feb 2006
Posts: 3

PostPosted: Mon Apr 24, 2006 10:46 am    Post subject: Re: report writing in mainframes.
Reply with quote

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

Moderator Team Head


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

PostPosted: Mon Apr 24, 2006 6:55 pm    Post subject: Re: report writing in mainframes.
Reply with quote

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

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Tue Apr 25, 2006 3:57 pm    Post subject:
Reply with quote

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 .

http://www.csis.ul.ie/COBOL/Course/ReportWriterSS.htm

Thanks,
KS
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Apr 25, 2006 5:44 pm    Post subject: Re: report writing in mainframes.
Reply with quote

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

New User


Joined: 24 Feb 2006
Posts: 3

PostPosted: Wed Apr 26, 2006 11:22 am    Post subject: Re: report writing in mainframes.
Reply with quote

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

New User


Joined: 28 Feb 2006
Posts: 91
Location: Chennai

PostPosted: Wed Apr 26, 2006 11:50 am    Post subject:
Reply with quote

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

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Fri Apr 28, 2006 12:51 am    Post subject:
Reply with quote

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
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Produce Mainframe Dash Board Reports ... sdcarlson53 All Other Mainframe Topics 2 Thu Jan 05, 2017 11:01 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts Are there any Freeware utilties for i... johnmull IBM Tools 2 Wed Dec 21, 2016 8:29 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us