Display page no. on text file using cobol



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Display page no. on text file using cobol

Postby radha.krishna » Wed Feb 11, 2009 7:24 pm

Hi,

I use cobol to generate my output on .txt file could some one help me to
generate page Numbers for the text file

Ex :

IF my out put is of 10 pages then i need to have page no. as 1 on fisrst and so on.

Pleased if some one provide the code.

Thanks,
Radha
radha.krishna
 
Posts: 9
Joined: Thu Nov 20, 2008 7:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display page no. on text file using cobol

Postby dick scherrer » Thu Feb 12, 2009 2:00 am

Hello,

You need to define a linecounter and a pagecounter in working-storage. For the first line written and every n lines written, you need to write the "page heading with the page#, increment the pagecounter, and zero the linecounter. You would increment the linecounter each time you write a line.

Pleased if some one provide the code.
We will help you work on your code, but will not do the work for you. If someone (other than you) posts a whole solution, it will be deleted.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Display page no. on text file using cobol

Postby radha.krishna » Thu Feb 12, 2009 3:24 pm

thanks
radha.krishna
 
Posts: 9
Joined: Thu Nov 20, 2008 7:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Display page no. on text file using cobol

Postby dick scherrer » Fri Feb 13, 2009 1:05 am

You're welcome :)

If there are questions/problems while you are coding/debugging, post them here. Someone will be able to clarify.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post