View previous topic :: View next topic
Author
Message
TizMe New User Joined: 05 Jan 2006Posts: 72
I want to create a summary report by hi level qualifier.
My input file is created from the 'HSEND LIST DATASETNAME MCDS' command.
This would be easy if all the HLQs were the same length, 8. I could do it like this:
Code:
* SUM BY THE HLQ
SORT FIELDS=(2,8,CH,A)
OMIT COND=((2,1,CH,EQ,C' '),OR,
(2,1,CH,EQ,C'-'),OR,
(2,12,CH,EQ,C'DATASET NAME'))
* CREATE SUMMARY REPORT
OUTFIL FNAMES=REPTOUT,
NODETAIL,
HEADER2=(1:PAGE,12:DATE,24:'BREAKDOWN BY HLQ',/,
1:1X,/,
1:'HLQ',14:'# DATASETS',34:'TRACK ALLOC',/,
1:'---------',14:'----------',34:'-----------'),
SECTIONS=(2,8,
TRAILER3=(2,8,16:COUNT,30:TOT=(75,7,ZD,M10)))
How can I make this work though when the length of my HLQs can vary between 1 and 8 characters?
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Quote:
My input file is created from the 'HSEND LIST DATASETNAME MCDS' command.
I don't know what such a file looks like.
Please show an example of the records in your input file and what you expect for output. Also, what is the RECFM and LRECL of the input file?
Back to top
TizMe New User Joined: 05 Jan 2006Posts: 72
Sorry Frank,
Code:
- DFSMSHSM CONTROL DATASET - MIGRATED DATASET-- LISTING ----- AT 10:00:07 ON 06/
DATASET NAME MIGRATED LAST REF MIGRATED TRKS
ON VOLUME DATE DATE ALLOC
aaa.xxxxxxx.zzzzz MIG001 99/10/31 99/11/14 0000001
bbbbbbb.xxxxxx.zzzzzz MIG002 97/11/07 97/11/20 0000225
cccc.xxxxxx.yyyyyy.zzzz MIG003 01/09/12 01/09/12 0000015
Here's an example of what the report looks like.
It is RECFM=FBA, LRECL=133
Dataset name starts in Col 2, but I only want the hi-level-qualifier, which could be length of between 1 and 8 chars.
The TRACKS ALLOC is the field that I want to SUM BY. (75,7,ZD)
The rport should look like this
Code:
1 29/08/06 BREAKDOWN BY HLQ
HLQ # DATASETS TRACK ALLOC
--------- ---------- -----------
aaa 84 256
bbbbbbb 1 10
cccc 1 1
Also, is it possible to present the DATE in the header2 in the format DD/MM/YY?
Thanks.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Here's the DFSORT control statements that will do what you asked for. I used DATE=(DMY/) to get the date you want. I used PARSE to get the HLQ. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use PARSE. If you have DFSORT, but you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:
Use [URL] BBCode for External Links
Code:
* SUM BY THE HLQ
SORT FIELDS=(2,8,CH,A)
OMIT COND=((2,1,CH,EQ,C' '),OR,
(2,1,CH,EQ,C'-'),OR,
(2,12,CH,EQ,C'DATASET NAME'))
OUTREC PARSE=(%01=(ABSPOS=2,ENDBEFR=C'.',FIXLEN=8)),
OVERLAY=(2:%01)
* CREATE SUMMARY REPORT
OUTFIL FNAMES=REPTOUT,
NODETAIL,
HEADER2=(1:PAGE,12:DATE=(DMY/),24:'BREAKDOWN BY HLQ',/,
1:1X,/,
1:'HLQ',14:'# DATASETS',34:'TRACK ALLOC',/,
1:'---------',14:'----------',34:'-----------'),
SECTIONS=(2,8,
TRAILER3=(1:2,8,16:COUNT,30:TOT=(75,7,ZD,M10)))
Back to top
TizMe New User Joined: 05 Jan 2006Posts: 72
Excellent. Thank you very much.
Back to top
Please enable JavaScript!