Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

SYNCSORT :: RE: Addition of two records on 2 fields

$
0
0
Author: magesh23586
Subject: Reply to: Addition of two records on 2 fields
Posted: Tue Oct 03, 2017 8:22 pm (GMT 5.5)

Assuming the record is already sorted(1,9)

Code:

//STEP01 EXEC PGM=SORT                                     
//SORTIN DD *                                               
100001 10 2 1000                                           
100001 10 2 1000                                           
100001 20 4 3000                                           
100001 20 2 1000                                           
100002 20 2 5000                                           
100002 20 2 1000                                           
//SORTOUT DD SYSOUT=*                                       
//SYSOUT DD SYSOUT=*                                       
//SYSIN DD *                                               
//SYSIN DD *                                       
  OPTION COPY   
                                   
  OUTFIL NODETAIL,REMOVECC, 
                     
  SECTIONS=(1,09,                                 
            TRAILER3=(1,10,                       
                      TOT=(11,1,ZD,ZD,LENGTH=1),X,
                      TOT=(13,4,ZD,ZD,LENGTH=4)))                             

_________________
Regards,
Magesh


Viewing all articles
Browse latest Browse all 8500

Trending Articles