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

Need a peice of logic for paging in report writing.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Mon Mar 31, 2008 10:56 am
Reply with quote

I need to know how to break down the page and how to move to the next page when specified number of line is fullfilled in Report writing.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 31, 2008 11:49 am
Reply with quote

Hi,

I think, this will change shop to shop, you might be having some existing program to look for this.

At my shop, we use AFP, where CC ='1' means next page.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Mon Mar 31, 2008 12:11 pm
Reply with quote

Hi Anuj....

Can i able to do it in Cobol
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Mar 31, 2008 5:07 pm
Reply with quote

WRITE PRINT-LINE AFTER PAGE.
Back to top
View user's profile Send private message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Mon Mar 31, 2008 5:48 pm
Reply with quote

step:1: write the headers for the report (ex: coulmn names)
step:2: write the detail lines of the report i.e., data row for each column you are writing to the report.
step:3: count each number of data row you are writing to the report
step:4: keep the check for number of lines written to max allowed lines in a page. suppose for ex if maximum allowed number lines are 55, check whether the written number of lines has exceeded 55
step:5: if it has exceeded the maximum allowed(55), then perfrom the paragragh for writing the headers, and conitnue with writing data rows(continue from step:1)
step:6: if it has not exceeded, contnue writing data rows, and keep checking the number of rows written against max allowed.
Back to top
View user's profile Send private message
Thyaga

New User


Joined: 19 Mar 2008
Posts: 2
Location: Chennai

PostPosted: Mon Mar 31, 2008 6:11 pm
Reply with quote

Craq

Is it possible to use tha AFTER PAGE IN display statement
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Mar 31, 2008 6:11 pm
Reply with quote

NO!
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Mar 31, 2008 6:31 pm
Reply with quote

Thyaga wrote:
Craq

Is it possible to use tha AFTER PAGE IN display statement


DISPLAY is an very wasteful way of producing reports.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Mar 31, 2008 8:46 pm
Reply with quote

Hello,

Quote:
DISPLAY is an very wasteful way of producing reports.
Not only wasteful, but DISPLAY is not permitted in production programs on many (most?) systems.

If you are not familiar with creating reports with "page breaks", i'd suggest you write some simple test program that reads its' own source code and causes a page break every 50 lines as well as a new page for each division (this would be a small program, so you might have to add some comment lines to get more than 50 lines in one division to cause a page overflow).

Once you have that working, use the line-count/page heading logic in your "real" program. If you have problems/questions, post what you have done and your queston/problem and someone here will be able to help.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Tue Apr 01, 2008 9:07 am
Reply with quote

Hi Priya and Dick....

I used ur logic its working nicely thank you for the co-operation.

i have to do daily, weekly and monthly reports related to my project, according to the parameters set in JCL appropriate para is going to execute, everything i did but, was having confusion in page breaking and going to new page.

Know i got to know thank you one and all.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 01, 2008 7:25 pm
Reply with quote

You're welcome - thank you for telling us that it is working icon_smile.gif

d
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 Two input files & writing counter... DFSORT/ICETOOL 12
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts CA7 late paging for a demanded job CA Products 2
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
Search our Forums:

Back to Top