Create license controller configuration file

To configure the license controller to use a reserved or shared 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 configured a license reservation or share as described in Manage license reservation (flmprg) or Manage license sharing (flmprg), 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 or shared.
  • You will set an environment variable (FGLLICENSE or GRELICENSE) to your new configuration.
For reasons why you might prefer to have a separate license controller configuration file to use with reserved or shared 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 your copy fgllicense.myapp.
  2. Open your new license controller configuration file for editing.
  3. Change the configuration to use the reservation or share:
    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 configuration for the license.
      • If configuring a license reservation, under license add reservation= and the name of your reservation ("myAppReservation" in the example)
        # fgllicense.myapp
        [server]
        host=localhost
        port=6800
        
        [license]
        reservation="myAppReservation"
        
      • If configuring a license share, under license add number= and the name of your license share ("myAppShare" in the example).
        # fgllicense.myapp
        [server]
        host=localhost
        port=6800
        
        [license]
        number="myAppShare"
  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, if you saved the file in the $FGLDIR/etc directory, type one of the following commands:
      • On Linux®/UNIX™/macOS™:
        export FGLLICENSE=$FGLDIR/etc/fgllicense.myapp
      • On Windows®:
        set FGLLICENSE=%FGLDIR%\etc\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.
      The output should show one active user using the reservation or share for the license.