Thanks, Dave, Brian, Mark and Frank! I was looking for what Frank finally suggested. I want this report to be generated on a system where I may not be able to use utilities from CBT, hence, I was looking for a more standard approach based on standard IBM utilities.
Thanks once again. Varun Manocha wrote on 06/07/2011 08:58:57 AM: > I have created a report from DCOLLECT data with dataset_name volume_serial > creation_date space (in kb) and various other fields. > > I am looking for a way to scan this report and summarise the space used by > each HLQ. Could someone help me out with this requirement please. > > The input record layout is something like : > > SYS1.VVDS.VPROD46 PROD46 2011123 10 > ABC.DATASET.SOMETHING XYZA41 2008101 80 > XYZ.SOMETHING.ELSE YXZA44 2007114 90 > ABCXYZ.SOMETHING.ELSE ABC123 2006762 > 100 > ABC.SOME.OTHER.DATASET AAA111 2005092 20 > SYS1.VTOCIX.PROD46 ZZZ123 > 2005123 20 > > I would like the output to be something like this: > > SYS1 30 > ABC 100 > XYZ 90 > ABCXYZ 100 You can use a DFSORT job like the following to do what you asked for. I couldn't tell the position, length and format of your fields or the RECFM of your input data set. I assumed it's RECFM=FB and just guessed at the positions - adjust as necessary. //S1 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * SYS1.VVDS.VPROD46 PROD46 2011123 10 ABC.DATASET.SOMETHING XYZA41 2008101 80 XYZ.SOMETHING.ELSE YXZA44 2007114 90 ABCXYZ.SOMETHING.ELSE ABC123 2006762 100 ABC.SOME.OTHER.DATASET AAA111 2005092 20 SYS1.VTOCIX.PROD46 ZZZ123 2005123 20 //SORTOUT DD SYSOUT=* //SYSIN DD * INREC PARSE=(%01=(ENDBEFR=C'.',FIXLEN=8)), BUILD=(%01,11:61,8) SORT FIELDS=(1,8,CH,A) OUTFIL REMOVECC,NODETAIL, SECTIONS=(1,8, TRAILER3=(1,8,11:TOT=(11,8,ZD,M10,LENGTH=8))) /* SORTOUT would have: ABC 100 ABCXYZ 100 SYS1 30 XYZ 90 If you need more specific help, feel free to e-mail me directly with the details of your input file (yae...@us.ibm.com). Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html