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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: To get count of records in multiple VSAM file in a flat file
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: 1439
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 4:11 pm    Post subject:
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    Post subject: Re: To get count of records in multiple VSAM file in a flat
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    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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