Associating an include file with a complete program

Use the Associate Complete Program menu item to associate an included file, such as a COBOL copybook or a PL/I include file, with a main program file. This action sets the context for an included file so that when the included file is open in the COBOL Editor or PL/I Editor, it is parsed in the context of the program file. Items that are defined in the main program file, such as variable declarations, are resolved in the included file.

Before you begin

Supported Editors:
  • COBOL Editor
  • PL/I Editor
  • Ensure that the file type of the included file that you want to associate with a complete program file matches the COBOL Copybook File or PL/I Include File content type. For more information about content types, see Setting content type associations.
  • Associate a property group with the program file. The editor uses the SYSLIB property group setting to locate included files. For more information about associating a property group with a program file, see Associating and overriding property groups.

About this task

When you associate an included file with a complete program file, and then open the included file in the COBOL Editor or PL/I Editor, the program file and all of its included files are parsed. If the program file is large, the parsing can take longer than parsing the included file alone.

For instructions for removing the association between an included file and a complete program file, see Removing an association with a program file.

Procedure

  1. In the z/OS Projects view, select an included file, such as a COBOL copybook or a PL/I include file, in a local or remote project.
  2. Right-click and select Associate Complete Program.
  3. In the Associate Complete Program window, choose one of these options:
    • Select from project: Choose this option to associate the included file with a program in a local or remote project. Expand the list of projects to navigate to the program that you want to associate with the included file.
      Tip: If the included file is in a local project, selecting a program from a list of local projects is the only option available.
    • Select from MVS files: Choose this option to associate the included file with a program on the remote system. This option is available only for included files in remote projects. The list shows all MVS file filters defined for the remote system connection. Expand a filter to navigate to the program that you want to associate with the included file.
  4. Click OK.
    The selected program file is added to the Complete program file field of the Associate Complete Program window.

Results

After an included file is associated with a complete program file, the following editor functions are enabled for the included file. Click the link for more information about these functions.
Note: If you open an included file that is not associated with a program or that is associated with a program that does not actually include the file, then these functions are not enabled.

Removing an association with a program file

Procedure

To remove an association between an included file and a program file:

  1. In the z/OS Projects view, select the included file.
  2. Right click and select Associate Complete Program.
  3. In the Associate Complete Program window, click Clear Association.
    The program file is removed from the Complete program file field of the Associate Complete Program window.
  4. Click OK.

Associate Complete File Control extension point

Identifier
com.ibm.ftt.ui.views.project.navigator.associateCompleteFileControl
Description
The Associate Complete File dialog will check for controls contributed through this extension point and, when applicable, use registered controls to as the selection user interface for complete program files. This extension point expects registered controls to implement the com.ibm.ftt.projects.view.ui.widgets.api.IAssociateCompleteProgramControl interface.
Configuration Markup

class is the fully qualified class name of the control.

<!ELEMENT extension (associateCompleteFileControl*)>
<!ATTLIST extension
point CDATA #REQUIRED
id    CDATA #IMPLIED
name  CDATA #IMPLIED

<!ELEMENT associateCompleteFileControl EMPTY>
<!ATTLIST associateCompleteFileControl
class CDATA #REQUIRED