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:
- In Visual Studio, click
.
- In the
New Project dialog box, expand
.
- Click the
Native category.
- Select the
Console Application template.
- In the
Project name field, type
HelloPLIWorld.
- In the
Location field, type
c:\tutorials\PLI.
- 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:
- In the
Solution Explorer, right-click the template program your project,
Program1.pli and click
Delete. Confirm deletion.
- Right-click your project in
Solution Explorer and click
Add > New Item > PL/I Items, and click
PL/I Program.
- 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.
- 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;
- Click
File > Save All.
You can verify now that your project compiles cleanly.
Note: Do not close the Visual Studio editor.
- 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
- From the main menu, click
Debug > Start Without debugging.
This opens a console window with
Hello PL/I World! printed in it.
- Press any key to close the console.