View previous topic :: View next topic
|
Author |
Message |
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
rarvins
New User
Joined: 24 Jan 2007 Posts: 59 Location: Texas
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
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 |
|
|
|