IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Write reports in mainframes using COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Sat Apr 22, 2006 8:12 pm
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
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

Global Moderator


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

PostPosted: Mon Apr 24, 2006 6:55 pm
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
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 .

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

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

Global Moderator


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

PostPosted: Tue Apr 25, 2006 5:44 pm
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts SH256/MD5 Checksum in Mainframes JCL JCL & VSAM 14
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top