Walks you through the process of creating a
Visual COBOL project for the CarsProgram demonstration application, and populating the project with demonstration files.
Restriction: This topic applies only when the Enterprise Server feature is enabled.
Create the ProgramRESTAPI project
- In Visual Studio, click
.
- In the
New Project dialog box, expand
.
- Expand
Enterprise Server, and then click
Native.
- Select
Enterprise Server Application.
- Complete the
Name and
Location fields as follows:
Name
|
ProgramRESTAPI
By default, this is the name of both the project and the solution.
|
Location
|
c:\tutorials\IMTK
|
- Uncheck
Create directory for solution.
- Click
OK.
Visual Studio opens the
Solution Explorer for the
ProgramRESTAPI solution, showing the
ProgramRESTAPI project.
Add CarsProgram demonstration files to the project
- Add COBOL source
-
- Right-click the
ProgramRESTAPI project, and select
Add > Existing Item from the context menu.
- Browse to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\Interface Mapping Toolkit\ServiceInterfaces\CarsProgram directory.
- On the list of files, select the
CarsProgram.cbl and
cars.cpy files, and then click
Add.
- Add the
cars.xml data file
-
- Using Windows
File Explorer or at a command prompt, change to the
%PUBLIC%\Documents\Micro Focus\Visual COBOL\Samples\Interface Mapping Toolkit\ServiceInterfaces\CarsProgram directory.
- Copy the
cars.xml file to the following location:
c:\tutorials\IMTK\ProgramRESTAPI\bin\x86\Debug
Set project properties
- In the Visual Studio
Solution Explorer, right-click the
ProgramRESTAPI project, and then select
Properties from the context menu.
- On the project properties menu ribbon, click
COBOL.
- In the
Additional directives field, type:
xmlgen(.\bin\x86\Debug) xmlgen(ws)
Save the ProgramRESTAPI project
- In the
Solution Explorer, select the
ProgramRESTAPI project, and then click
File > Save ProgramRESTAPI from the Visual Studio main menu.