Page 1 of 1

Syncsort Report geneartion

PostPosted: Sun Sep 13, 2009 11:00 pm
by karthik_sripal
Hi all,

Good day!!

I have Reqmt like this
Input file
100
000
456
099
234


and would like the report in the below format
Total number of records : 5
Total number of records exceeding 100: 3
Total number in the Range 250 to 500 : 1


Could some one explain me how to do this.. I mean how to get the count of records satisfying a predefined condition

Please write back if any further information is needed.
Thanks!!

Re: Syncsort Report geneartion

PostPosted: Mon Sep 14, 2009 1:28 pm
by arcvns
karthik_sripal,

Here's a SyncSort job which does the same.
//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD *                                             
100                                                         
000                                                         
456                                                         
099                                                         
234                                                         
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  INREC IFTHEN=(WHEN=(1,3,ZD,GE,100),                       
        OVERLAY=(81:C'1'),HIT=NEXT),                         
        IFTHEN=(WHEN=(1,3,ZD,GE,250,AND,1,3,ZD,LT,500),     
        OVERLAY=(82:C'1'))                                   
  SORT FIELDS=COPY                                           
  OUTFIL REMOVECC,NODETAIL,                                 
         TRAILER1=('Total number of records : ',             
                    COUNT=(M10,LENGTH=6),/,                 
                   'Total number of records exceeding 100: ',
                    TOT=(81,1,UFF,M10,LENGTH=6),/,           
                   'Total number in the Range 250 to 500 : ',
                    TOT=(82,1,UFF,M10,LENGTH=6))