Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
OUTFIL Page Reset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: OUTFIL Page Reset
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 Moderator


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

PostPosted: Tue Dec 13, 2011 11:02 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: OUTFIL Page Reset
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Delete record or Reset RC code using ... mpawan Compuware & Other Tools 4 Tue Jul 26, 2016 3:52 pm
No new posts ALTER of an IDMS AREA with NEW/OLD pa... Awanti IDMS/ADSO 2 Mon Mar 14, 2016 10:01 pm
No new posts OUTREC on OUTFIL error rocky_balboa DFSORT/ICETOOL 4 Thu Aug 27, 2015 10:26 am
No new posts Batch reset browse tvinodkumar7 COBOL Programming 8 Wed Jun 24, 2015 5:51 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us