LINFO() Function - License Information
Syntax
LINFO(handle,int,int{,ERR=lineref})
Description
In PRO/5 Rev. 3.10 and higher, the LINFO() function returns license information strings. The int arguments are used by LINFO() to determine which string to return. The table below describes the various license details depending on the int arguments.
Only after the program calls the LCHECKOUT()
function and receives a valid license handle can it call the LINFO() function.
The exception is that the program can call the license error message LINFO(0,3,0)
after it calls the UPDATELIC
verb.
See also LCHECKOUT() Function - Check Out License and LCHECKIN Verb - Check In License.
Arguments |
Information Returned |
---|---|
LINFO(handle,0,0) |
Total number of feature licenses for the checked out license feature referred to by handle. |
LINFO(handle,0,1) |
Number of free feature licenses available for the checked out license feature referred to by handle. |
LINFO(handle,0,2) |
In PRO/5, VPRO/5 4.10, and BBj 3.01 and higher, this function returns the expiration date for the checked out license feature referred to by handle in Julian date format (binary string). 2147483647 ($7fffffff$) indicates a permanent license. The expiration date applies to the license when it was last checked out. If the license was subsequently updated, the newer date will not be reported until the license is checked in and checked out again. |
LINFO(handle,1,0) |
Returns the feature string for the checked out license referred to by handle. |
LINFO(handle,1,1) |
Returns the version string for the checked out license referred to by handle. |
LINFO(handle,1,2) |
Returns the Serial Number as a string for the checked out license referred to by handle. |
LINFO(handle,1,3) |
Returns the string "DEMO" if the checked out license is an evaluation license. Otherwise, it returns the empty string. |
LINFO(handle,1,4) |
In BBj 9.0 and higher, returns the VendorString for the checked out license referred to by handle. |
LINFO(handle,2,int) |
Returns the handles of checked out licenses. int ranges from zero to the maximum number of licenses checked out minus 1. The value of handle can be zero or any positive integer value. |
LINFO(handle,3,0) |
Returns the last internal license error message as a string. This string changes every time an !ERROR=99 (License error) occurs. The value of handle can be zero or any positive integer value. |
Example 1
>PRINT DEC(LINFO(B,0,0))
10
>PRINT DEC(LINFO(B,0,1))
9
>PRINT LINFO(B,1,0)
ACCTRECEIVE
>PRINT LINFO(B,1,1)
1.0
Example 2
>A=LCHECKOUT("DUMMY","BAD")
!ERROR=99 (lcheckout error -5: Serial Number: BBX625068, License DUMMY does not
exist)
>PRINT LINFO(0,3,0)
lcheckout error -5: Serial Number: BBX625068, License DUMMY does not exist
Example 3
10 LET A=LCHECKOUT("FEATURE1","1.0")
20 LET B=DEC(LINFO(A,0,2))-JUL(0,0,0)
30 IF B<30 THEN PRINT "FEATURE1 will expire in",B," days"
Example 4
10 LET A=LCHECKOUT("FEATURE1","1.0")
20 LET B=DEC(LINFO(A,0,2))
30 IF B=2147483647 THEN PRINT "FEATURE1 will not expire"
30:ELSE PRINT "FEATURE1 will expire on ",DATE(B)