The GENERATESYSIN parameter used with Utility Manager will create a LISTDEF for the tablespace and indexes that have been targeted based on the Real Time Stats thresholds stored for the objects.
If you have multiple selections, the LISTDEF name is the same for all occurrences. For example if your SYSIN to Utility Manager looks like this: //SYSIN DD * |
If the user want unique LISTDEF names - this is controlled by the XRTSSYIN exit routine. Here is an example of the XRTSSYIN routine that would make each unique - last character would be the next numerical value. /* REXX to generate SYSIN by NGT Utility Manager */ /* */ /* It is invoked by the NGT syntax RTS(,GENERATESYSIN) */ /* */ /* The exec must be available to NGTUTIL when it runs. */ /* */ /* This rexx exec generates potentially 2 LISTDEF files for IBM */ /* Utilities, 1 for tablespaces and 1 for indexes. For it to run */ /* successfully, DD statements LDEFOUT1 and LDEFOUT2 should be */ /* included in the batch jcl to run NGTUTIL. They should be a */ /* a temporary or permanent files with LRECL 80. */ /* */ /* LDEFOUT1 will contain a listdef for any tablespaces that met */ /* the criteria. */ /* */ /* LDEFOUT2 will contain a listdef for any indexes that met */ /* the criteria */ /* */ /* The listdef name for tablespaces is UTMLDFT, so the subsequent */ /* IBM utility for tablespaces should refer to that name in the */ /* syntax. The IBM utility should allocate the output file from */ /* LDEFOUT1 to be input into the SYSLISTD dd in the DSNUTILB step */ /* for tablespaces. */ /* */ /* The listdef name for indexes is UTMLDFI, so the subsequent */ /* IBM utility for indexes should refer to that name in the */ /* syntax. The IBM utility should allocate the output file from */ /* LDEFOUT2 to be input into the SYSLISTD dd in the DSNUTILB step */ /* for indexes. */ /* */ /********************************************************************/ /* */ /* RETURN CODES FROM EXEC */ /* 0 - BOTH TS AND IX LISTDEF CREATED */ /* 14 - NEITHER TS NOR IX LISTDEF CREATED */ /* 14 - EITHER LDEFOUT1 OR LDEFOUT2 DD IS MISSING FROM JCL */ /* 12 - IX LISTDEF CREATED BUT NOT TS */ /* 10 - TS LISTDEF CREATED BUT NOT IX */ /* */ /********************************************************************/ linest = 0 linesi = 0 tsi = 0 tst = 0 steprc = 0 If global.isav = 'GLOBAL.ISAV' Then global.isav = 1 Else global.isav = global.isav + 1 x = _gwrite('global.isav') say ' what is value of global isav ' global.isav say ' ' say ' ************* BEGIN XRTSSYIN PROCESSING ********' say ' ' If _CHECKDD(LDEFOUT1) <> 1 Then Do say ' FILE LDEFOUT1 WAS NOT ALLOCATED for XRTSSYIN' steprc = 14 Exit 0 End If _CHECKDD(LDEFOUT2) <> 1 Then Do say 'FILE LDEFOUT2 WAS NOT ALLOCATED for XRTSSYIN' steprc = 14 Exit 0 End do i = 1 to statements.0 stmta.i = statements.i stmta.0 = statements.0 parse value stmta.i with v1 v2 v3 v4 v5 verb.i = v1 qual.i = v2 obj.i = v3 dnum.i = v4 dnum2.i = v5 if (qual.i = 'TABLESPACE') then do tst = tst + 1 if (tst = 1) then do ldeft.1 = ' LISTDEF UTMLDFT' || global.isav || ' ' linest = linest + 1 end j = tst + 1 plevel = ' ' if (dnum.i \= ' ') then do plevel = 'PARTLEVEL '||dnum2.i end ldeft.j = ' INCLUDE '||qual.i||' '||obj.i||' '||plevel linest = linest + 1 end /********************************************/ if (qual.i = 'INDEX') then do tsi = tsi + 1 if (tsi = 1) then do ldeft.1 = ' LISTDEF UTMLDFI' || global.isav || ' ' linesi = linesi + 1 end k = tsi + 1 plevel = ' ' if (dnum.i \= ' ') then do plevel = 'PARTLEVEL '||dnum2.i end ldefi.k = ' INCLUDE '||qual.i||' '||obj.i||' '||plevel linesi = linesi + 1 end end if (linest > 0) then do say linest-1 'TABLESPACES INCLUDED IN LDEFOUT1 ' "EXECIO * DISKW LDEFOUT1 (stem ldeft. FINIS" ; l = 0 say ' *** CONTENTS OF LDEFOUT1 *** ' do while(l < linest) l = l +1 say ldeft.l end end if (linest = 0) then do say 'NO TABLESPACE LISTDEF GENERATED' end if (linesi > 0) then do say linesi-1 'INDEXES INCLUDED IN LDEFOUT2 ' "EXECIO * DISKW LDEFOUT2 (stem ldefi. FINIS" ; l = 0 say ' *** CONTENTS OF LDEFOUT2 *** ' do while(l < linesi) l = l +1 say ldefi.l end end if (linesi = 0) then do say 'NO INDEX LISTDEF GENERATED' end if (linesi = 0) then do say ' no indexes ' if (linest = 0) then do say ' no tablespaces ' steprc = 14 end if (linest > 0) then do steprc = 10 end end if (linesi > 0) then do if (linest = 0) then do say ' no tablespaces ' steprc = 12 end if (linest > 0) then do steprc = 0 end end say ' ' say ' **** END XRTSSYIN PROCESSING - STEPRC RETURNED ' steprc return |