Preparing a COBOL Application for Microsoft Azure

Before creating your COBOL cloud service, you need to decide on the structure of the solution, its projects, its roles and any existing COBOL code. You also need to decide how to handle your data, as blobs, table storage, Azure SQL Database or Azure Files, and whether you can use queues.

Solution, Project and Roles Structure

You can structure your solution with multiple projects and then add references to those projects in the required roles (see the project's References).

Your Microsoft Azure service can have one or more web and worker roles. These roles can interact with the run-time system environment by using the Microsoft Azure Managed API. The bulk of your existing source code and business logic probably belongs in one or more separate projects in the solution. Some of the code might belong in the web or worker roles projects.

The solution can include the following:

  • Web roles. Use these for the user interface, for interaction with the user and to pass data to and from the user.
  • Worker roles. Use these for general development tasks, such as background processing for a web role. The worker role can interact between the web role and any business logic in other projects that aren't role based.
  • Projects that are not part of any role. Use these for business logic and potentially existing code that does not need to change.

You need to identify any existing COBOL code that is restricted to native COBOL and migrate it so that it can be built as .NET COBOL code.

Data Storage

You can handle your data using BLOBs, table storage, queues, or Azure SQL Database.

To handle queues, you might need code to:

  • Create request/response queues
  • Add info to queues and send requests
  • Receive the response from the queue and pass it back to the business logic

To handle table storage, you might need code to:

  • Create the table context
  • Initialize the table
  • Get a queryable object
  • Handle the table data