Work With Plan Case Contents

Once you have passed through the Plan Rebuild Prompt you are presented with a list of programs, including service programs, and modules that are currently within the Plan Case. In addition to the Object Name, Attribute and Description the following information is shown on each line:

Call By This is a count of the number of programs that call this program. Full details are available through Option 7 – Called By.

DBF U/O This is a count of the Data Base Files open for update or output within each program. Full details are available through Option 6 – Plan References.

Test Case This is a count of the number of Test Cases that include a reference to this program. These Test Cases can be viewed through Option 9.

Library This is the location within the List of Libraries to Analyse where the program was found.

The following options are available to control the objects that appear in the list:
Limit To Key a character or characters to subset the display to records that have the same initial key values. Leave blank to have all records available via scrolling (page up/down). When entering a ‘Limit To’ value, this will always be used for the ‘Position To’ value in the first instance. Once the ‘Limit To’ range has been established on the screen a ‘Position To’ may also be specified. The last value keyed is stored for each user and will automatically be defaulted into this field when this panel is next accessed.

Position To This is a volatile field that will position records on the display starting with the characters keyed. Hence, this enables you to move quickly to the end of a long list and from there scroll up or down as required. If entered at the same time as the ‘Limit To’ field, ‘Position To’ will be ignored the next time the Enter key is pressed. Once the ‘Limit To’ has been established, ‘Position To’ can also be keyed. If the ‘Position To’ is outside the range of available records, the display will either start or end with the closest records.

References(REFS) The program list can be limited to those that reference a particular object. This reference is expressed via four elements; Name, Type, Scope and Use. Key the object and its type (FILE or DTAARA) by which you want to limit the display into the Name and Type fields. For physical files you can use Scope to determine whether the programs to list reference the file directly (NAME) or directly and indirectly via logical views (*LINK). Note that *LINK had no effect for Data Areas or Logical Files. For example, to find all programs that perform updates on a known Physical File or related Logical File specify:- Obj (PF name) Type *FILE Scope *LINK Use UO.

Called By (CALLS) The list can also be limited to those programs and modules that are called by a specified number of other programs. So this feature can be used to identify top-level programs (Called By = 0) or standard utility programs such as date routines (Called By > 10 for example). The Called By is expressed via two elements; Operand and Number. The Operand can be set to Equals (=), Greater Than (>) or Less Than (<).

Options:

1 – Create Test This gives direct access to Test Case Creation with the appropriate entries pre-filled. This option can be used for programs but not modules.

2 – Tune Refs This allows the list of objects that the selected program or module referenced when the Plan Case was analysed to be maintained. Any changes are immediately reflected into the Plan Case.

3 – Current Refs This will display a list of all objects referenced by the selected program’s exploded call stack. Object verification will be performed and any errors reported at the top of the list. This facility is similar to that associated with a Test Case pre-check except that the list is not limited to those database files that can be updated.

5 – Display Desc This will display the current description of the program or module as found in the Plan Case library list or the interactive library list if a Plan Case library list has not been set.

6 – Plan Refs This will display a list of the objects that the selected program or module referenced when the Plan Case was analysed. It reflects any tuning that has been performed.

7 – Called By This will display a list of those programs that issue a call to the selected program or module and their upwards call stack.

8 – Call Stack This will list the total nested call stack for the selected program. Be aware that selecting the top-level program in a very large application could cause a slow response. This option is not valid for modules.

9 – Test Cases This will access Work With Test Cases in a view that is limited to those Cases that include a process using the selected program. This option is not valid for modules.

Function Keys:

F10 – Errors If a file cannot be found in the library list when a Plan Case is executed, the file description will not be found. Also, the U/O information against the program referencing it will not be updated, as this object cannot be validated as a database file. Any such files can be viewed through this function, and the description of the function key will be highlighted if any errors exist.

F11 – Duplicates When the Plan Analysis is executed only the first occurrence of any program or module is included in the Plan Case. If duplicate programs were found then the additional rejected occurrences can be viewed through this function. The description of this function key will be highlighted if any duplicates exist.

F17 – Changed Switch the filter on to limit the display to all
Objects Filter objects that have changed since the Plan Case was built.

Tune Program References
This panel is reached from Work With Plan Case Contents with option 2. The facility has two primary objectives. Firstly it enables references such as variable program names to be resolved. Secondly the effect of removing a program, file or data area from an application can be modeled. This can be of immense assistance when the re-engineering of an application is being considered.

Options:

4 – Remove This allows existing program references to be removed from the Plan Case. If the reference had been created when the Plan Case was analysed then the removal is temporary and can be reversed through Option 7. If the reference had been manually added in this facility via F6 then the removal is permanent.

7 – Reactivate Any automatically created reference that had been previously removed (made inactive) through Option 4 can be reactivated with this option.
Function Keys

F6 – Add This enables a reference to a program, file or data area to be added for the current program. For files the usage (Input, Output, Update) can also be defined.

Plan References
This panel is reached from Work With Plan Case Contents with option 6. All objects referenced by the selected program or module are displayed. The list includes those manually added via Tuning as well as those captured during the Plan Case analysis. Any references that have been removed through Reference Tuning are excluded.

Options:

5 – Description The object description of the program, module, file or data area will be displayed using the appropriate IBM supplied command.

6 – Pgm References This option is only available for programs and modules and repeats the processing of this Plan References facility for the newly selected program.
Function Keys

F8 –Create Case This allows a Comp, Data or Warp Case to be created for all the objects currently referenced for the selected program. Objects for all programs in a call stack can be included by pressing F8 while viewing the program call stack. See following section.

F12 – Cancel If taken from the reference display for the program selected in Work With Plan Case Contents, then this Plan Reference facility will be ended. If taken from a program that was selected from within this facility through option 6 then you will return to the program references previously displayed.

Create Comp, Data or Warp Case
This panel is reached from the Plan References by pressing F6.

Entries:

Project Select any existing Project, F4 is available.

Case Type Select the type of case that you want to create. ‘1’ for Data, ‘2’ for Warp or ‘3’ for Comp.

Case Name Select the name of a current or new Case.

Case Description For new cases type an appropriate description.

Merge if exists This allows existing Data, Warp and Comp cases to be extended with the references of the currently selected program. ‘1’ if extension is required and ‘2’ if not.

Include Duplicates This option is only applicable if the prior merge option has been set to yes. If this option is set to ‘2’, any objects that already exist in the case specified will not be added again. If it is left as ‘1’, any objects that are already in the case will appear multiple times.

Object Library Specify the library in which the object is to be referenced within the Case. *CURRENT will search the Plan Case library list for the first occurrence of the file and use this library for the entry for the file in the Case being created. If the object cannot be found in the library list it will still be included in the Case but the library will be *LIBL and the object description * File not found *.

Compare To Library For Comp Cases only a library is also required for the second file in the comparison.

Reference Selection For option 1 any physical files present in the program references will be included in the target case, and also underlying physical files for all logical files. This is the only valid option for Data and Warp Cases as these do not support logical files. For Comp Cases option 2 will create the target case with physical and logical file references exactly as they appear in the program.

Files to include Option ‘1’ will include all referenced files in the new Case whereas option ‘2’ will include only those files open for update.

When Enter is pressed a list of the files that are to be added to the target is displayed for confirmation.

Call Stacks
This panel is reached from Work With Plan Case Contents with options 7 and 8.

When option 7 is used the programs at level 1 are those that directly call the selected program or module. The upwards call stack for each of these programs is then displayed. This facility can be used when parameter lists are to be changed or to determine which programs might be affected by a change to the selected program.

If option 8 is used an indented list (up to 20 levels) of the entire call stack for the selected program will be displayed.

Options:

5 – Description This performs as Description (Option 5) within Work With Plan Case Contents.

6 – Pgm References This performs as Plan References (Option 6) within Work With Plan Case Contents.

7 – Called By This option produces a list of all programs which directly call the selected program.

8 – Pgm Stack This option repeats the processing of this Programs Which Call facility for the newly selected program.

Function Keys:

F7 – Unique Display a list of all programs in the call stack with duplicates removed.

F8 – Create Case This allows a Comp, Data or Warp Case to be created for all the objects currently referenced by all programs in the call stack. See previous section.

F9 – Exclude System Remove from the list references to all programs
Pgms beginning with the letter ‘Q’ or ‘Y2’.

F12 – Cancel If taken from the ‘Called By’ display for the program selected in Work With Plan Case Contents, then this Programs Which Call facility will be ended. If taken from a program that was selected from within this facility through option 7 then you will return to the ‘Called By’ previously displayed.

F21 – Print Produce a report showing the program stack