The Object Usage Utility...
A. Overview of The Object Usage Utility
The Object Usage Utility is perhaps the most powerful of all of the EASY400 tools. The tool can show you everywhere that a particular object is used. It provides vital information about an object including source files, object size, usage information, and attribute information. The tool also enables you to scan source, search through all of the object descriptions on your system, list redundant objects on your system, let you know when a file may be in need of reorganizing, and much more.
B. Using The Object Usage Utility
If you need information on a particular object and know the object’s name you can simply enter in name in the object name field and press enter. The object will be displayed along with its attributes. If you do not know the object’s name, you can enter in a search argument in the search descriptions for field and press “enter” to display a listing of all objects that have a matching description.
Filling in the environment ID, the library, the object type, and/or the object attribute and pressing enter will narrow the search further.
Exhibit A – Searching for asset information in the LAAMS environment.
Object information is updated whenever “F7=Update Environment Info” is pressed from the main menu. It is a good habit to take this option on a regular basis in order to keep your information fresh. In the event that you have not updated your environment information recently but would like to get timely information on certain objects, you may change the Update info in real time? flag to “Y” and press enter. The response time will be somewhat slower as the information gathering process will be run interactively.
In order to identify potentially obsolete objects for system clean-up efforts, change the List potentially obsolete objects? flag to “Y” and press enter. The Object Usage Utility will prompt you to enter a cutoff date. After you press enter, a listing will be displayed of all of the objects that have not been used since the cutoff date. NOTE: It is strongly recommended that you update your environment information using F7 from the main menu prior to using this function. System saves, object restores and other system functions may create invalid usage information so this tool should be used as a means of identifying potentially obsolete objects and should not be your sole determining factor.
The List redundant objects? field can be used to identify objects that exist elsewhere within an environment or on the system. Simply enter a Y in this field and a listing will be created of all of the objects (that match the other selection criteria that you have entered) with the same attributes and names but are in different libraries. You can use option “UB=Used By” to confirm whether or not the duplicated/redundant object is used and can then use option “MO=Move Object” to move the object to a save library where it can be saved to tape and then removed from the system.
Use F4 to prompt any fields where assistance is needed. Asterisks can be entered as wildcards for the object attribute and object name field entries to limit your search to a particular suffix or prefix as shown in Exhibit A. In our example, we are scanning all files in the LAAMS environment that begin with the letter “L” for the term “ASSET”. F11=Toggle is pressed to view more information on the selected objects.
Exhibit B – Second view, after F11=Toggle is pressed.
As shown in Exhibit C, F11= Toggle can be pressed again in order to bring up more information on the selected objects. Information from the Object Usage Utility such as the number of records, the last used date, the fact that the file is keyed, and the description “Asset File” leads us to believe that this file contains the asset information that we are looking for. To determine where file LAX is used we simply type the option “UB” (Used By) next to the LAX file and press enter.
Exhibit C - Third view, after F11=Toggle is pressed again.
By typing “UB” (used by) next to the file named “LAX” and pressing enter, a listing of programs that use the file objects will be displayed as shown in Exhibit D. In our example we would like to find out which objects are used by the program “LAM04A” so “AL” (all objects) is typed next to the file and enter is pressed.
Exhibit D – Using Option UB=Used By to display all programs that use file LAX.
After “AL” is typed next to a program and enter is pressed, a listing of all of the objects used by the program will be displayed as shown in Exhibit E.
Exhibit E – Using option AL=All Objects to display all objects used by program LAM04A.
Read section C “Options available from within The Object Usage Utility” for a complete listing of all of the options available.
Remember, F7 from the main menu will update the object information for an environment and should be run on a regular basis. Pressing F4 on the environment field will bring up a prompt screen that will show you when the information was last updated.
C. Options Available from within The Object Usage Utility.
AL=All Objects Used
This function is available to display all of the objects used by a selected program.
CB=Called By
Displays a listing of programs that call the selected program.
CD=Custom Description
Allows users to create a custom description of a field within EASY400. This function keeps the description as it is already defined in the file while also creating a custom description for the field, which may be more meaningful to some users. Since the actual file is not changed, no recompiling of the file or the programs that use it is necessary.
CH=Create Header
This function will create a record in the file HEADINGS in library EASY400 that contains all of the field descriptions for the file. This function is a huge help when downloading files to a PC as they oftentimes do not download the field descriptions. Without these field descriptions the PC file just contains data, with the descriptions the PC file contains information. Typically, programmers or users have to go through the tedious and error-prone process of entering each of the field headings by hand. With the Create Header function, users can type CH next to a field name corresponding to the file they are downloading, download the HEADINGS file, scan for the file name that they need the headings for, and copy the heading record for the file into the downloaded file.
DF=Display Fields
Type DF next to a field to view a listing of all of the fields contained within the selected file.
DO=Display Object
Use this function to display object information such as size and creation date for the selected file.
ES=Edit Source
This option will allow the user to access and edit the source that was used to create the selected object if AS/400 Programming Development Manager is installed on your system and the user has authority to the source.
FD=File Description
This function displays file specific information such as the files description, keys, file members, etc. related to the selected file.
FL=Files Used
Use this option to display a listing of all of the files used by the selected program.
KY=File Keys
Type KY to view the keys for the selected file and the key field's attributes.
LF=Logical Files
This option will display a listing of all of the logical files built over a physical file along with the keys used in the file and the key field's attributes.
MO=Move Object
Use this function to change the library that the object resides in.
PG=Programs Used
This option will display a listing of all of the programs that are called from the selected program.
RG=Reorganize Physical File
This function will reorganize the selected physical file. Reorganization frees up data space on your system by removing deleted records and compressing the file. Through reorganization, file-processing speeds can be improved greatly in instances where a program is reading sequentially a keyed file. EASY400 will handle most of the error handling associated with this process. NOTE: In the rare event of an abnormal system end or an abnormal end job (ENDJOBABN) you must rebuild the access path for the member.
SR=Select Records
This function enables users to select records from a file and display the selected records.
SS=Scan Source
Use this function to scan through the source code used to create the selected objects for a particular search argument.
UB=Used By
Use this option to have EASY400 create a listing of every program that uses the selected file.
VF=View File
Use this function to display the data within a file.
VS=View Source
This option will allow the user to view the source that was used to create the selected object if AS/400 Programming Development Manager is installed on your system and the user has authority to the source.