Set Up the HelloPLIWorld Project

Walks you through the process of creating an Enterprise Developer project, adding PL/I source, and then compiling and running the resulting application.

Create a project

You start by creating a Visual Studio project which is the container for your source code:

  1. In Visual Studio, click File > New > Project.
  2. In the Create a new project dialog box, select PL/I from the Language drop-down list.
  3. Select the Console Application template.
  4. In the Project name field, type HelloPLIWorld.
  5. In the Location field, type c:\tutorials\PLI.
  6. Check Place solution and project in the same directory and click Create.

    This creates a solution and a project from the available templates in the specified location and opens them in Solution Explorer in Visual Studio.

Add a source file

The IDE creates a project with a template PL/I program. To demonstrate how you add files to a project, you'll delete this template file and add a new one:

  1. In the Solution Explorer, right-click the template program your project, Program1.pli and click Delete. Confirm deletion.
  2. Right-click your project in Solution Explorer and click Add > New Item > PL/I Items, and click PL/I Program.
  3. In the Name field, type HelloPLIWorld.pli, and then click Add.

    This adds a template PL/I file to your project and opens it in the editor.

  4. Copy and paste the following code into the editor, overwriting the existing text:
    HelloPLIWorld: proc options (main);
      put skip list("Hello PL/I World!");
    end HelloPLIWorld;
  5. Click File > Save All.

    You can verify now that your project compiles cleanly.

    Note: Do not close the Visual Studio editor.
  6. Click Build > Build Solution.

    The progress of the build is displayed in the Output view. There should be no errors in the build.

You can now run the application.

Run Hello PL/I World

  1. From the main menu, click Debug > Start Without debugging.

    This opens a console window with Hello PL/I World! printed in it.

  2. Press any key to close the console.