Serverless Cobol for AWS - Quickstart

Blu Age Serverless

Thank you for your interest in Blu Age Serverless Cobol! Please follow the following steps for your trial.
If you like to dive into the full documentation, please click here.

Step 1 of 4
  1. Install VS Code

    Visual Studio Code (VS Code) -version 1.30 and above- is the Serverless COBOL IDE.
    You can download the latest version here.

  2. Install VSIX Plugin
    Visual Studio code install from VSIX

    Serverless COBOL is made available in VS Code thanks to an extension plugin provided by Blu Age.
    In order to install this plugin, please follow theses steps:

    1. Download the latest version of the plugin - 1.0.0, 13.7mo;
    2. Launch VS Code;
    3. Open the Extensions view;
    4. Click on the three dots button to open the options menu;
    5. Select “Install from VSIX…” entry;
    6. Upload the plugin and click on the “Install” button.
  3. Setup the sample project

    We prepared a sample project to let you rapidely dive into Serverless COBOL features. The following steps outline the project setup:

    1. Create a folder
    2. Download this file and copy it in the created folder.
  1. Configure the Blu Age Cobol plugin

    Undertake the following actions in order to configure the plugin:

    1. Open the “Manage” menu;
    2. Select the “Settings” option;
    3. Click on the Blu Age COBOL entry;
    4. Fill the “compiler connection” text box with the connection url provided by the Blu Age support services;
      Configure compiler
  2. Compile your Cobol project

    In order to launch the compilation of the source code:

    1. Open the cobol file (.CBL);
    2. Press [ Ctrl + Shift + p ] to open the command menu;
    3. Start typing “Blu Age COBOL compilation”, select it in the menu and press Enter.

    This compilation will generate a jar file. This later will appear in the configured target sub-folder (a bin directory by default).

  1. Create a new lambda function

    This step is fully made on your AWS account.

    1. Connect to AWS;
    2. Go to the AWS Lambda service;
    3. Click on the “Create function” button;
    4. Give a name to your function;
    5. Select “Java 8” as the Runtime to be used;
    6. Pick “Create a new role with basic Lambda permissions” for the Execution role;
    7. Click on the “Create function” button.
  2. Setup lambda function
    1. Go to the function editing page;
    2. Click on the Layer zone to make the Layer management zone visible;
    3. Press the button “Add a layer”;
      AWS Lambda set layer
    4. Select the option “Provide a layer version ARN”;
    5. In the Layer version ARN textbox, paste the layer version ARN you have been granted use permission;
    6. Click on the “Add” button;
    7. Click on the function name, to make the standard Configuration visible again;
    8. Browse to the function code section and upload the jar file generated previously;
    9. In the Handler textbox, replace the existing default value by com.netfective.blu age.GWLambdaRequestHandler::handleRequest;
    10. Set the environment variables as shown in the image below The BA_RUN_UNIT_ENTRYPOINT environment variable permits to specify the run unit program entry point;
      AWS Lambda set environment variables
    11. Scroll down the page to reach the Basic settings zone;
    12. Set the memory consumption to at least 1GB and the Timeout to 30 seconds.
      Memory consumption

    Now that all settings have been done, Scroll up the page and save all pending changes with the “Save” button.

  1. Configure test events
    1. From the test event drop down;
    2. Select the menu entry “Configure test events”;
      Test event
    3. Set the event name to “empty” for example;
    4. Set the content of the event to an empty JSON array;
    5. Click on the “Create” button.
  2. Launch test
    1. Click on “Test” button;
      Test button
    2. Inspect the execution result, to make sure the function executed successfully. The log should contain the following lines (of course timestamps will be different).

If you want to experience the Serverless Cobol

for your own Cobol source code, please feel free to contact the Blu Age Support.