Create new license controller configuration file

To configure the license controller to use a reserved license for an application, create a new license controller configuration file and set an environment variable to use this configuration.

It is assumed you have reserved a license as described in Reserve licenses for an application or Reserve licenses for a group of users and that your product is configured to use the FLM server. For details of how to configure the license controller to use the FLM, see Configure a Genero license controller.

In this task:
  • You will configure a new license controller configuration file for your product and set it to use the licenses reserved for "myApp".
  • You will set an environment variable (FGLLICENSE or GRELICENSE) to your new configuration. For details of specifying a license configuration, see Specify the licensing configuration file.
For reasons why you might prefer to have a separate license controller configuration file to use with reserved licenses, see Do I need multiple license controller configuration files?.
Locate your product's license controller configuration file.
Table 1. Genero products and license configuration files
Genero product Default license controller configuration file
Genero Business Development Language (BDL) $FGLDIR/etc/fgllicense
Genero Report Engine (GRE) $GREDIR/etc/grelicense
Tip:

Default locations of the license controller configuration files are shown. You can set the location of these files by using the FGLLICENSE or GRELICENSE environment variables.

  1. On the host where the product is installed make a copy of your product's default license controller configuration file. For example, name it fgllicense.myApp.
  2. Open your new license controller configuration file for editing.
  3. Change the configuration to use the "myApp" reservation:
    1. Comment the line with the license number number=TAB#XXXXXXXX if it exists.
      An error is thrown if you configure both the license number and license reservation.
      (FLM-124): Warning, license.number and license.reservation are both configured.
      The license reservation is used and the license number is ignored.
      Check your license configuration.
    2. Add the line, reservation=myApp

      The license controller configuration file should look like this:
      [server]
      host=localhost
      port=6800
      
      [license]
      reservation=myApp
      
  4. Check that your new license configuration is taken into account at runtime.
    1. Specify the license controller configuration file to use using an environment variable.
      Open a command prompt on the host where the product is installed. Set the environment variable for the license controller.
      For example, type one of the following commands.
      • On Linux®/UNIX™/macOS™:
        export FGLLICENSE=/tmp/fgllicense.myApp
      • On Windows®:
        set FGLLICENSE=/tmp/fgllicense.myApp
    2. Run the myApp application on the host where the product is installed.
      Start an instance of the Genero Desktop Client (GDC). In the path to your application (path_to_myapp/myApp) run the command fglrun myApp.42m
      The application should launch without error messages.
    3. At the command line on the host where the FLM is installed type the command flmprg -a info users to check the active users while the application is running.
      License      : TAB#XXXXXXX
      License key  : BBBBBBBBBBB
      Product      : Four Js Universal Compiler
      Type         : Development version
      Users        : 0/75
      
      
      Reservation  : myApp
      License      : TAB#XXXXXXXX
      Users        : 1/10
      Host         : amon
          FrontEndId2 {7206b94c-9225-4dcd-acdd-4751d5d43f9d}
              GUI Server amon:0 - Process Id 587639
                  creation-date: 2022/09/07 14:42:39
                  ping-date: 2022/09/07 14:44:46
                  app-id: {4461b507-4b66-869f-2ba9-37d0fb9c5579}
                  user-name: jdoe
                  host-addr: 127.0.1.1
                  host-name: amon
      The application should show one active reserved user (myApp) over the max reserved users allowed for the license; Users : 1/10 in the sample output above.