MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
ldushkin Beginner Joined: 05 Apr 2006 Posts: 56 Topics: 20
Posted: Fri Jun 09, 2006 8:17 am Post subject: can we do count for each file
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
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Back to top
ldushkin Beginner Joined: 05 Apr 2006 Posts: 56 Topics: 20
Posted: Fri Jun 09, 2006 9:02 am Post subject:
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)
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Fri Jun 09, 2006 9:46 am Post subject:
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 _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu
Back to top
ldushkin Beginner Joined: 05 Apr 2006 Posts: 56 Topics: 20
Posted: Fri Jun 09, 2006 10:10 am Post subject:
Thanks for all that you do!!!
Back to top
Kathi Beginner Joined: 14 May 2003 Posts: 25 Topics: 0 Location: Mission Viejo, California
Posted: Fri Jun 09, 2006 8:53 pm Post subject:
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.
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum