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

Write after page/advancing


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

New User


Joined: 02 Aug 2007
Posts: 18
Location: india

PostPosted: Sat Jun 28, 2008 1:03 pm
Reply with quote

Hi all,

My requirement is to write some content in to a report in the second page. First page should be left blank.

I know i can use WRITE REPORT-LINE AFTER PAGE to write content to second page. But my WRITE command shouldn't contain AFTER PAGE/ADVANCING.

How can i do this?

Thanks.
Back to top
View user's profile Send private message
Vasukip
Currently Banned

New User


Joined: 17 Jun 2008
Posts: 48
Location: Chennai

PostPosted: Sat Jun 28, 2008 4:56 pm
Reply with quote

Hi,
For this you can define one blank Detail Line as BLANK_HEADER.
WRITE OUTREC FROM BLANK-HEADER .
Anthen you can use AFTER advancing pointer for DATA-DETAIL-LINE.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 28, 2008 5:09 pm
Reply with quote

Carriage control allows an RECFM=FBA or RECFM=VBA file to be used by the program to skip pages.
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: Sat Jun 28, 2008 7:21 pm
Reply with quote

Hello,

Quote:
But my WRITE command shouldn't contain AFTER PAGE/ADVANCING.
Why not?

Defining top-of-page in "special names" and then using this name in the write is a common way to position the paper at the top of a new page - without specifying "PAGE".

Is there something that requires you to fill a page with blank lines, rather than directly advancing to the top of the next page?
Back to top
View user's profile Send private message
sriramvempaty

New User


Joined: 02 Aug 2007
Posts: 18
Location: india

PostPosted: Wed Jul 16, 2008 1:47 pm
Reply with quote

Hi Dick,

The problem here is we have a module which takes care of writing in to /reading from files.

To that module we can only pass data. not other than that.

Now, my requirement is to generate a report similar to

top of page 1
*********HEADER*********page:1
Axxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

end of page1
top of page2
page:2
Cxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

yyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzz

end of page 2

*********HEADER*********page:1
Exxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Fxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Where A,B,C,D's belongs to logical group1
EF belong to logical group2.

A group can have 'n' number of rows(no limit for n). Header should appear only once for each group (next group should start from next page starting).

I've taken care of everything except writing in to next page when a new group starts.

How can we achieve this with out using AFTER PAGE?

Thanks in advance.
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: Wed Jul 16, 2008 8:10 pm
Reply with quote

Hello,

Quote:
The problem here is we have a module which takes care of writing in to /reading from files.
I'd suggest you talk with the people who support this module. If it was intended to support report creation, it should support getting to the top of a page - one way or another.

Personally, i'd think there was a difference between reading/writing "records" in a file versus writing a report. . .

Quote:
How can we achieve this with out using AFTER PAGE?
Count lines and write the proper number of blank "records" to position the report at the "top" of the next page. You might also try to embed carriage control characters to force "paper motion", but your generic read/write module may strip them off. . .
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 Write line by line from two files DFSORT/ICETOOL 7
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
Search our Forums:

Back to Top