IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Creating Summary Report by HLQ.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Mon Aug 28, 2006 12:40 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Aug 28, 2006 8:59 pm
Reply with quote

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
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Tue Aug 29, 2006 4:05 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Aug 29, 2006 4:41 am
Reply with quote

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
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Wed Aug 30, 2006 8:17 am
Reply with quote

Excellent. Thank you very much.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
No new posts Report of batch jobs JCL & VSAM 1
Search our Forums:

Back to Top