IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To get count of records in multiple VSAM file in a flat file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rarvins

New User


Joined: 24 Jan 2007
Posts: 59
Location: Texas

PostPosted: Thu Aug 09, 2007 3:35 pm
Reply with quote

Hi,

My requirement is something like this:

I have 9 VSAM files:
USERID.VSAM1
USERID.VSAM2
USERID.VSAM3
USERID.VSAM4
USERID.VSAM5
USERID.VSAM6
USERID.VSAM7
USERID.VSAM8
USERID.VSAM9

I need to find the count of records in each of these VSAM files and write into into a flat file like this:
count1
count2
count3
count4
count5
count6
count7
count8
count9

I have used fileaid tally, ICETOOL and repro which give the number of records in the sysout or toolmsg but am not able to find out how to bring the count of so many files in an orderly format like this in an output file

Can somebody please help me with this?

Thanks in advance,
Regards,
Arvind
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 4:11 pm
Reply with quote

Arvind,
Quote:
I have used fileaid tally, ICETOOL and repro which give the number of records in the sysout or toolmsg but am not able to find out how to bring the count of so many files in an orderly format like this in an output file


If you had used DFSORT/ICETOOL COUNT option, replace sysout=* to dataset. For JCL, search in the DFSORT forum.
Back to top
View user's profile Send private message
rarvins

New User


Joined: 24 Jan 2007
Posts: 59
Location: Texas

PostPosted: Thu Aug 09, 2007 7:02 pm
Reply with quote

Yes I replaced the dd * to a dataset name but I will be getting all the system messages apart from the count.More over I need the count of records in 9 files to be written one after the other in an output file. How to handle 9 files ? How to get the count one after the other in sequential lines in an output file? This is where I am stuck

Regards,
Arvind
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Aug 09, 2007 7:06 pm
Reply with quote

rarvins
Use this Solution where you can modify this depending on the number of i/ps you have and note that the o/p file has DISP=MOD, so that the COUNTS' get appended
Code:
//*******************************************************               
//STEP1    EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG    DD SYSOUT=*                                                 
//IN1      DD DSN=input file1,DISP=SHR                                 
//IN2      DD DSN=input file2,DISP=SHR                                 
//IN3      DD DSN=input file3,DISP=SHR                                 
//IN4      DD DSN=input file4,DISP=SHR                                 
//OUT      DD DSN=output file,DISP=MOD                                 
//TOOLIN   DD *                                                         
COPY FROM(IN1) USING(CP01)                                             
COPY FROM(IN2) USING(CP01)                                             
COPY FROM(IN3) USING(CP01)                                             
COPY FROM(IN4) USING(CP01)                                             
/*                                                                     
//CP01CNTL DD *                                                         
           OPTION COPY                                                 
           OUTFIL FNAMES=OUT,NODETAIL,REMOVECC,                         
           TRAILER1=(COUNT=(M11,LENGTH=8))                             
/*                                                                     

You can add IN5, IN6...IN9 and correspondingly increase the COPY statements.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
Search our Forums:

Back to Top