Previous Topic Next topic Print topic


Creating Your First Hello PL/I World Application

This tutorial demonstrates the basics of how to use Visual Studio to create a simple PL/I application, your first "Hello PL/I World" application.

Create a project

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

  1. Start Enterprise Developer.
  2. Click File > New > Project.
  3. Click the PL/I category in the Installed > Templates.
  4. Click Native and select Console Application.
  5. Specify a name for your project such as HelloPLIWorld and specify a location.
  6. Uncheck Create directory for solution and click OK.

    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 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, click PL/I Program, specify a name such as HelloWorld.pli and click Add.

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

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

    You can verify now that your project compiles cleanly.

  5. 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

To run the application:

  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.

Preserve this project because you are going to use it again for other demonstrations.

What Next?

Continue with the next tutorial, Debug the Hello PL/I World Application, which demonstrates how to debug PL/I code in Visual Studio.

Previous Topic Next topic Print topic