can we do count for each file
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Utilities

#1: can we do count for each file Author: ldushkin PostPosted: Fri Jun 09, 2006 8:17 am
    —
Hi,

I concatenate files to get the total records
Code:

//SORT005  EXEC PGM=SORT                                             
//SYSPRINT DD  SYSOUT=*                                             
//SYSOUT   DD  SYSOUT=*                                             
//SORTIN   DD  DISP=SHR,DSN=P#MMA.IN.CPY.J28T.MARXTR.D060609.T0356457
//         DD  DISP=SHR,DSN=P#MMA.IN.CPY.A1B4.MARXTR.D060609.T0846322
//SORTOUT  DD  DSN=D2HG.JSORTDUP.TEST1,                             
//             DISP=(NEW,CATLG,DELETE),                             
//             SPACE=(CYL,(40,10),RLSE)                             
//SORTWK01 DD  UNIT=SYSDA,SPACE=(CYL,(50,10),RLSE)                   
//SORTWK02 DD  UNIT=SYSDA,SPACE=(CYL,(50,10),RLSE)                   
//SORTWK03 DD  UNIT=SYSDA,SPACE=(CYL,(50,10),RLSE)                   
//SYSIN    DD  *                                                     
 SORT FIELDS=(47,5,CH,A)                                             
 OUTFIL REMOVECC,NODETAIL,                                           
  TRAILER1=('TOTAL RECORDS: ',COUNT)                                 

My output is

TOTAL RECORDS: 80

I need like this

TOTAL RECORDS: 2
TOTAL RECORDS: 78

GRANT TOTAL : 80

Thank you very much for your help
Also if is it poseble do instead of concatenate files put ASTERISK in the file

DSN=P#MMA.IN.CPY.*.MARXTR.D060609.T*

Thank you

#2:  Author: kolusuLocation: San Jose PostPosted: Fri Jun 09, 2006 8:27 am
    —
ldushkin,

If you can hardcode all the file names then the JCL posted in this topic will give you the desired results.

http://www.mvsforums.com/helpboards/viewtopic.php?p=10745#10745

Hope this helps...

Cheers

Kolusu

#3:  Author: ldushkin PostPosted: Fri Jun 09, 2006 9:02 am
    —
Thank you Kolusu,
This JCL is work, what should i do to get Grant Total

//TOOLIN DD *
COPY FROM(IN001) USING(C001)
COPY FROM(IN002) USING(C002)
//C001CNTL DD *
OUTREC FIELDS=(1,80)
OUTFIL FNAMES=OUT,NODETAIL,REMOVECC,
TRAILER1=('TOTAL NO: OF RECORDS IN THE FILE 001 :',COUNT,80:X)
//C002CNTL DD *
OUTREC FIELDS=(1,80)
OUTFIL FNAMES=OUT,NODETAIL,REMOVECC,
TRAILER1=('TOTAL NO: OF RECORDS IN THE FILE 002 :',COUNT,80:X)

#4:  Author: kolusuLocation: San Jose PostPosted: Fri Jun 09, 2006 9:46 am
    —
ldushkin,

Try this JCL

Code:

//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG   DD SYSOUT=*                                     
//DFSMSG    DD SYSOUT=*                                     
//IN001     DD DSN=input file1,               
//             DISP=SHR                                     
//IN002     DD DSN=input file2,                     
//             DISP=SHR                                     
//OUT       DD DSN=&T1,                                     
//             DISP=(MOD,PASS,DELETE),                       
//             UNIT=SYSDA,                                   
//             SPACE=(CYL,(1,1),RLSE)                       
//CNT       DD SYSOUT=*                                     
//TOOLIN    DD *                                             
  COPY FROM(IN001) USING(CTL1)                               
  COPY FROM(IN002) USING(CTL1)                               
  COPY FROM(OUT) USING(CTL2)                                 
//CTL1CNTL  DD   *                                           
  OUTREC FIELDS=(1,80)                                       
  OUTFIL FNAMES=OUT,NODETAIL,REMOVECC,                       
  TRAILER1=('TOTAL NO: OF RECORDS IN THE FILE:',COUNT,80:X) 
//CTL2CNTL  DD   *                                           
  OUTREC FIELDS=(1,80)                                       
  OUTFIL FNAMES=CNT,REMOVECC,                               
  TRAILER1=('GRAND TOTAL COUNT OF ALL FILES  :',             
            TOT=(34,8,ZD,EDIT=(IIIIIIIT)),80:X)             
/*                           


Look at the counts in the CNT DDname

Hope this helps...

Cheers

Kolusu

#5:  Author: ldushkin PostPosted: Fri Jun 09, 2006 10:10 am
    —
Thanks for all that you do!!!

#6:  Author: KathiLocation: Mission Viejo, California PostPosted: Fri Jun 09, 2006 8:53 pm
    —
VISION:Results will also give you total records for each file.

Code:

FILE1IN
FILE2IN
FILE3IN


Code a statement like one of the above for each file in and use the corresponding JCL DD statements and you will have the file statistics at the end of the job.



MVSFORUMS.com -> Utilities


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group