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

How to generate page numbers for report using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dssenthil

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Thu Dec 23, 2010 8:48 pm
Reply with quote

Hi,

I have a requirement to generate a report using DFSORT.
Input file format : FB
LRECL : 575

Now i was able to generate the report using the sort card :

Code:

//CTL1CNTL DD *
  SORT FIELDS=(1,4,CH,A)
  OUTFIL FNAMES=RPT1,
    HEADER1=(10:'RUN DATE : ',21:DATE,3X,
      36:'DAILY BREAKAGE REPORT',3X,60:'PAGE : ',/,
      1:'SEQID',6X,12:'DATE',13X,29:'AMOUNT',/,
      1:5'-',2X,9:10'-',4X,24:18'-'),
    BUILD=(1:1,4,3X,9:5,10,3X,25:21,17,,90:X)
/*


Now, i need to generate page numbers and headers for every 55 line breaks. (i.e) If the report lines exceeds 55 lines, i need to print the header as well as increment the page number.

Your help in this is much appreciated.
Thanks in advance.
Senthil.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 24, 2010 5:55 am
Reply with quote

Use HEADER2 (the page header) instead of HEADER1 (the report header) and use LINES=55 for 55 lines per page:

Code:

   OUTFIL FNAMES=RPT1,LINES=55,
     HEADER2=(...


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080
Back to top
View user's profile Send private message
dssenthil

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Mon Dec 27, 2010 2:32 pm
Reply with quote

Thanks for your help Frank... Now i was able to generate the header for every 55 lines in a report. But the Page number in the headers appears blank.

Please find the screenshots in attachment and advise.

Please advise how to generate page number as well.

Thanks,
Senthil.
Back to top
View user's profile Send private message
balakrishna reddy.bala

New User


Joined: 15 Sep 2010
Posts: 17
Location: india

PostPosted: Mon Dec 27, 2010 4:24 pm
Reply with quote

Hi Senthil,

It seems you didn't go thru the doc link given by Frank.

Try this

Code:

60:'PAGE  : ',PAGE,/,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Dec 27, 2010 9:47 pm
Reply with quote

D.S.Senthil,

Dick is right. You must use PAGE, PAGE=(edit) or PAGE=(to) to actually get the page number. Which one you would use depends on what you want the page number to look like.
Back to top
View user's profile Send private message
dssenthil

New User


Joined: 14 Aug 2008
Posts: 7
Location: Chennai

PostPosted: Tue Dec 28, 2010 11:06 am
Reply with quote

I tried with PAGE command and it's working fine. Thanks for your help Frank.

Regards,
Senthil.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top