SERIAL

Return the registration string of the license server

WTSupported in traditional Synergy on Windows

 

USupported on UNIX

 

xcall SERIAL(number)

Arguments

number

The variable that will be loaded with the registration string of the license server. (a)

Discussion

The SERIAL subroutine returns the registration string of the license server. On Windows, this could be the system that the application is running on (if it has stand-alone [local] licensing), or it could be the license server (if the system is a license client).

As of Synergy/DE 11, the registration string is 31 characters long. If number is shorter than 31 characters, the data is truncated. If number is longer than 31 characters, the data is loaded left-justified over blanks. (Note that pre-version 11 systems without REV11 licensing will return shorter registration strings.)

If you want to format the registration string with hyphens for display purposes, see the example below.

Examples

The following subroutine displays an application time-out message and instructs the user to call his or her developer for help.

subroutine timeout
    a_dev       ,a              ;Developer to call
    a_phone     ,a              ;Phone number to call
.include "DEF:workvar.def"      ;Include terminal channel number: TTCHN
literal msg
    msg         ,a*,    "Your system has expired. Call "
    at          ,a*,    " at "
    ser         ,a*,    ". Your registration string is: "
record
    rstr        ,a35            ;Formatted string #######-#######-#######-#######-###
    reg         ,a31            ;Registration string
proc
    xcall serial(reg)
    xcall s_bld(rstr,,"%a-%a-%a-%a-%a",reg(1:7),reg(8:7),reg(15:7),reg(22:7),reg(29:3))
    display(TTCHN, msg, a_dev, at, a_phone, ser, rstr)
    xcall cleanup               ;Clean up files, etc.
    xreturn
endsubroutine