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

Sections not working as expected


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

New User


Joined: 22 Aug 2020
Posts: 17
Location: United States

PostPosted: Thu Aug 20, 2026 10:29 am
Reply with quote

My input is as follows
Code:

----+----1----+----2----+----3----+----4----+----5----+----6
********************************* Top of Data **************
B0108797. 001.PT 01087970000000000B           01087970010000
B0108797. 001.PT 01087970000000000B           01087970010000
B0108797. 001.PT 01087970000000000B           01087970010000
B0108797. 001.PT 01087970000000000B           01087970010000
B0108797. 001.PT 01087970000000000B                         
B0108797. 001.PT 01087970000000000B                         
B0108797. 001.PT 01087970000000000B                         
B0108797. 001.PT 01087970000000000B                         
B0108797. 001.PT 01087970000000000C           01087970010000
B0108797. 001.PT 01087970000000000C           01087970010000
B0108797. 001.PT 01087970000000000C           01087970010000
B0108797. 001.PT 01087970000000000C           01087970010000
B0108797. 001.PT 01087970000000000C                         
B0108797. 001.PT 01087970000000000C                         
B0108797. 001.PT 01087970000000000C                         
B0108797. 001.PT 01087970000000000C                         
B0373661. 001.PT 03736610000000000C           03736610010000
B0373661. 001.PT 03736610000000000C           03736610010000
B0373661. 001.PT 03736610000000000C           03736610010000
B0373661. 001.PT 03736610000000000C           03736610010000
B0373661. 001.PT 03736610000000000C                         
B0373661. 001.PT 03736610000000000C                         
B0373661. 001.PT 03736610000000000C                         
B0373661. 001.PT 03736610000000000C                         
B0390342. 001.DLR03903420000000000B                         
B0390342. 001.DLR03903420000000000B                         
B0390342. 001.DLR03903420000000000B                         
B0390342. 001.DLR03903420000000000B                         
B0390342. 005.DLR03903420000000000B           03903420050000
B0390342. 005.DLR03903420000000000B           03903420050000
B0390342. 005.DLR03903420000000000B           03903420050000
B0390342. 005.DLR03903420000000000B           03903420050000
B0390342. 006.DLR03903420000000000B           03903420060000


The sort card is:

Code:

SORT FIELDS=(2,7,CH,A,18,18,CH,A)               
OUTFIL FNAMES=OUTDD1,                           
     SECTIONS=(2,7,18,18),                     
     HEADER2=(1:C'BU = ',02,07,/,               
              1:C'662 RULE = ',18,18,           
              35:C'TYPE = ',15,3,/,             
              1:C'CSR LIMIT= ',130,16,         
              35:C'BO1 LIMIT= ',151,16,/,       
              1:C'BO2 LIMIT= ',172,16,         
              35:C'SUP LIMIT= ',193,16,/,       
              1:C'RWD BU',                     
              10:C'PGM',                       
              15:C'TYPE',                       
              22:C'ACCT',                       
              45:C'HIST',                       
              50:C'RDM',/,                     
              1:C'-------',                     
              10:C'---',                       
              15:C'-',                         
            22:C'--------------------',                         
            45:C'-',                                             
            50:C'-',/),                                         
 OUTREC=(1:02,7,                                 
         10:11,3,                                 
         15:117,1,                         
         22:61,16,                                                 
         45:118,1,CHANGE=(1,C'H',C'Y'),NOMATCH=(C' '),           
         50:122,1,CHANGE=(1,C'R',C'Y'),NOMATCH=(C' '),           
       132:1X)                                                 


The output is NOT breaking at each change on positions 2,7
Code:

BU = 0108797                                                 
662 RULE = 01087970000000000B     TYPE = PT                   
CSR LIMIT= 00000002500.0000       BO1 LIMIT= 00000100000.0000
BO2 LIMIT= 00001000000.0000       SUP LIMIT= 00000005000.0000
RWD BU   PGM  TYPE   ACCT                   HIST RDM         
-------  ---  -      --------------------   -    -           
                                                             
0108797  001  B      ########                                 
0108797  001  B      ########                                 
0108797  001  B      ########                                 
0108797  001  B      ########                                 
0108797  001         ########               Y                 
0108797  001         ########               Y                 
0108797  001         ########               Y                 
0108797  001         ########               Y                 
0108797  001  C      ########                                 
0108797  001  C      ########                                 
0108797  001  C      ########                                 
0373661  001  C      ########                    Y   
0373661  001  C      ########                    Y   
0373661  001  C      ########                    Y   
0373661  001  C      ########                    Y   
0373661  001         ########               Y       
0373661  001         ########               Y       
0373661  001         ########               Y       
0373661  001         ########               Y       
0390342  001         ########               Y       
0390342  001         ########               Y       
0390342  001         ########               Y       
0390342  001         ########               Y       
0390342  005  B      ########                    Y   
0390342  005  B      ########                       
0390342  005  B      ########                    Y   
0390342  005  B      ########                    Y   
0390342  006  B      ########                       
0390342  006  B      ########                       
0390342  006  B      ########                       
0390342  001  C      ########                    Y           
0390342  001  C      ########                    Y           
0390342  001  C      ########                    Y           
0390342  001         ########               Y                 
0390342  001         ########               Y                 
0390342  001         ########               Y                 
0390342  001         ########               Y                 
0390342  002  C      ########                                 
BU = 0390342                                                 
662 RULE = 03903420000000000C     TYPE = DLR                 
CSR LIMIT= 00000000025.0000       BO1 LIMIT= 00000001000.0000
BO2 LIMIT= 00000010000.0000       SUP LIMIT= 00000000050.0000
RWD BU   PGM  TYPE   ACCT                   HIST RDM         
-------  ---  -      --------------------   -    -           
                                                             
0390342  002  C      ########                                 
0390342  002  C      ########                    Y           
0390342  002  C      ########                    Y           
0390342  005  C      ########                    Y           



I expect a break on
B0373661. 001.PT 03736610000000000C and then on
B0390342. 001.DLR03903420000000000B .

Job log

Code:

IDENTIFIER FROM CALLING PROGRAM IS 0001                                         
RECORD TYPE IS F - DATA STARTS IN POSITION 1                                   
C5-NONE   C6-NONE   C7-NONE   C8-H59846 E4-NONE   C9-NONE   E5-H51220 E6-NONE   
BLOCKSET     SORT  TECHNIQUE SELECTED                                           
VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE   
- CONTROL STATEMENTS FOR 5655-ZOS, Z/OS DFSORT 3.2   - 23:39 ON WED AUG 19, 2026
   SORT FIELDS=(2,7,CH,A,18,18,CH,A)                                           
   OUTFIL FNAMES=OUTDD1,                                                       
        SECTIONS=(2,7,18,18),REMOVECC,                                         
        HEADER2=(1:C'BU = ',02,07,/,                                           
                 1:C'662 RULE = ',18,18,                                       
                 35:C'TYPE = ',15,3,/,                                         
                 1:C'CSR LIMIT= ',130,16,                                       
                 35:C'BO1 LIMIT= ',151,16,/,                                   
                 1:C'BO2 LIMIT= ',172,16,                                       
                 35:C'SUP LIMIT= ',193,16,/,                                   
                 1:C'RWD BU',                                                   
                 10:C'PGM',                                                     
                 15:C'TYPE',                                               
                 22:C'ACCT',                                               
                 45:C'HIST',                                               
                 50:C'RDM',/,                                             
                 1:C'-------',                                             
                 10:C'---',                                               
                 15:C'-',                                                 
                 22:C'--------------------',                               
                 45:C'-',                                                 
                 50:C'-',/),                                               
      OUTREC=(1:02,7,                        -- RWRD BU                   
              10:11,3,                        -- CG7309-CPN               
              15:117,1,                       -- TIER/IND TEMP SPACE       
              22:61,16,           -- ACCT                                 
              45:118,1,CHANGE=(1,C'H',C'Y'),NOMATCH=(C' '),               
              50:122,1,CHANGE=(1,C'R',C'Y'),NOMATCH=(C' '),               
             132:1X)                                                       
END OF STATEMENTS FROM SRT1CNTL - PARAMETER LIST STATEMENTS FOLLOW         
DC 55744 TC 0 CS DSVVV KSZ 29 VSZ 29                                       
FSZ=268 RC  IGN=0 E  AVG=212 0  WSP=74 C  DYN=0 0                         
STORAGE USED FOR OUTFIL : BELOW 16M = 27648, ABOVE 16M = 2115584           
OUTDD1   : BSAM USED, LRECL = 132, BLKSIZE = 27852, TYPE = FB   (SDB)     
DE-H66588 D5-NONE   D9-H59846 CB-NONE   E8-NONE                           
IN MAIN STORAGE SORT                                                       
INSERT 0, DELETE 0                                                         
RECORDS - IN: 221, OUT: 221                                               
OUTDD1   : DELETED = 0, REPORT = 35, DATA = 221                           
OUTDD1   : TOTAL IN = 221, TOTAL OUT = 256                                 
NUMBER OF BYTES SORTED: 45968                                             
RECORDS SORTED - PROCESSED: 221, EXPECTED: 268                             
TOTAL WORK DATA SET TRACKS ALLOCATED: 0 , TRACKS USED: 0                   
MEMORY OBJECT USED AS MAIN STORAGE = 0M BYTES                             
MEMORY OBJECT USED AS WORK STORAGE = 0M BYTES                             
MEMORY OBJECT USED IN ZSORT PATH = 0M BYTES                               
HIPERSPACE STORAGE USED = 0K BYTES                                         
DATA SPACE STORAGE USED = 0K BYTES                                         
ZSORT ACCELERATOR PATH NOT USED    RSN=199                                 
END OF DFSORT   


Any ideas would be great.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2290
Location: USA

PostPosted: Thu Aug 20, 2026 12:15 pm
Reply with quote

Your parameter SECTIONS in the presented format is dummy: there is no action defined at each section boundary detected.

You define only HEADER2= (and optionally TRAILER2=) parameters; they define actions performed at every page break only.

In order to define any action on section boundaries, you must use HEADER3= (and TRAILER3=) parameters as subparameters of SECTIONS:

Code:
 SECTIONS=(<key positions>,HEADER3=(...)[,TRAILER3=(...)],
          [<more key positions>,HEADER3=(...)[,TRAILER3=(...)])
Back to top
View user's profile Send private message
MichelleSpeer

New User


Joined: 22 Aug 2020
Posts: 17
Location: United States

PostPosted: Thu Aug 20, 2026 8:27 pm
Reply with quote

I knew it had to be something simple and stupid. I actually thought I had updated that and still didn't work. The reason HEADER3 didn't work when I tried was I had
Code:
 SECTIONS=(2,7,18,18)
when the correct syntax is
Code:
 SECTIONS=(2,7,18,18
Header3=(blah ))


The sections logic closes at the ).

Thanks Very much.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2290
Location: USA

PostPosted: Thu Aug 20, 2026 8:40 pm
Reply with quote

MichelleSpeer wrote:
I knew it had to be something simple and stupid. I actually thought I had updated that and still didn't work. The reason HEADER3 didn't work when I tried was I had
Code:
 SECTIONS=(2,7,18,18)
when the correct syntax is
Code:
 SECTIONS=(2,7,18,18
Header3=(blah ))


The sections logic closes at the ).

Thanks Very much.


Actually, the CORRECT syntax must be (with the comma for continuation):
Code:
 SECTIONS=(2,7,18,18,
         HEADER3=(blah...))
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 CICS UCTRAN=NO not working, need syst... CICS 3
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts getting subtotals for multiple sections SYNCSORT 4
No new posts ICETOOL with JOINKEY for Big record l... DFSORT/ICETOOL 12
Search our Forums:


Back to Top