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
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.
- Matching Parentheses
- Syntax Coloring
- Mark Occurrences
- Expand and collapse code divisions
- Open Declaration (COBOL Editor or PL/I Editor). If the declaration is in a separate file, the other file is opened in a new edit session.
- Open Copy Member and Open Include File
- Hover Information. When you hover over a variable, the declaration is shown, even if it is in a separate file
- Real-Time Syntax Checking
- Templates
- Templates
- Content Assist (z Systems® LPEX)
- Content Assist (COBOL)
- Content Assist (PL/I)
- Content Assist (JCL)
Removing an association with a program file
Procedure
To remove an association between an included file and a program file:
- In the z/OS Projects view, select the included file.
- Right click and select Associate Complete Program.
- 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.
- 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