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

OUTFIL Page Reset


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

New User


Joined: 30 Sep 2011
Posts: 3
Location: United States

PostPosted: Tue Dec 13, 2011 12:04 pm
Reply with quote

Hi,
I am using DFSORT outfil to create reports. The Build has restart option to reset the line count to 1 or any start value. Similarly,
Is the outfil SECTIONS has any option to reset page number to 1 when the control value is changed ?
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: Tue Dec 13, 2011 11:02 pm
Reply with quote

I don't understand what you're trying to do.

If you want PAGE 1 for every SECTION, then you can just use a constant of 1 rather than the PAGE operand. For example:

Code:

   OUTFIL SECTIONS=(1,10,
       HEADER3=('PAGE 1'))


If that's not what you want, then you need to do a better job of explaining what you do want with examples of input and expected output, RECFM and LRECL, etc.
Back to top
View user's profile Send private message
Selvaganesan Muthusamy

New User


Joined: 30 Sep 2011
Posts: 3
Location: United States

PostPosted: Wed Dec 14, 2011 2:05 am
Reply with quote

Hello Frank

Thank you for the response.

Name DEPT Age Page : 1
A AAA 30
A1 AAA 20
...
...
Name DEPT Age Page : 2
B AAA 35
B1 AAA 33

...
...
Name DEPT Age Page : 3
C AAA 40
...
...
Name DEPT Age Page : 1 <------------ Page number resets to 1 here
CC1 BBB 40
CC2 BBB 50
...
...

In the above report the page number resets to 1 when department changes. Is this possible using OUTFIL SECTIONS? That is we can apply page break when control value changes. My doubt whether we can reset the page number to beginning in sections.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Dec 14, 2011 3:15 am
Reply with quote

Selvaganesan Muthusamy,

You cannot restart the page number from 1 once again with dept change. However you can mimic that functionality with seqnum.

The default number of lines per page is 60. So if you want to have ascending page numbers for the same dept and reset to 1 when the dept changes , use the following DFSORT JCL

I assumed that your input is FB RECFM and LRECL=80 and the dept is in position 5 for 3 bytes


Code:

//STEP0100 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD DSN=Your input FB 80 byte file,DISP=SHR
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  OUTREC OVERLAY=(81:SEQNUM,8,ZD,RESTART=(5,3),START=59,     
                  81:81,8,ZD,DIV,+59,M10,LENGTH=8)
         
  OUTFIL REMOVECC,BUILD=(1,80),
  SECTIONS=(5,3,81,8,HEADER3=('NAME DEPT AGE PAGE : ',81,8))
//*
Back to top
View user's profile Send private message
Selvaganesan Muthusamy

New User


Joined: 30 Sep 2011
Posts: 3
Location: United States

PostPosted: Thu Dec 15, 2011 1:13 am
Reply with quote

Skolusu,
Thanks so much! This is fine.


Selva
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts reset/clear ALL application profile v... TSO/ISPF 3
Search our Forums:


Back to Top