Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us