MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

can we do count for each file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ldushkin
Beginner


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Fri Jun 09, 2006 8:17 am    Post subject: can we do count for each file Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Fri Jun 09, 2006 8:27 am    Post subject: Reply with quote

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
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ldushkin
Beginner


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Fri Jun 09, 2006 9:02 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Fri Jun 09, 2006 9:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
ldushkin
Beginner


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Fri Jun 09, 2006 10:10 am    Post subject: Reply with quote

Thanks for all that you do!!!
Back to top
View user's profile Send private message
Kathi
Beginner


Joined: 14 May 2003
Posts: 25
Topics: 0
Location: Mission Viejo, California

PostPosted: Fri Jun 09, 2006 8:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group