Identifying Obsolete/Unused Objects?

jimfost

Member
We are currently on EnterpriseOne 8.10, looking to upgrade to 9.1. We'd like to clean up the obsolete/unused programs/versions/tables/business views/etc. that we've developed over the years. I've looked in F983051 (VRVED=DateLastExecuted), and that is good for UBEs, but not useful for other object types. Is there a way to identify objects that haven't been used for a long time, and we potentially no longer need? We're on iSeries, if that makes a difference.

Any help would be greatly appreciated.

Thanks,
Jim
 

jileto

Well Known Member
Maybe clear out the caches - dddict/ddtext/glbltbl and look at what they end up having after a few weeks...
 

jimfost

Member
Thanks for your reply. I'm not sure how to do that. I know where these files are on my fat client, but I don't know how to look at their contents. We also have a farm of Citrix servers, so we'd have to check those as well. Can you tell me how to see the contents and what to look for?

Thanks,
Jim
 

altquark

Legendary Poster
Hi Jim

I assume you're talking that you are on Fat clients on 8.10 and are looking for all those custom programs that you might not need.

UBE's are the simplest to look for, depending on how far back you keep your data in the F986110 on the iSeries. Maybe have a trigger added to the F986110 to update a table based on the unique job being submitted ? Theres probably a few ways in SQL to achieve that.

Interactive Applications are certainly the hardest to track. Obviously you want to try and identify as many as possible through the use of Menus - but there are also so many applications called from form exits - its incredibly difficult to identify.

Jileto's method is interesting - he is suggesting on Fat clients or on Citrix, you COULD delete the /PD810/spec/dddict/ddtext/glbltbl say once a week and then use UTB each day to identify what the contents are.

Unfortunately there are two major issues with this. First of all, it means your citrix users would need to be JITI'ing constantly - which will result in spec corruption, and hence more issues. Secondly, if you manage to get some dddict/ddtext/glbltbl spec files - they won't identify anything about your interactive applications since DDDICT is Data Dictionary, DDTEXT is Data Dictionary Text, and GLBLTBL are Table Specifications ! So - don't do this ! It won't result in anything useful !

There is, however, one way to do this - and this would need a trigger placed on your PD810/F983051. The version table is read every single time that an interactive or UBE application is launched. I've achieved this before - in effect, every time the F983051 is "selected" - you could capture the select statement, and store the necessary information into an external file.

You need a really good iSeries person to go through this example RPGLE program to help you out - but here is the jist

The important information in F983051 - is the following :

VRPID
VRVERS
VRENHV


Create a custom table, F55983ADT which contains the following information :

VRPID
VRVERS
VRENHV
VRUSER
VRDATE
VRTIME

Now, you want to create a TRIGGER that inserts data into the F55983ADT table whenever the F983051 is READ. Obviously the values VRPID, VRVERS, VRENHV would come from the row selected from the F55983ADT table - but the USER, DATE and TIME would be system provided values based on the connection. (program following since its over 10,000 characters long !)
 
Last edited:

altquark

Legendary Poster
Code:
Here is the RPGLE program:


H Option(*NODEBUGIO)                                                                            
H DftActGrp(*No)                                                                                
H ActGrp('Trigger')                                                                             
H BNDDIR('MYBNDDIR')                                                                            
 ***********************************************************                                    
FF55983ADT o    e             disk                                                              
 ***********************************************************                                    
 * The following works like an *ENTRY plist:                                                    
 ***********************************************************                                    
D MainLine        pr                  ExtPgm('PGMNAME')                    <<<<<<<<<<<<<<<<<<<< 
D   Buf                               likeDS(Parm1)                                             
D   Length                      10I 0                                                           
D MainLine        pi                                                                            
D   Buf                               likeDS(Parm1)                                             
D   Length                      10I 0                                                           
 ***********************************************************                                    
 ** standard specification for all trigger programs                                             
 ***********************************************************                                    
D Parm1           ds                  qualified                                                 
D   File                        10A                                         1-10         
D   Library                     10A                                        11-20         
D   Member                      10A                                        21-30         
D   Event                        1A                                        31            
D   Time                         1A                                        32            
D   CommitLock                   1A                                        33            
D                                3A                                        34-36         
D   CCSID                       10I 0                                      37-40         
D   DBRRN                       10I 0                                      41-44         
D                                4A                                        45-48         
D   BOffset                     10I 0                                      49-52         
D   BLen                        10I 0                                      53-56         
D   BNullOffset                 10I 0                                      57-60         
D   BNullLen                    10I 0                                      61-64         
D   AOffset                     10I 0                                      65-68         
D   ALen                        10I 0                                      69-72         
D   ANullOffset                 10I 0                                      73-76         
D   ANullLen                    10I 0                                      77-80         
 **------------------------------------------                                            
 **  Constants                                                                           
D BeforeEvent     C                   CONST('2')                                               
D AfterEvent      C                   CONST('1')                                               
                                                                                               
D Insert          C                   CONST('1')                                               
D Update          C                   CONST('3')                                               
D Delete          C                   CONST('2')                                               
D Read            C                   CONST('4')                                               
 ** standard work fields                                                                       
D Dtdate          S               D   Inz(*sys)                                                
 ***********************************************************                                   
 *  Grab external definitions for the file                                                
 *  so that we can load the "before" and "After"                                               
 *  buffers into them without manually coding all of                                           
 *  the fields in the file.                                                                    
 ***********************************************************                                   
D ptr_Before      s               *                                                            
D Orig          e ds                  ExtName(F983051   )                                      
D                                     based(ptr_Before)                                        
D                                     qualified                                                
                                                                                               
D ptr_After       s               *                                                             
D New           e ds                  ExtName(F983051   )                                       
D                                     based(ptr_After)                                          
D                                     qualified                                                 
 ***********************************************************                                    
 * Prototypes for subprocedures in this program                                                 
 ***********************************************************                                    
D ReadEvent       Pr                                                                            
 ***********************************************************                                    
D LoopToFree      s               n   Inz(*on)                                                  
D Dtdate          s               d   Inz(*sys)                                                 
Dpsds            sds                                                                            
D P#USER                254    263                                                              
 ********************************************************************************************** 
 /free                                                                                          
   If Buf.event = Read ;                                                                        
      ptr_Before = %addr(Buf) + Buf.BOffset ;                                                   
   else  ;                                                                                      
      return ;                                                                                   
   endif ;                                                                                      
  VRPID   = orig.VRPID  ;                                                             
  VRVERS  = orig.VRVERS ;                                                             
  VRENHV  = orig.VRENHV ;                                                             
  VRUSER  = P#USER ;                                                             
  VRDATE  = Dtdate ;                                                             
  write record ;                                                                 
  return;                                                                        
                                                                                 
/end-free

where you see <<<<<<<<<<<<< you put the program name here


you then use the ADDPFTRG to add this program to the file (F983051)

Obviously other database types can also do this with any version of JDE - creating triggers on SELECT statements can be achieved in both SQL and Oracle - just using different methods for those database types - but the result should be the same. Every time that the table is "select"ed from - it should write to a custom table, capturing the information you need. Remember, this will put a performance impact over the F983051 - but hopefully that should be a minor overall impact.


Keep me in mind for your 8.10 to 9.1 upgrade !
 
Last edited:

jileto

Well Known Member
Thank you Jon, for setting me straight. Apologies Jim, for leading you astray.

I was thinking of caches but a different one obviously. Force of habit made me think of the common 3. But this one works only if your site uses the web client - don't even know if pre 8.98 tools releases have this cache. And on some later tools releases, this is automatically maintained. YMMV

Table F989999 is the Java Persistent Objects Table in the Central Objects Datasource. Apps used by web clients populate that table the 1st time they're used. You can browse it by UTB (pick the applicable Central Objects Datasource) and filter on WBOID using a wildcard like "APPINFO-P55*" for custom apps - 55-59 depending on which code your shop uses. This would list apps that have been used at least once by web clients.

But the foolproof way is what Jon described especially because your a Citrix shop.
 

jimfost

Member
Thank you both very much for taking the time to respond. I think I can handle Jon's suggestion. I've used triggers in the past. Too bad there's no way to check historical use - but at least this will let me track it going forward.

Thank you!!!

Jim
 
Top