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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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