The BookWrapper.cbl interface has a similar interface to Book.cbl but updated to turn the file status into a string and a numeric value, and pass it back in lnk-status-group. The setup-status section does the conversion.
procedure division using by value lnk-function by reference lnk-b-details lnk-status-group.
The BookWrapper.cbl program is compiled with the ILSMARTLINKAGE directive which creates classes to represent the PROCEDURE DIVISION parameters. In the bin folder are the Details.class and StatusGroup.class files. These files are used in the creation of the bridge code between the server code and the COBOL application.
To create the wrapper project:
This opens the New COBOL JVM Project dialog box.
To set the compiler directives:
This opens the Properties for BookWrapper dialog box.
ilnamespace(com.microfocus.bookwrapper) ilsmartlinkage ilcutprefix(lnk-b) ilcutprefix(lnk-) jvmdecimal(scaledinteger) warnings(3)
The project uses one source file, BookWrapper.cbl, that needs to be imported into your project:
This opens the Import dialog box.
This import the files into the project.
The copybook path needs to be set to point to the CobolBook project:
This opens the Required Project Selection dialog box.