Page 2 of 2

Re: List cat not working as good as File Aid

PostPosted: Sun Oct 04, 2009 8:14 pm
by kashmiri
Thanks dick/expat

There is a problem, i actually needed above things to get all the details of a VAM file. I mean i would submit around 100 VSAM files thruogh a control card and then do a listcat on them. Then i was thinking to do a sort and some ezytrieve programming to get the desired report that contails the formated details of all those VSAM files.

But once i completed listcat and sort of the files, it seems there is a lot that comes out of listcat command. and i really dont need that much information. Its getting difficult to get the desired report.

Can you suggest any other way.

Thanks a lot in advance
Mohsin

Re: List cat not working as good as File Aid

PostPosted: Mon Oct 05, 2009 3:20 am
by dick scherrer
Hello,

i actually needed above things to get all the details of a VAM file.
To meet what requirement? While every system has some amount of vsam files, they don't typically need to invest a lot of work into getting more/different info than is readily available.

Possibly, we don't yet understand what this requirement is to be used for :? If this was working as you want it to, what would be the "output"? How would this output be used?

Re: List cat not working as good as File Aid

PostPosted: Mon Oct 05, 2009 11:59 am
by kashmiri
dick scherrer wrote:Hello,

Possibly, we don't yet understand what this requirement is to be used for :? If this was working as you want it to, what would be the "output"? How would this output be used?



Hi Dick,

I am a new programmer in my organisation. All I know is that my management wants me to give the details of around 150 VSAM files every month-end. They possibly need to monitor the usage of VSAM files and so on. So I was asked to take those 150 VSAM files after evry monthend production run and calculate the details. They probably need to monitor it in order to see how much space is used and allocated and so on. The problem is that I have to do it before the next days production run because the VSAM files get updated. So i used to do a file aid on all the 150 VSAM files and calculate the details.
Now i wanted to write a few JCL steps that could include some sorting and use of listcat followed by an ezytrieve or cobol program to give it a final reporting look as below. But since listcat gives so much of output, I am not able to get the my required details.

My details include

Date, Primary AllocationI(in Cyl), Sec Allocation(in Cyl), Primary Allocation (Tracks), Ttotal records (i.e Prime records), Alocated space(in Tracks),
Used space(in Tracks), Used Space(%)



I would really appreciate, if you could help.



Thanks a lot in advance.
Mohsin

Re: List cat not working as good as File Aid

PostPosted: Mon Oct 05, 2009 11:32 pm
by dick scherrer
Hello,

While it may take a bit of work, you will probably need to take the info you want from the "output" of listcat and use only that which you want.

You might also talk with the storage management people and ask if something like this already exists. . .

Re: List cat not working as good as File Aid

PostPosted: Tue Oct 20, 2009 5:49 pm
by kashmiri
Thank All,

I was able to create the report that i wanted. Thanks to aal ur help, This what i finally got

FILE-NAME DATE PRI-CYL SEC-CYL PRI-TRK ALLC-SPACE USED-SPACE USED% RECORDS
2009.292 5 1 1 0000075 0000015 020% 6848
2009.273 665 665 32 0049875 0042852 085% 8140406
2009.273 665 665 32 0109725 0105478 096% 0038512
2009.273 67 67 4 0001005 0000914 091% 172497

Amazing you all are. Thanks for the help again

Re: List cat not working as good as File Aid

PostPosted: Tue Oct 20, 2009 11:52 pm
by dick scherrer
Good to hear it is working - thanks for letting us know :)

d
ps. suggest you practice a bit using the Code tag - this will preserve alignment and improve readability. Using copy/paste from your terminal is all that is needed - no need to try to align the post manually.

Re: List cat not working as good as File Aid

PostPosted: Wed Oct 21, 2009 4:53 pm
by kashmiri
sure will do in future! Thanks

Re: List cat not working as good as File Aid

PostPosted: Mon Nov 16, 2009 12:22 pm
by IBMPKPIA
Hi Kashmiri,

I want to do the same task as required by my management that they required the same information as in your output.
Space utilization, No of records.....

I am a beginer in mainframe technology so I would really appricate if you send me your JCL code of listcat.

IBMPKPIA

Re: List cat not working as good as File Aid

PostPosted: Mon Nov 16, 2009 5:34 pm
by kashmiri
We cannot code anything in JCL, as you must be knowing. But yes, i can provide you the ssort cards and my ezytrive logic that i have used.
I dont have access to my mainframe from home. I will reach office and post here wtever i can....say in another few hours.

Kashmiri

Re: List cat not working as good as File Aid

PostPosted: Sat Nov 21, 2009 12:10 am
by kashmiri
Sort Steps
SORT FIELDS=COPY                             
INREC FINDREP=(INOUT=(C'-',C' '))           
INCLUDE COND=(38,08,CH,EQ,C'CREATION',       
        OR,09,10,CH,EQ,C'SPACE-TYPE',       
        OR,09,09,CH,EQ,C'SPACE-SEC',         
        OR,09,09,CH,EQ,C'SPACE-PRI',         
        OR,09,08,CH,EQ,C'LOW-CCHH',         
        OR,02,07,CH,EQ,C'CLUSTER',           
        OR,09,09,CH,EQ,C'REC-TOTAL',         
        OR,09,11,CH,EQ,C'REC-DELETED',       
        OR,11,17,CH,EQ,C'IDCAMS PROCESSING')


*---------------------------------------------------------------------*
*                CALCULATE THE CREATION DATE                          *
*---------------------------------------------------------------------*
    IF I-DATE-L = 'CREATION'                                           
        O-DATE-V = I-DATE-V                                           
        W-COUNT-7 = W-COUNT-7 + 1                                     
     END-IF                                                           
*---------------------------------------------------------------------*
*                  CALCULATE TOTAL RECORDS                            *
*---------------------------------------------------------------------*
     IF I-REC-TOTAL-L = 'REC TOTAL'                                   
        IF W-COUNT-5 = 1                                               
           O-REC-TOTAL-V = I-REC-TOTAL-V                               
           W-COUNT-5 = W-COUNT-5 + 1                                   
        END-IF                                                         
     END-IF                                                           


*---------------------------------------------------------------------
*             CALCULATE PRIMARY SPACE IN TRKS AND CYCL               
*---------------------------------------------------------------------
     IF I-SPACE-PRIM-L = 'SPACE PRI'                                 
*          IF W-LABEL-MAIN = 'CYLINDER'                               
*             O-DATA-PRIM-L = 'CYL'                                   
*             O-INDEX-PRIM-L = 'CYL'                                 
*          END-IF                                                     
*          IF W-LABEL-MAIN = '   TRACK'                               
*             O-DATA-PRIM-L = 'TRK'                                   
*             O-INDEX-PRIM-L = 'TRK'                                 
*          END-IF                                                     
        IF W-COUNT = 1                                               
           O-SPACE-PRIM-TRK-V = I-SPACE-PRIM-V                       
        ELSE                                                         
           O-SPACE-PRIM-CYL-V = I-SPACE-PRIM-V                       
           W-COUNT = W-COUNT + 1                                     
        END-IF                                                       
     END-IF                                                           



*---------------------------------------------------------------------*
*                     CALCULATE TOTAL NO OF EXTENTS                   *
*---------------------------------------------------------------------*
     IF I-EXTENT-L = 'EXTENTS'                                         
        O-EXTENT-V = I-EXTENT-V                                         
     END-IF                                                             
*---------------------------------------------------------------------*
*      CALCULATE THE USED SPACE BY ADDING THE TOTAL NO OF TRACKS      *
*---------------------------------------------------------------------*
     IF I-TRACKS-L = 'TRACKS'                                           
     IF W-COUNT-7 = 3                                                   
        W-TRACKS = W-TRACKS + I-TRACKS-V                               
        O-H-SPACE-V = W-TRACKS                                         
     END-IF                                                             
     END-IF                                                             


 *---------------------------------------------------------------------*
 *             CALCULATE USED % BY DIVIDING U-RBA BY A-RBA             *
 *---------------------------------------------------------------------*
      IF I-H-A-RBA-L = 'HI A RBA'                                       
         IF W-COUNT-1 LT 1                                               
            W-H-A-RBA-V = I-H-A-RBA-V                                   
            W-COUNT-1 = W-COUNT-1 + 1                                   
         END-IF                                                         
      END-IF                                                             
      IF I-H-U-RBA-L = 'HI U RBA'                                       
         IF W-COUNT-2 LT 1                                               
            W-H-U-RBA-V = I-H-U-RBA-V                                   
         END-IF                                                         
         W-COUNT-2 = W-COUNT-2 + 1                                       
      END-IF                                                             
      O-H-RBA-V = (W-H-U-RBA-V / W-H-A-RBA-V) * 100                     
      O-H-RBA-P-V = W-H-RBA-P-V                                         
      O-TRACKS-V = (W-H-U-RBA-V / W-H-A-RBA-V) * W-TRACKS               
   END-IF                                                               
      IF I-LAST-RECORD = 'IDCAMS PROCESSING'                             
         PUT VSAMOUT                                                     
         O-TOTAL-SPACE-L1 = W-TOTAL-SPACE-L1                             
         O-TOTAL-SPACE-V  = W-COUNT-8     
       O-TOTAL-SPACE-L2 = W-TOTAL-SPACE-L2                       
       O-SPACES1 = W-SPACES1                                     
       O-SPACES2 = W-SPACES2                                     
       O-SPACES3 = W-SPACES3                                     
       O-SPACES4 = W-SPACES4                                     
       O-SPACES5 = W-SPACES5                                     
       PUT VSAMOUT                                               
       STOP                                                     
    END-IF                                                       
                               



Please remember that i have not put in any variables that i have used in the logic. u will have to fiure that out according to ur need.
Let me know if you need more help, and i am sorry for being too late... on this