For this topic’s original documentation, see STBL Formats.
In BBj 6.0 and higher, !COMPAT entries enable fine-grained control over compatibility options in BBj. This allows BASIS to change the default behavior of BBj when required while still allowing legacy code to run. !COMPAT entries always default to the value "false" and can be enabled at runtime or in the config.bbx.
The following !COMPAT keys are currently recognized:
|
Key |
Effect on program |
|
LEGACY_POPUP_IDS |
In BBj 8.0 and higher, the BBjPopupMenu method getID() returns a unique number for each popup. Setting this options restores the original behavior which results in multiple Popups having the same getID() value. |
|
LEGACY_TYPECHECK |
In BBj 6.0 and higher, the BBjAPI function, uses of the "new" operator, and static method calls have a statically determined type. This option disables static type checking on these language features. |
Print the current compatibility options:
> PRINT STBL("!COMPAT")
LEGACY_TYPECHECK=FALSE
>
Print a specific compatibility option:
> PRINT STBL("!COMPAT", "LEGACY_TYPECHECK")
LEGACY_TYPECHECK=FALSE
Set a specific compatibility option:
> PRINT STBL("!COMPAT", "LEGACY_TYPECHECK=TRUE")
LEGACY_TYPECHECK=TRUE
>
The !CONEXIT entry activates the console lock subsystem.
The !CONMESS entry defines the message to be given when prompting for a password.
The !CONPASS entry defines an application password before allowing the user to work in console mode. Note that "RELEASE" will always cause the application to exit BBj and [ENTER] will always perform a RETRY.
The !CONRETRY entry defines a timeout value in seconds. If nothing is entered before this number of seconds has elapsed, BBj performs a RETRY. This is useful for handling temporary error conditions (e.g. locked records).
The interaction of the global strings is as follows:
|
!CONEXIT |
!CONMESS |
!CONPASS |
Behavior |
|
set |
not set |
not set |
BBj waits for the user to press the <ENTER> key before exiting. The user cannot go to console mode. When !CONRETRY is set, BBj does a RETRY if nothing is entered within the specified number of seconds. |
|
set |
set |
not set |
BBj displays the message specified by !CONMESS and then waits for the user to press the <ENTER> key before exiting. The user cannot go to console mode. When !CONRETRY is set, BBj does a RETRY if nothing is entered within the specified number of seconds. |
|
set |
not set |
set |
BBj displays the message: "Enter password for debug mode or RELEASE to exit or [ENTER] to retry." The user can either enter the password or type "RELEASE" to exit BBj. If the user presses the <ENTER> key, the message is redisplayed. When !CONRETRY is set, BBj does a RETRY if nothing is entered within the specified number of seconds. |
|
set |
set |
set |
The message specified by !CONMESS is displayed and BBj waits for the user to either enter the password to enter console mode or type "RELEASE" to exit BBj. If the user presses the <ENTER> key the message is redisplayed. When !CONRETRY is set, BBj does a RETRY if nothing is entered within the specified number of seconds. |
|
not set |
either |
either |
No effect if !CONEXIT is not set. |
BBj does not use the !CTYPE string. BBj uses internal Java functions to determine if characters are uppercase, lowercase, digits, whitespace, or punctuation.
The contents of STBL("!DATE") are automatically updated whenever STBL("!LOCALE") is changed.
The !DSUDDB (Data Server User Definable Data Block) entry contains the username and password entered by the user when user authentication is turned on. The resultant string is in the user=xxx, passwd=yyy. For more information, see BBj User Authentication.
The INPUTD control uses the following function:
|
Function Name |
Value |
Default Character |
|
Popup Calendar |
85 |
^P |
BBj uses the !LOCALE string to allow for various internationalization features. See the following for details:
BBjInputD Control
The !LOCALES string contains a linefeed-delimited list of all available locale codes.
In BBj 6.0 and higher, !OPTION values manipulate the binary values that affect the way programs execute. Use !OPTION values in lieu of adding more SETOPTS bits.
The following !IOPTION keys are currently recognized
|
Key |
Effect on program |
Default value |
|
THROW_UNWINDS |
Causes THROW to unwind the program stack in search of an error handler, even if Drop to Console is allowed in public program. |
True |
|
ERROR_UNWINDS |
Causes program errors to unwind the program stack in search of an error handler, even if Drop to Console is allowed in public program |
False |
The following !IRULES flags are defined for use by the INPUTD mnemonic and INPUTD control:
|
Flag Bit |
Effect on Input if Bit is Set |
|
$10$ |
Causes the popup calendar to include a column showing week number in the year. |
|
$20$ |
In BBj 5.0 and higher, causes the INPUTD control to use +/- to scan dates instead of up/down arrow. |
|
$80$ |
Causes the system to beep upon input entry that does not correspond to a valid date. |
The !SHELL string returns the name of the current command shell and the !C string returns the option string (either "-c" or "/c") used to pass parameters to that shell. These strings can be used to pass commands to the system command shell. For example:
0010 tempfile$=env("TEMP")+"/"+info(3,2)+str(dec(info(3,0)))+".tmp"
0020 print scall("dir > "+tempfile$)
0030 print scall(stbl("!SHELL")+" "+STBL("!C")+" dir > "+tempfile$)
0040 tempfile=unt
0050 open (tempfile)tempfile$
The !YYDATE string defines the rules for interpreting 2-digit years (e.g. "03") in INPUTD mnemonics and controls. The allowable formats are as follows:
|
Example |
Definition |
|
=, =0 |
Causes 2-digit years to be interpreted as being in the current century. |
|
=20 |
Causes 2-digit years to be interpreted as being in the specified century. For example, =19 would cause 2-digit years to be interpreted as being in the 20th century. |
|
=2000, =1970 |
Causes 2-digit years to be interpreted as being from the specified year through year+99. For example, =2000 is equivalent to =20; it defines a range of 2000..2099. =1970 defines a range of 1970..2069. |
|
-50, 50 |
Causes 2-digit years to be interpreted as being in the range from (current year - 50) to (current year + 49). In 2003, 2-digit years would be interpreted as being in the range 1953..2052. This is the default rule. |
|
+20 |
Causes 2-digit years to be interpreted as being in the range from (current year - 79) to (current year + 20). In 2003, 2-digit years would be interpreted as being in the range 1924..2023. |