Define an Interface Field

We see from the book.cbl source that lnk-file-status field returns the status of the last file input/output action. We will create an interface field to contain the value so the client can send it to the application.

  1. From the COBOL Explorer, expand Java Interfaces > IMTKTutorial; then double-click Add. This shows the Add operation in the Interface Mapper.
  2. Drag lnk-file-status from the Linkage Section pane to the Add Operation - Interface Fields pane.

    This creates an interface field called lnk_file_status. A mapping is automatically created between the new field and the entry point field it was created from. The purpose of this field is to relay information back to the user; therefore we need to change its direction from Input to Output.

  3. Double-click lnk_file_status in the Add Operation - Interface Fields pane.
  4. Click Output; then click OK.