Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

counting records from a no. of files and put in one o/p file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Thu Oct 15, 2009 5:50 pm    Post subject: counting records from a no. of files and put in one o/p file
Reply with quote

Hi ,

Is there any way in which we can count the number of records in more than one files and then put those counts in one output file?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Oct 15, 2009 9:09 pm    Post subject:
Reply with quote

Please show an example of what you want the output file to look like.

Also, give the RECFM and LRECL of the input files.
Back to top
View user's profile Send private message
vampire

New User


Joined: 12 Oct 2009
Posts: 15
Location: Pune

PostPosted: Fri Oct 16, 2009 9:45 am    Post subject:
Reply with quote

I/P File1:
rec1
rec2
rec3
rec4

I/P File2:
rec1
rec2

O/P File:
Record count file1:4
Record count file2:2

RECFM is FB and LRECL is 25004.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Oct 16, 2009 10:17 am    Post subject:
Reply with quote

Hi,

this is one way of achieving what you are after
Code:
//STEP0001 EXEC PGM=ICETOOL                               
//TOOLMSG  DD SYSOUT=*                                   
//DFSMSG   DD SYSOUT=*                                   
//IN01     DD DSN=INPUT-FILE1,DISP=SHR                   
//IN02     DD DSN=INPUT-FILE2,DISP=SHR                   
//COUNT    DD DSN=OUTPUT-FILE,DISP=(MOD,CATLG,DELETE),   
//            UNIT=SYSDA,SPACE=(TRK,(10,5),RLSE)         
//TOOLIN   DD *                                           
 COPY FROM(IN01) USING(CTL1)                   
 COPY FROM(IN02) USING(CTL2)                   
//CTL1CNTL DD *                                           
  OUTFIL FNAMES=COUNT,                                   
   REMOVECC,NODETAIL,                                     
   TRAILER1=('RECORD COUNT FILE 1:',                       
            COUNT)
/*                                   
//CTL2CNTL DD *                           
  OUTFIL FNAMES=COUNT,                   
   REMOVECC,NODETAIL,                     
   TRAILER1=('RECORD COUNT FILE 2:',       
            COUNT)   
/*               


Gerry
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Oct 16, 2009 8:58 pm    Post subject:
Reply with quote

Here's another way to do it with DFSORT's ICETOOL:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN01     DD DSN=...  input file1
//IN02     DD DSN=...  input file2
...
//OUT    DD DISP=MOD,DSN=...  MOD output file
//TOOLIN DD *
COUNT FROM(IN01) WRITE(OUT) EDCOUNT(U08) -
  TEXT('Record count file1: ')
COUNT FROM(IN02) WRITE(OUT) EDCOUNT(U08) -
  TEXT('Record count file2: ')
...
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us