Idea Details

DAR: Provide an option to turn off zero suppression and duplicate DBID numbers

Last activity 19 days ago
Bill Matthias III's profile image
11-15-2019 09:36 AM

As a DBA, sometimes there is a need to do mass maintenance of one kind or another to where we have to perform maintenance on every Database (a.k.a. DBID) in the entire Datacom environment.  In order to do so, we have to generate DBUTLTY control cards for each DBID.  Sometimes these cards may be to change an attribute in each DBID or Area or Table where other times it may be to generate BACKUP, LOAD, RETIX, REPORT, etc. control cards on each entity.

For example, I need to change one attribute in each Data Area in each DBID in the DBMS.  So I start off by building my basic JCL that contains a template of the control cards that I need to generate.  Like:

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

CXXMAINT DBID=NNN,AREA=XXX,OPTION=ALTER,DSOP=4

Now I just have to fill-in the DBID number and Area name of each Data Area.

What I noticed was that I could issue a DCAREAS that would provide me with a list of each DBID and each Area within the DBID.

Cmd DBID Area Occurrence

___ 200 DEB BLD-DR-HST-CONSOLIDATED

___ . PRD BLD-DRPRD-HST-CONSOLIDATED

___ 201 DEB BLD-DR-HST01

___ . PRD BLD-DRPRD-HST01

___ 202 DEB BLD-DR-HST02

___ . PRD BLD-DRPRD-HST02

___ 203 DEB BLD-DR-HST03

___ . PRD BLD-DRPRD-HST03

___ 204 DEB BLD-DR-HST04

___ . PRD BLD-DRPRD-HST04

___ 205 DEB BLD-DR-HST05

___ . PRD BLD-DRPRD-HST05

If I position my cursor over all of the Area names, I can select, copy and paste them to my above JCL template of control cards.  However, I can only partially accomplish that with the DBID column because Sysview is suppressing leading zeros and suppressing duplicate DBID numbers.

I'd like an option that does not suppress either one.  This would enable me to position my cursor on the DBID column, select the entire column, copy and paste the full DBIDs into my template as well so I end up with:

CXXMAINT DBID=200,AREA=DEB,OPTION=ALTER,DSOP=4

CXXMAINT DBID=200,AREA=PRD,OPTION=ALTER,DSOP=4

CXXMAINT DBID=201,AREA=DEB,OPTION=ALTER,DSOP=4

CXXMAINT DBID=201,AREA=PRD,OPTION=ALTER,DSOP=4

CXXMAINT DBID=202,AREA=DEB,OPTION=ALTER,DSOP=4

CXXMAINT DBID=202,AREA=PRD,OPTION=ALTER,DSOP=4

CXXMAINT DBID=203,AREA=DEB,OPTION=ALTER,DSOP=4

CXXMAINT DBID=203,AREA=PRD,OPTION=ALTER,DSOP=4

CXXMAINT DBID=204,AREA=DEB,OPTION=ALTER,DSOP=4

CXXMAINT DBID=204,AREA=PRD,OPTION=ALTER,DSOP=4

CXXMAINT DBID=205,AREA=DEB,OPTION=ALTER,DSOP=4

CXXMAINT DBID=205,AREA=PRD,OPTION=ALTER,DSOP=4

This would be a tremendous time saver for DBAs who manage/manipulate the entire DBMS environment via the ease of building these control cards.


Comments

25 days ago

​SET REPFIELD NO indeed does eliminate the duplicate suppression when used on a DCAREAS screen, however it does not eliminate the suppression of leading zeros.  For example for DBID two it shows:   2  but what I want to see is either 002 or 0002.

25 days ago

Since you mention generating DBUTLTY control cards for your whole environment, here's a simple Rexx procedure to do just that (in my case generating DATASCAN and DATASP reports)...

 

/* Rexx to generate DBUTLTY control cards to produce DATASP reports   

   for all database areas                                         */  

  Parse arg MufName                                                   

  Say 'Generating DATASP reports for' MufName                         

  Address 'LINK' 'GSVXRXAA'                                           

  Address 'SYSVIEWE'                                                  

          "C(DATACOM" MufName";DCDSETS;select volser > ' ') STACK(NO)"

  Address 'SYSVIEWE' 'C(XVEXTRAC DATA DBID SvDbId.)'                  

  Address 'SYSVIEWE' 'C(XVEXTRAC DATA Area SvAreaName.)'              

  Address 'SYSVIEWE' 'C(END)'                                         

  j=0                                                                  

  k=0                                                                 

  l=0                                                                 

  Do i=2 to SvAreaName.0                                              

    If SvAreaName.i='IXX' then do                                     

      l=l+1                                                           

      StatsCard.l=' COMM OPTION=STATS,DBID='SvDbId.i                  

     End                                                               

    Else do                                                           

      j=j+1                                                           

      DataScanCard.j=' DATASCAN AREA='SvAreaName.i',DBID='SvDbId.i || ,

                     ',OPTION=REBUILD_SPACE_INDEX,PRTY=2'             

      k=k+1                                                           

      DataSpCard.k=' REPORT AREA='SvAreaName.i',DBID='SvDbId.i || ,   

                   ',TYPE=DATASP'                                      

    End                                                               

  End                                                                 

  DataScanCard.0=j                                                    

  DataSpCard.0=k                                                       

  StatsCard.0=l                                                       

  Address 'TSO'                                                       

          "ALLOC DD(MNTDT) SHR REUSE"                                  

          "EXECIO * DISKW MNTDT (STEM DataScanCard. "                 

          "EXECIO * DISKW MNTDT (STEM StatsCard. "                    

          "EXECIO * DISKW MNTDT (STEM DataSpCard. FINIS "             

          "FREE DD(MNTDT)"                                            

Exit                 

 

Using the Rexx API with XVEXTRAC eliminates the manual cut-and-paste, and provides the maximum protection against changes between Sysview and Datacom software releases.                                                

25 days ago

To eliminate the suppression of duplicate values, issue command SET REPFIELD NO

25 days ago

​The above DAR pertains to the Datacom option for Sysview on panels like DCDBASES, DCAREAS, DCTABLES and DCDSETS.  Ideally it would be an option that could be turned ON or OFF from the command line.