Previous Topic: Deleting Functions

Next Topic: Generating and Compiling

Deleting a Function

This topic includes the steps for finding where a function is used and removing all references to it. If the function you want to delete is not referenced by another function, go directly to the last step.

To delete a function

  1. Find where the function is used. To make the inquiry, starting from the Edit Database Relations panel:
    1. Go to the function for the file. From the Edit Database Relations panel, type F (next) to the specific file, and press Enter.

      The Edit Functions panel displays, listing the functions for that file.

    2. Select the function for which you want to find references. Type U (next) to the specific function and press Enter.

      The Display Function References panel appears, listing all the functions that call the function.

      Note: You can also reach the Display Function References panel from the Display Access Path Functions panel and the Display All Functions panel. You can also determine which model objects reference the function using the Edit Model Object List panel or the Display Model Usages (YDSPMDLUSG) command.

  2. Remove the references from the action diagrams. Go into the action diagrams of the functions that call the function you want to delete and remove the logic that calls the function.
  3. Delete the function. From the Edit Functions panel, type D next to the function you want to delete and press Enter.

    If the function has associated source, a confirm prompt gives you the option of deleting it along with the function once you press Enter.

    Deleting a Function

  4. Press Enter again at the confirm prompt. The function and associated source, if any, is deleted.

For more information on editing functions, see Editing and Maintaining Several Functions Simultaneously in the chapter "Modifying Action Diagrams."