View previous topic :: View next topic
Author
Message
rtalapaneni New User Joined: 20 Mar 2005Posts: 13 Location: Bangalore
How can U find out number of records in VSAM file ...
Back to top
priyesh.agrawal Senior Member Joined: 28 Mar 2005Posts: 1448 Location: Chicago, IL
Try this simple code.....
Code:
//S010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=USERID.RECORDS.INPUT.VSAM,DISP=SHR
//TOOLIN DD *
COUNT FROM(IN)
/*
Regards,
Priyesh.
Back to top
spanda New User Joined: 31 Aug 2005Posts: 48 Location: U.K.
I believe this was discussed previously.
If you have File-Aid, then you may find out the number of records without submitting a job. You can do this by using option 3.5 for the VSAM dataset, without providing any options at the command line (to display dataset info). The number of records on the VSAM file are displayed as Prime Records on the second page. (Hit ENTER to access additional pages of dataset info).
Hope this helps,
Panda.
Back to top
Ravi gaur New User Joined: 12 Jul 2005Posts: 38
Plz check again for a VSAM dataset.
//S010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=USERID.RECORDS.INPUT.VSAM
//TOOLIN DD *
COUNT FROM(IN)
/*
is above code is correct or not..
as when i m running giving error
Back to top
priyesh.agrawal Senior Member Joined: 28 Mar 2005Posts: 1448 Location: Chicago, IL
Thanks for pointing Ravi....
Missing DISP parameter caused that Error....
I 've got the code above corrected too.....
Regards,
Priyesh.
Back to top
rtalapaneni New User Joined: 20 Mar 2005Posts: 13 Location: Bangalore
Thanks for all ..
Can I use this code by using SORT pgm ...
Let me know the difference between SORT,DFSORT,SYNCSORT,ICETOOL ....
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Quote:
Can I use this code by using SORT pgm ...
COUNT is a DFSORT/ICETOOL operator. You can also create one record with the count using DFSORT directly with a DFSORT job like this:
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,NODETAIL,TRAILER1=(COUNT=(M11,LENGTH=8))
/*
Quote:
Let me know the difference between SORT,DFSORT,SYNCSORT,ICETOOL ....
SORT is the generic name for various sort products, two of which are DFSORT and Syncsort (the other is CA-SORT). DFSORT is an IBM product and an optional feature of z/OS. Syncsort is Syncsort, Inc's sort product. ICETOOL is a free "utility" shipped with DFSORT (since 1991).
For much more information on DFSORT, visit the DFSORT website at:
www.ibm.com/storage/dfsort/
and access the DFSORT books online from:
Use [URL] BBCode for External Links
If you or anyone else on this board would like some documents prepared by the DFSORT Team that describe what we see as the advantages of DFSORT over Syncsort, as well as considersations for migrating from Syncsort to DFSORT, send me an e-mail offline (yaeger@us.ibm.com). Please put "DFSORT" somewere in your Subject line to catch my attention.
Back to top
sril.krishy Active User Joined: 30 Jul 2005Posts: 183 Location: hyderabad
Quote:
Let me know the difference between SORT,DFSORT,SYNCSORT,ICETOOL
Please search the forum with the author name as Frank ,,u can find lot of details.
Thank you
Back to top
Deepa.m New User Joined: 28 Apr 2005Posts: 99
FRANK,
To add to this ...can we write the counts for a set of files given as input to a output file one by one along wiht the file name.
How to capture the file name for which we are getting the count and writing to a output file
ex.
input file
filename1
filename2
.
.
filename10
output file
filename1 10
filename2 20
currently we are doing it in rexx..is there any other simple way.
thanks,
Deepa
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
You could do this by having DFSORT use the file names to generate a DFSORT job to submit to the internal reader. Let me know if you want me to show you how to do that.
Back to top
Deepa.m New User Joined: 28 Apr 2005Posts: 99
yes please Frank..let me know how it can be done.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Deepa,
Here's a DFSORT job that generates and submits an ICETOOL job to the internal reader to do what you asked for.
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file with filenames in 1-44
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS)
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1,44,45:SEQNUM,3,ZD)
OUTFIL FNAMES=T1,
OUTREC=(C' COPY FROM(IN',45,3,C') TO(OUT',45,3,C')',
C' USING(C',45,3,C')',80:X)
OUTFIL FNAMES=T2,
OUTREC=(C'//IN',45,3,C' DD DISP=SHR,DSN=',1,44,80:X,/,
C'//OUT',45,3,C' DD SYSOUT=*',/,
C'//C',45,3,C'CNTL DD *',/,
C' OUTFIL FNAMES=OUT',45,3,C',REMOVECC,NODETAIL,',/,
C' TRAILER1=(C''',1,44,C''',',/,
C' 2X,COUNT=(M11,LENGTH=5))')
//S2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DATA,DLM=QQ
//CTS JOB ... <--- jobcard
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
QQ
// DD DSN=&&T1,DISP=(OLD,PASS)
// DD DSN=&&T2,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=(A,INTRDR)
//SYSIN DD *
OPTION COPY
/*
The submitted job looks like this:
Code:
//CTS JOB ... <--- jobcard
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN001) TO(OUT001) USING(C001)
COPY FROM(IN002) TO(OUT002) USING(C002)
...
//IN001 DD DISP=SHR,DSN=dsname1
//OUT001 DD SYSOUT=*
//C001CNTL DD *
OUTFIL FNAMES=OUT001,REMOVECC,NODETAIL,
TRAILER1=(C'dsname1 ',
2X,COUNT=(M11,LENGTH=5))
//IN002 DD DISP=SHR,DSN=dsname2
//OUT002 DD SYSOUT=*
//C002CNTL DD *
OUTFIL FNAMES=OUT002,REMOVECC,NODETAIL,
TRAILER1=(C'dsname2 ',
2X,COUNT=(M11,LENGTH=5))
...
Each OUTnnn output file displays the 44 character input data set name and a 5 digit count of its records.
Back to top
Please enable JavaScript!