Before starting building a repository for some application on yours, we suggest that you go through the following exercise:
so that you get some practice on this tool.
- build a repository to document ... library PLCHECKUP itself !!!
First create a library to contain your repository objects:
CRTLIB LIB(PLCREPOS) TYPE(*TEST) TEXT('Repository for library PLCHECKUP itself')
Then authorize that library to contain a repository:
PLCHECKUP/ALWLIB LIB(PLCREPOS) ALLOW(*YES)
Next, create the repository objects:
PLCHECKUP/PLCHECKUP FROMLIB(PLCHECKUP) TOLIB(PLCREPOS)
WRKLIBL('PLCHECKUP') PGM(*ALL) TOSRCF(QCLSRC)
TOMODSRCM(CRTMODS) TOPGMSRCM(CRTPGMS) PLCHECK(*YES)
After some time you will receive some break messages, like:
All programs were successfully re-created in library PLCREPOS.
Repository PLCREPOS complete.
You should just press the Enter key to resume processing.
At last you will receive the following screen
(the one you may later on recall with command PLCHECKUP/PLCHECK TOLIB(PLCREPOS)):
Please note that help text is provided for all screens.
|Figure 1 - Repository main menu|
Let us explore option 1 (Program modules):
|Figure 2 - Program modules|
Select with option 1 (Procedures) module DSPMODS:
Module DSPMODS is using four procedures exported from service program PLCHECKUP/PLCHECKP.
|Figure 3 - Imported service program procedures|
Press F12 to go back to screen Figure 2. Now select option 2 (where used in programs), to know which programs are using program module DSPMODS:
No wonder, program DSPMODS was created with command CRTBNDRPG, therefore it has a single module, same name.
|Figure 4 - Programs using a given program module|
Now press F3 to go back to the repository main menu, Figure 1, and select option 2 (Programs).
In the next screen, position to program PLCHECKUP:
|Figure 5 - Programs|
Use option 3 (files) on program PLCHECKUP to display the files accessed from this program:
|Figure 6 - Files accessed from a given programs|
Press F12 to go back to Figure 5. Now use option 7 (Called programs) to display the list of programs called from program PLCHECKUP:
|Figure 7 - Programs called from a given programs|
Press F3 to go back to the repository main menu, Figure 1, select option 4 (Files).
In the next screen, position to file PGMLIST:
|Figure 8 - Files|
Select it with option 1 (Record formats):
Note that the record format length is 609, and the number of fields there is 106.
|Figure 9 - Record formats in a given file|
Select that record format with a 1 to display the record format fields:
Please note how the key fields are flagged.
|Figure 10 - Fields in a record format|
Now press F12 twice to go back to the screen in Figure 8.
Now select file PGMLIST with option 2 (where used in programs):
|Figure 11 - Programs accessing a given file|
Let us change subject. Press F3 to return to to the repository main menu, Figure 1, and select option 3 (Service programs):
In library PLCHECKUP there is just one service program.
|Figure 12 - Service programs|
Let us use option 1 to list the procedures from this service program and let us position on procedure RTVOBJINFO:
|Figure 13 - Procedures exported from a service program|
Option 1 tells us which program modules use (import) this service program procedure:
|Figure 14 - Program modules importing a given service program procedure|
Press F12 twice to go back to the screen in Figure 12 (Service programs) and select service program PLCHECKUP with option 2 (where used by programs):
|Figure 15 - Programs using a given service program|
Go back to the screen in Figure 12 (Service programs) and select service program PLCHECKUP with option 3 (modules) to display the modules of this service program:
|Figure 16 - Modules of a given service program|
Select with a 1 module XXXDATA to display the procedures defined in (exported from) that service program module:
|Figure 17 - Procedure exported from a given service program module|
Select with a 1 procedure UPPIFY to know which program modules import it (use it):
|Figure 18 - Program modules importing a given service program procedure|
We hope that the above helps in understanding how useful this tool can be in establishing the impact of a change on a file, a program module, a service program procedure, and so on.
Of course we did not go through all the screens of this tool, which are twice as many the screens shown in this page.
Never forget that all screens support a detail help text.