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
Create a new project dialog box, select
COBOL from the
Language drop-down list.
- In the two remaining drop-down lists, select
Windows and
Enterprise Server respectively.
- Select
Enterprise Server Application.
- Click
Next.
- 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
|
- Check
Place solution and project in the same directory.
- Click
Create.
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.
- Build the project to create the folder structure for the build output.
- 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\x64\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\x64\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.