PL/I Language Server

Important: This functionality requires a licensed version of a Rocket Enterprise Developer product on the same machine. See Installation for details.

A number of advanced editing and navigation features for PL/I sources inside the Rocket Enterprise extension are provided by the PL/I Language Server - a feature available when you also have installed and licensed a supported Enterprise Developer product. The PL/I Language Server features make editing and navigation in your PL/I code more similar to that of Visual Studio or Eclipse.

Features available through the PL/I Language Server

The PL/I Language Server enables the following functionality in your extension and must be running in order for them to work:

  • Hover pop-ups for data items - hovering data items in the source provides a basic description of the data item.
  • Go to/Find/Peek definition and references - provide quick navigation from a data item to its definition or to other locations where the code references it.
  • Go to/Peek definition for include statements - hover include statements to view their full path.
  • Collapsible regions in the editor - you can collapse sections of code in the editor.
  • OUTLINE view - a tree-view outline of a PL/I program that shows the programs, and data items defined in the program.
  • Error highlighting and reporting - compilation errors are highlighted in the editor and shown in the PROBLEMS section.
  • Rename command available across multiple files.
  • Specify a main file for an include file.

See Scope of the Support in This Version for details about the limitations of the PL/I Language Server.

Enable the server

The PL/I Language Server requires that you have a licensed Enterprise Developer product installed on your machine. The Micro Focus COBOL: Install Location setting of the Rocket COBOL extension must set to the install location of Enterprise Developer. See Additional Software Requirements.

Start or stop the server

With a PL/I source opened in the editor, look at the bottom right corner of Visual Studio Code. You can notice that the language toolbar status item, {} PL/I, correctly indicates the language of your source file.

Hover the {} symbol to check the status of the PL/I Language Server. By default it is running:



Click Options on the line for the Micro Focus PL/I Language Server to access the commands for the server available from the Task Picker:

  • Shutdown - click this if you want to disable the Language Server features temporarily. For example, you might want to switch off the functionality for projects for which the Language Server is not supported.
  • Restart - click this to restart the Language Server.
  • Show output - click this to view any trace messages from the Language Server in the OUTPUT view.

If the server is disabled, for example - if the Micro Focus PLI: Language Server Autostart is unchecked, you can start it as follows:

  1. Hover the {} symbol in the language toolbar.
  2. Click Options on the line for the Micro Focus PL/I Language Server.
  3. Click Start available from the Task Picker list.

Determine the Compiler directives

If the workspace includes any .pliproj files, the PL/I Language Server scans the project files and any PL/I source files that are listed in a project get associated with the project to obtain the compiler directives to use.

If a project file is not available, Visual Studio Code takes the directives for background parse from the Micro Focus PLI: Default Directives extension setting.

In some circumstances, updating any external files does not automatically trigger a background parse of the files. To manually trigger background parse, right-click in the editor, and click Update syntax reporting.

Note: A file in the workspace can only have one project association. If multiple projects reference the same file, it can only be associated with the first project that is scanned.

When the PL/I Language Server is running, the Visual Studio Code status indicates the project the file you edit is associated with in the Project: projname.cblproj field.

This project association means that the background parse uses the Compiler directives and any dependency path information which is available in the project file.

Specify a main PL/I file for an include file

If more than one PL/I programs in the workspace reference the same include file, you can choose which main PL/I program will provide the context for the include file. You can do this as follows:

  1. Open the include file in the editor.
  2. In the language toolbar, click {} in the bottom right corner of Visual Studio Code next to the PL/I language item.
  3. Click Configure on the line for Context file.

    This shows the Task Picker at the top of Visual Studio Code with the list of PL/I programs available to choose as a context.

  4. Select the preferred PL/I program.

    This will be displayed next time you check the context of the include file with the {} selector.