STBL Formats - BBj

BBj-Specific Information

For this topic's original documentation, see STBL Formats.

!CHROMIUM_DIR

!CHROMIUM_SWITCHES

!COMPAT

!CONEXIT

!CONMESS

!CONPASS

!CONRETRY

!COOKIE_PATH

!CTYPE

!DATE

!DISALLOW_CONSOLE_MESSAGE

!DISALLOW_CONSOLE_TITLE

!DSUDDB

!EDIT 

!ERROR_HANDLER

!ESCAPE_HANDLER

!IRULES

!LIST_PAGE_SIZE

!LISTSEARCH

!LOCALE

!LOCALES

!MACROS

!MSGBOX_SPLIT

!OPTIONS

!PROMPT_SPLIT

!SAME_SITE

!SESSIONINFO

!SHELL and !C

!THROWERROR

!TIME

!UMASK

!UNT_START

!USER_PROPERTIES

!YYDATE

STBL("!CHROMIUM_DIR")

In BBj 20.30 and higher, the STBL("!CHROMIUM_DIR") string can specify a preferred client-side directory to extract the Chromium binaries. This can be particularly useful in a BBj environment that runs concurrent thin client sessions against multiple servers, where it may be necessary to specify a different Chromium directory for each server. When using this setting, you should also include the BBj version somewhere in the directory name, for example:

userhome! = System@.getProperty("user.home")
server$ = bbjapi().getInterpreterServer().getServerName()
version! = bbjapi().getInterpreterServer().getServerBBjVersion()
version$ = version!.replace("REV ","-bbj-")
chromium_dir$ = userhome! + "/chromium-" + server$ + version$
print stbl("!CHROMIUM_DIR",chromium_dir$)

STBL("!CHROMIUM_SWITCHES")

In BBj 19.10 and higher, the STBL("!CHROMIUM_SWITCHES") string can specify an arbitrary number of space-delimited Chromium command-line switches (e.g. "--remote-debugging-port=9223 --lang=de"). These switches are passed on to CHROMIUM_HTMLEDIT BBjHtmlEdit and CHROMIUM_HTMLVIEW BBjHtmlView clients.

In BBj 22.13 and higher, the following BBj-specific switches can be specified in this string:

--bbj-save-password={save|never|ignore}

--bbj-update-password={update|ignore}

For more information, see: Passwords.

STBL("!COMPAT")

In BBj 6.00 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 unchanged. !COMPAT entries usually default to the value "FALSE" and can be enabled at runtime or in the config.bbx file. Use a comma separated list to set more than one compatibility setting.

The following !COMPAT keys are currently recognized:

Key

Effect on program

BBj Version

ALLOW_DECIMAL_COMMA

When processing numeric input with INPUT X, and when converting a string to a number with NUM("123.45"), BBj only recognizes "." as the decimal separator. Many countries use "," as the decimal separator, with keyboards configured for that preference.

Set this option to TRUE to have the INPUT verb and NUM() function accept both "." and "," as valid decimal separators.

BBj 19.00

ALLOW_DUPLICATE_CALL_VARS

The BBx CALL Verb documentation says, "The same call-by-reference argument can only appear once in the argument list." Prior to BBj 16.0, BBj inadvertently did not enforce this rule. This oversight was corrected in BBj 16.0, but some applications may include code that violates this rule.

If updating the application is impractical, set this option to TRUE in BBj 17.0 and higher to allow the original more lenient BBj behavior.

BBj 17.00

ALLOW_DUPLICATE_ENTER_VARS

The BBx ENTER Verb documentation says, "The same simple variable cannot appear more than once in an ENTER statement." Prior to BBj 16.0, BBj inadvertently did not enforce this rule. This oversight was corrected in BBj 16.0, but some applications may include code that violates this rule.

If updating the application is impractical, set this option to TRUE in BBj 17.0 and higher to allow the original more lenient BBj behavior.

BBj 17.00

BACKCOLOR_SETS_OPAQUE

In BBj 18.20 and higher, BBjControlsetBackColor and setOpaque are completely independent of each other. In previous versions of BBj, setBackColor automatically called setOpaque(true).

Set this option to "TRUE" to reinstate the original behavior.

BBj 18.20

CEDIT_BORDER

In BBj 10.0 and higher, the BBjCEdit honors the documented $0004$ flag ("Draws a border around the control"). This flag was previously ignored, so existing applications usually don't set it, even if they do want borders.

Set this option to "TRUE" to continue to show borders around all CEDIT controls, regardless of the state of the $0004$ flag.

BBj 10.00

DISABLE_SHIFT_INSERT

Some platforms, including Microsoft Windows, bind the PASTE function to both Ctrl+V and Shift+Insert.

Set this option to "TRUE" to not accept Shift+Insert as a keyboard shortcut for the PASTE function.

BBj 19.00

GRID_LEGACY_COL_HEADER

In BBj 12.0 and higher, setting the LEGACY_GRID_COL_HEADER option to True will cause the ColumnHeader cells to be rendered as they were prior to 11.10.

In BBj 11.0 and higher, the ColumnHeader cells are rendered by default using the native renderer which changes the appearance depending on the current LookAndFeel. This has sometimes been referred to as rendering with a ‘3D look’.  

Prior to BBj 11.0, grid ColumnHeader cells were rendered by default with a beveled edge.

BBj 12.00

GRID_LEGACY_EDIT_TAB

When the grid backwards compatibility SETOPTS bit is also set, this option disables the default BBj behavior of ending edit and navigating to the next cell when pressing TAB in edit mode in a grid cell.

BBj 11.00

GRID_LEGACY_SENDMSG_79

Setting this option will enable the following behavior for consistency with Visual PRO/5:

  1. Set Edit Mask (Grid SENDMSG 79) saves the mask internally, but does not use it to set the column style. In display mode, the column style is set to GRID_STYLE_INPUTE with a mask of FILL(255,"X").

  2. When going into input mode (Grid SENDMSG 31), the mask previously set with SENDMSG 79 is used if the edit parameters don't specify a different mask. This can cause the cell style to temporarily change to INPUTN or INPUTD, depending on the mask format.

  3. When leaving edit mode, the cell style reverts to GRID_STYLE_INPUTE, with a mask of FILL(255,"X"). This enables the application to render the cell in a format that may be illegal for the mask used in edit mode.

BBj 11.00

GROUP_MODAL_DIALOGS    

As of BBj 7.0, the behavior of dialogs such as the ones created by MSGBOX(), FILEOPEN()/FILESAVE(), etc. is to only be modal over the windows of the current interpreter.

Set this option to "TRUE" to cause dialogs to be modal over all other windows on the client.

BBj 7.00

IGNORE_ADDR_DROP

The BBj program cache has always automatically added and dropped programs as needed; explicitly adding and dropping programs is no longer necessary, and can interfere with the automatic caching.

Setting this option to TRUE will cause BBj to ignore the ADDR and DROP verbs. After setting this option to TRUE, legacy applications should be carefully tested to ensure that they don't include assumptions about the values returned by the PUB() function.

BBj 20.00

IMAGECTRL_DISABLEABLE

By default, the BBjImageCtrl is visually identical when it's enabled or disabled. Set this flag to TRUE to change that default, such that a disabled BBjImageCtrl is grayed out like other BBjControls. See also BBjImageCtrl::setDisableable.

BBj 15.00

INCONSISTENT_HTML_FONTS

As of BBj 8.0, HTML in GUI controls implements the W3C standard for units such as 'em', 'px', and 'pt'. It also applies scaling factors from the SCALE mnemonic and the SYSGUI DPI mode.

Setting this to "TRUE" before creating a BBjTopLevelWindow will cause GUI controls on that top level window to ignore these settings when applying HTML content.

BBj 8.00

INPUTN_MASK_ROUNDING

The INPUTN documentation says that the mask "uses standard PRO/5 numeric mask conventions and provides a check for the data." This is accurate, but incomplete. When the control is programmatically set to a value that exceeds the mask precision, the value is truncated, not rounded. For example, if the mask is "###,###,##0.00-", then programmatically setting the control value to -12345.6789 will cause it to display "12,345.67-", the same value that it would show if the user attempted to type those characters directly into the control. This differs from the standard Numeric Output rules, which would round to "12,345.68-".

Setting this option to "TRUE" will cause the INPUTN (and INPUTN-style grid cells) to round values that exceed the mask precision, consistent with standard numeric output rules.

BBj 18.00

INPUTN_LOCAL_DECIMAL

By default, BBjInputN getText() and the equivalent CTRL(1) always return a string that can be directly passed to the NUM() function. This differs from the Visual PRO/5 INPUTN control, which returns a string that uses the localized decimal separator.

Set this option to TRUE to implement the Visual PRO/5 behavior. When this option is used, the application will typically use CVS(64) to convert the string to a format that can be passed to the NUM() function.

BBj 18.00

JAVA_CVS

By default, the BBj CVS() function, like the original PRO/5 version, refers to the !CTYPE string to determine character types.

If this option is set to TRUE, BBj uses internal Java functions to determine if characters are uppercase, lowercase, digits, whitespace, or punctuation.

 

LEGACY_CHN_LIMIT

Set this option to TRUE to limit OPEN and SELECT channel numbers to values of 32767 or less.

BBj 14.00
LEGACY_FONTS Set this option to TRUE to have the DWC client scale control fonts like the BUI client. BBj 21.10

LEGACY_LIST_OPEN_WIDTH

Setting this option to TRUE will default the open (dropdown) width of BBjListButton and BBjListEdit controls to the control width, truncating any list items that exceed the width of the control. This is equivalent to directly invoking the BBjListButton::setOpenWidth or BBjListEdit::setOpenWidth method.

BBj 20.00

LEGACY_POPUP_IDS

In BBj 8.0 and higher, the BBjPopupMenu method getID() returns a unique number for each popup.

Setting this option to TRUE restores the original behavior, which results in multiple Popups having the same getID() value.

BBj 8.00

LEGACY_SCAN_MODE

When searching for a file in Windows, BBj defaults to the same rules as Visual PRO/5; if a disk (e.g., C:) is specified, it only looks for the file on that disk. Earlier versions of BBj would check for the file on all available disks, even if the filename specified a particular disk.

This option can be set to TRUE to revert to the original BBj behavior of checking all disks.

BBj 14.00

LEGACY_SQLCHN_LIMIT

This option can be set to TRUE to limit SQLOPEN channel numbers to values of 32767 or less.

BBj 14.00

LEGACY_SUBSTRING_LENGTH

This option can be set to TRUE to make substring references with a negative length throw !ERROR=47 for compatibility with PRO/5. By default, BBj considers X$(pos,-1) to be equivalent to X$(pos), returning the substring from pos through the end of the string.

BBj 14.00

LEGACY_TYPECHECK

In BBj 6.0 and higher, for 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.

Setting this STBL entry affects how BBj resolves references to the return values of certain method calls.

Use LEGACY_TYPECHECK to cause BBj to dynamically resolve the types of return values from both 'static' Java method calls and the BBjAPI() function.

Note that BBj also dynamically resolves every expression involving such a return value. The results of those expressions are not compatible with statically resolved expressions and attempting to mix dynamically resolved expressions with statically resolved expressions may cause an !ERROR=26. Statically resolved expressions include variables listed in a DECLARE statement or a FIELD statement and in the argument position of a method call on a statically resolved expression. Assignments from a dynamically resolved expression to any statically resolved variables will also fail with an !ERROR=26.

Many utility programs included with BBj use DECLARE and FIELD, and are therefore incompatible with this option.

BBj optimizes method calls on statically resolved expressions by caching the target method. BBj must look up the target method of a method call on a dynamically resolved expression each time the program invokes the method. Setting LEGACY_TYPECHECK significantly increases the number of dynamically resolved expressions in many programs and may negatively impact performance.

BBj 6.00

LEGACY_WINDOW_POSITION

Set this option to TRUE to position windows according to the documented Visual PRO/5 rules ("The x,y,w,h bounding rectangle of a window describes the location of the inside (the usable drawing area or client area) of the window. Note that if a window is placed at (0,0), the title bar will not be visible."). By default, BBj positions windows according to the rules defined by Java and the host operating system. This might differ from Visual PRO/5 by 20-30 pixels vertically and several pixels horizontally.

BBj 15.00

LISTBUTTON_AUTO_SELECT

Set this option to TRUE to select the Visual PRO/5 default behavior of auto-selecting index 0 when items are added to a previously empty BBjListButton. The default behavior is to not auto-select index 0.

BBj 13.00

LISTBUTTON_DESELECT

Native-style BUI LISTBUTTON controls don't honor the deselect() method. Applications that depend on this method should set this option to TRUE. This option has no effect in GUI.

BBj 10.00

LISTBUTTON_SELECT

Set this option to TRUE to auto-select index 0 when creating a non-empty BBjListButton. The default behavior is to not auto-select index 0 on creation.

BBj 13.01

MNEMONIC_INT_ROUNDING

Set this option to TRUE to allow non-integer values in the @(x) and @(x,y) mnemonics. By default, passing a non-integer value to the @() mnemonics throws !ERROR=41. When this option is set to TRUE, the @() mnemonics will accept non-integer values, rounding to the nearest integer. In this mode, PRINT @(25.5) is interpreted as PRINT @(26), and PRINT @(10.4,11.5) is interpreted as PRINT @(10,12).

BBj 14.00

MENUBUTTON_FOCUSABLE

Applications that require menu buttons to be focusable should set this option to TRUE.

BBj 15.00

MENUBUTTON_TAB_TRAVERSABLE

Applications that require menu buttons to be tab-traversable should set this option to TRUE.

BBj 15.00

OPENBASIC_ARRAY47

Setting this option to TRUE enables an OpenBASIC compatibility setting to not report !ERROR=47 for substring out of bounds errors on empty array elements (i.e. array elements equal to "").

BBj 15.00

PRESERVE_TABCTRL_SIZE

Setting this option to TRUE preserves the original size of controls added to a BBjTabCtrl. By default, controls are resized to take the full available width and height within the BBjTabCtrl client area.

BBj 17.00

RADIOBUTTON_SELECT

Setting this option to TRUE causes radio buttons to be selected when they gain focus for any reason.

By default, radio buttons are not automatically selected when they gain focus programmatically or by user keyboard operation (TAB or LEFT,  RIGHT, UP, DOWN arrows within a group).

BBj 16.00

RCLICKTOOLBUTTON

With this option set, TBUTTON controls fire ON_TOOL_BUTTON_PUSH (event 'b') with event.flags bit 1 set when the right mouse button is clicked.

 

RENUM_WHEN_ADDING_LINE_NUMBERS

Causes the RENUM verb to also process renumbering commands embedded in REM statements when adding line numbers to a program that didn't originally include line numbers.

BBj 19.01
SHORT_YEAR The date information in STBL("!DATE") is updated to localized values when STBL("!LOCALE") is set. In BBj 23.06 and higher, the localized date mask in STBL("!DATE") defaults to a four-digit year. Applications that prefer to use a two-digit year in locales that normally default to a two-digit year should set this option to TRUE. BBj 23.06

TBUTTON_FOCUSABLE

Applications that require toolbuttons to be focusable should set this option to TRUE.

BBj 11.00

TBUTTON_TAB_TRAVERSABLE

Applications that require toolbuttons to be tab-traversable should set this option to TRUE.

BBj 11.00

THOROUGHBRED_IF47

This option enables IF47 emulation for Thoroughbred Basic conversions. In this emulation mode, substring references in an IF condition that would normally generate !ERROR=47 are instead evaluated to "". For example:

compat$ = stbl("!COMPAT","THOROUGHBRED_IF47=TRUE")
let x$ = ""
if x$(10,10) = "" then print "if47"
if len(cvs(x$(10,10),3)) = 0 then print "if47"

BBj 15.00
TRACE_CASE

For compatibility with PRO/5, BBj has never included CASE statements in SETTRACE output.

When this option is set to TRUE, CASE statements will be included in SETTRACE output.

BBj 22.00
TRACE_JAVA When this option is set to TRUE, Java field and method details will be included in SETTRACE output with >JAVA:. BBj 22.00

UPDATE_TEXT_HOTKEYS

By default, only the initial value of a static text control determines the hotkey, as described under "Hot Keys."

When this option is set to TRUE, the hotkey resets whenever the text changes.

 
USE_PDF_MARGINS

By default, BBjAPI::getBBjPDFForm sets the PDF margins to 0.25 inches all around, or to the values defined by the MediaPrintableArea, if specified.

When this option is set to FALSE (unlike most !COMPAT values, it defaults to TRUE), the PDF margins are set to 0 all around.

BBj 11.01
USE_PREVIOUS_BBJ_SAVEP_FORMAT

In order to enable a smooth transition, in BBj 18.20 and above, BBj can SAVEP programs using the previous SAVEP format by setting an STBL:

A$=STBL("!USE_PREVIOUS_BBJ_SAVEP_FORMAT","true")

This will tell BBj to SAVEP using the previous SAVEP format as well as SAVE programs already using the previous SAVEP format without converting them to the current SAVEP format. For security, programs already in the current SAVEP format cannot be converted to the previous format.

This is intended to be a temporary measure, since previous SAVEP formats will always be less secure due to the fact that the SAVEP format only changes in order to improve security.

Although a program can be saved using the previous SAVEP format, it may not run correctly in a previous version of BBj. Different versions of BBj have both major and minor changes in functionality that might prevent a program from running correctly even if a previous version is able to load it.

BBj 18.20

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
>

STBL("!CONEXIT")

The !CONEXIT entry activates the console lock subsystem.

STBL("!CONMESS")

The !CONMESS entry defines the message to be given when prompting for a password.

STBL("!CONPASS")

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.

STBL("!CONRETRY")

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.

BUI logoDWC logoSTBL("!COOKIE_PATH")

When a BUI or DWC application creates a browser cookie with BBjThinClient, setUserProperty, or setUserProperties, the cookie path attribute defaults to window.location.pathname. Some applications might want more control over the path attribute. In BBj 22.00 and higher, STBL("!COOKIE_PATH") can be used to specify the path value for any cookies created with BBjThinClient, setUserProperty, or setUserProperties.

STBL("!CTYPE")

The PRO/5 !CTYPE string is hard-coded to use American English conventions, but BBj initializes it based on the current character set and locale. By default, the BBj CVS() function, like the PRO/5 version, refers to the !CTYPE string to determine character types. If the JAVA_CVS !COMPAT setting is set to TRUE, BBj uses internal Java functions to determine if characters are uppercase, lowercase, digits, whitespace, or punctuation.

STBL("!DATE")

The contents of STBL("!DATE") are automatically updated whenever STBL("!LOCALE") is changed.

STBL("!DISALLOW_CONSOLE_MESSAGE"), STBL("!DISALLOW_CONSOLE_TITLE")  

If console access is disabled, BBj shows the user a dialogue when the program attempts to drop to console. By default, the title of that dialogue is "Thin Client Console Error", and the message is "Program attempted to break to console, which is not allowed by the server. This program will now terminate." To customize those messages in BBj 15.0 and higher, set these STBL strings in the config.bbx file. For example:

SET !DISALLOW_CONSOLE_TITLE=No soup for you.

SET !DISALLOW_CONSOLE_MESSAGE=Go away!

STBL("!DSUDDB")

The !DSUDDB (Data Server User Definable Data Block) entry contains the user name 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.

STBL("!EDIT")

Function Name

Value

Default Character

Show Date (INPUTD) or

Time (INPUTT) Picker

85

^P

Select All

86


STBL("!ERROR_HANDLER")

In BBj 17.0 and higher, the !ERROR_HANDLER string specifies a BBj program to CALL in the event of an otherwise untrapped error. EXIT from the error handler program returns to the statement that triggered the original error.

Error Handler Pt. 1

rem ' error_handler.txt

label:
level = tcb(13) - 1
pgm$ = pgm(-1,level)
line = tcb(5,level)
line$ = pgm(line,level)
print "Error at line",line," in ",pgm$," level",level,":"
print line$
print errmes(-1),err
errinfo! = bbjapi().getErrorInfo(level)
print errinfo!
input "Enter password (xyzzy) to clear !ERROR_HANDLER: ",x$
if cvs(x$,8)="xyzzy" then print stbl("!CLEAR","!ERROR_HANDLER")
exit

Error Handler Pt. 2

rem ' error_handler_sample.txt

print stbl("!ERROR_HANDLER","error_handler.txt")
reset
print 'lf',"this should return the default value of 0:"
print "neval(""1/0"",0)=",
print neval("1/0",0)
print errmes(-1),err
reset
print 'lf',"this should take the err= branch:"
print "neval(""1/0"",err=*next)=",
print neval("1/0",err=*next)
print errmes(-1),err
reset
print 'lf',"this should punt to the !ERROR_HANDLER:"
print "neval(""1/0"")=",
print neval("1/0")
print errmes(-1),err

STBL("!ESCAPE_HANDLER")

In BBj 17.00 and higher, the !ESCAPE_HANDLER string specifies a BBj program to CALL in the event of an otherwise untrapped escape. EXIT from the escape handler program returns to the statement that was being executed at the time of the original escape.

STBL("!IRULES")

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.

STBL("!LIST_PAGE_SIZE")

By default, BBj immediately populates BUI list controls (BBjListBox, BBjListButton, BBjListEdit) with all items sent by the program. With very large lists containing many hundreds or thousands of items, this can take a bit of time. In BBj 13.0 and higher, the list controls can be configured to preload a smaller number of items. For example:

listpagesize$ = stbl("!LIST_PAGE_SIZE","16")

This example tells the BUI list controls to preload only 16 elements, then add more as the user scrolls. If this STBL isn't defined, or if it's set to "0", the BUI list controls to work they way they always have (preload the entire list).

!LIST_PAGE_SIZE doesn't apply to GUI, and it doesn't apply to the native versions of the BUI list controls.

STBL("!LISTSEARCH")

In BBj 5.00 and higher, typing into a BBjListButton control accumulates keystrokes entered within a specified number of milliseconds into a typeahead buffer. This allows the user, for example, to jump directly to New York in a list of all 50 states by typing "NY". Without this typeahead buffer, the user would have to press "N" eight times to skip past the other state codes beginning with "N." The default time window for this feature is 1000 milliseconds (1 second). The !LISTSEARCH global overrides that timeout value; a setting of zero effectively disables this buffer.

STBL("!LOCALE")

BBj uses the !LOCALE string to allow for various internationalization features. See the following for details:

Numeric Output - BBj

DATE Function - BBj

INPUTD Mnemonic

BBjInputD Control

STBL("!LOCALES")

The !LOCALES string contains a linefeed-delimited list of all available locale codes.

STBL("!MACROS", macrodeflist) 

In BBj 7.00 and higher, ("!MACROS", macrodeflist) allows developers to install macros that can be used to implement common commands at a BBj console. The syntax for a macrodeflist is macrodef[ + $00$ + macrodef ... ]. The syntax for an individual macrodef is "macroname=macrovalue". A macroname must start with a letter and may contain only letters, numbers or an underscore (_). A macrovalue can contain any text. If macrovalue is an empty string, the call to STBL will delete that macro. If the macrodeflist is an empty string, STBL will delete all macros.

When a macro is defined, BBj will search any text typed at a READY prompt and replace instances of a defined macroname with the macrovalue, ignoring the case of the macroname. A macro replacement will not occur within a literal string on the console, e.g., "macroname" will not be replaced. Only whole words will be considered for replacement, however, note that variable names will be replaced in general.

Examples

> dummy$ = STBL("!MACROS", "sysout=System.out.println" + $00$ + "syserr=System.err.println")

> sysout("Informational message")

> syserr("Error message")

>

 

> dummy$ = STBL("!MACROS", "lsit=list")

> LSIT

...

>

 

> dummy$ = STBL("!MACROS", "hello=print")

> hello "hello, world"

hello, world

>

 

> dummy$ = STBL("!MACROS", "pr=print record(log)")

> string "prog.log"; log=unt; open(log)"prog.log"

> pr "hello, world"

> pr = 10

!ERROR=20  (Syntax Error: print record(log) = 10)

> pr$ = "hello"

!ERROR=20  (Syntax Error: print record(log)$ = "hello")

>

STBL("!MSGBOX_SPLIT")

In BBj 14.00 and higher, the !MSGBOX_SPLIT string can be set to an integer value to break long MSGBOX() message text into chunks of a selected width.

STBL("!OPTIONS")

In BBj 6.00 and higher, values manipulate the binary values that affect the way programs execute.

The following !OPTIONS keys are currently recognized:

Key

Default value

BBj Version

Effect on program

_PERSIST_CLEAR

False

BBj 16.00

Setting this option to TRUE causes the CLEAR and BEGIN verbs to not clear variables that have names starting with underscore ("_").

_PERSIST_CLEAR_EXCEPT

False

BBj 16.00

Setting this option to TRUE causes the CLEAR EXCEPT and BEGIN EXCEPT verbs to not clear variables that have names starting with underscore ("_").

CHROMIUM_HTMLEDIT

True

BBj 19.00

Setting this option to TRUE makes the BBjHtmlEdit control use a Chromium engine (if available). In this configuration, the BBjHtmlEdit is based on an embedded Chromium web browser.

Access to this feature requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line.

CHROMIUM_HTMLVIEW

True

BBj 19.00

Setting this option to TRUE makes the BBjHtmlView control use a Chromium engine (if available). In this configuration, the BBjHtmlView is an embedded Chromium web browser, with support for HTML5, CSS, and JavaScript.

Access to this feature requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line.

CKEDITOR_HTMLEDIT False BBj 23.00 BUI logoDWC logoIn BBj 23.00 and higher, the default editor component for the BUI and DWC browser clients is TinyMCE. Setting this option to TRUE makes the BBjHtmlEdit control in the BUI and DWC browser clients use the original CKEditor 4 editor component. This is a temporary convenience; CKEditor 4 is no longer supported as of June 2023.

CONSOLE_PROGRAM_MODIFIED

False

BBj 16.00

Setting this option to TRUE causes the console prompt to change from ">" to "*>" when a program loaded from disk has been modified but not saved.

CONSOLE_PROGRAM_SHORT_NAME

False

BBj 19.00

Setting this option to TRUE causes the console prompt in called programs and custom object method calls to always show the short name of the program.

ERROR_UNWINDS

False

 

Causes program errors to unwind the program stack in search of an error handler, even if Drop to Console is allowed in public program.

ESCAPE_UNWINDS

False

BBj 17.00

Setting this option to TRUE causes ESCAPE (!ERROR=127) to unwind the program stack in search of a SETESC handler, even if drop to console is allowed in public programs.

EXECUTE_CALLED_PROGRAM

False

BBj 14.00

Setting this option to TRUE causes the EXECUTE verb to apply to the current program level, which can be a called program. By default, when this option is set to FALSE, the EXECUTE verb always applies to the level 0 (workspace) program.

FAST_TOUCH_CLICK

False

BBj 13.00

Mobile touch-oriented browsers (e.g. Mobile Safari in iOS, Chrome in Android) wait for 300 milliseconds after the user taps an element before generating a click event. This delay makes applications feel sluggish when the user tries to click on multiple buttons in rapid sequence, a process that can be common in applications like phone dialers.

Setting this option to TRUE causes BUI buttons, toolbuttons and menubuttons on iOS and Android to report ON_BUTTON_PUSH or ON_TOOL_BUTTON_PUSH immediately when the user touches and releases their finger from a button. This improves the responsiveness for those events, but introduces some side effects that the developer should be aware of. Because BUI is handling touch events on these buttons, normal double-tap and pinch-zoom gestures don't work. And because BUI is reporting the ON_BUTTON_PUSH event immediately, it appears in the event stream before the button reports gaining focus. Some applications are sensitive to precise sequence of events.

In BBj 14.0 and higher, this option is also applicable to BUI navigator controls on iOS and Android (ON_NAV_FIRST, ON_NAV_PREVIOUS, ON_NAV_NEXT, ON_NAV_LAST).

FULL_WIDTH_TITLE

BUI logo

False

BBj 16.00

Setting this option to TRUE expands the title bar tab of BUI windows docked to the top of the browser to take up the full defined width of the window.  By default, the BUI window title bar tab is just wide enough to contain the title text and any minimize, maximize, and close buttons.

HTMLVIEW_INTERNAL_TABS

BUI logo

False

BBj 20.00

Setting this option to TRUE causes the BUI BBjHtmlView control to internally manage TAB and SHIFT+TAB keyboard navigation. By default, BUI takes control of TAB and SHIFT+TAB keyboard navigation, always moving between controls and not within complex controls like the BBjHtmlView.

JAVAFX_HTMLEDIT

True

BBj 15.00

Setting this option to TRUE makes the BBjHtmlEdit control use JavaFX (if available). In this configuration, the BBjHtmlEdit is based on an embedded WebKit web browser.

Access to this feature requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line.

JAVAFX_HTMLVIEW

True

BBj 15.00

Setting this option to TRUE makes the BBjHtmlView control use JavaFX (if available). In this configuration, the BBjHtmlView is an embedded WebKit web browser, with support for HTML5, CSS, and JavaScript.

Access to this feature requires an active Software Asset Management (SAM) subscription. See Benefits of ‘Software Asset Management' Feature Line.

NATIVE_BUTTON_MARGINS

False

 

For consistency with Visual PRO/5, BBj defaults BBjButton margins (internal insets) to 0 pixels on the top, left, bottom and right edges. Some Java Look-and-Feels, notably macOS Aqua, are sensitive to this. When creating BBjButton with anything other than the platform default margins, macOS Aqua renders it differently from standard Aqua buttons.

When this option is set to TRUE, BBj will not reset BBjButton margins to 0 pixels to ensure that buttons will look correct in the macOS environment. When using this option, buttons will usually need to be up to 20-40 pixels wider to account for the wider margins.

NATIVE_BROWSER_LIST

BUI logo

False

BBj 13.00

In BBj 13.00 and higher, BUI LISTBUTTON and LISTEDIT controls are implemented as custom elements to allow for CSS styling that isn't possible with native browser select elements. The native browser select elements provide a better user experience on mobile phone and tablet browsers; this option can be used to specify that style. This option has no effect in GUI.

NATIVE_BROWSER_MSGBOX

BUI logo

False

BBj 13.00

Setting this option tells BUI to generate native browser alert() and confirm() dialogs for OK and OK/Cancel MSGBOX styles. This can provide a more native-looking appearance on mobile phone and tablet browsers. This option has no effect in GUI.

NATIVE_SCROLLBAR

BUI logo

False

BBj 15.00

In BBj 15.00 and higher, BUI implements two different versions of the BBjScrollBar control. The default version is supported on all desktop and touch platforms, and can be styled with custom CSS. An optional version, selected by setting this option to TRUE, is implemented using a native browser scrollbar. Because of the way touch platforms implement scrolling, this native version is not supported in touch-oriented browsers like Mobile Safari on iOS.

SESSION_PINNING

True

BBj 6.00

As of BBj 6.00, the BBj Interpreter implements a new method to cache programs. This ensures that in a given BBj session, unless the program  file is changed from within the session, or is explicitly unpinned from within the session, the program file will never appear to change. To restore the behavior that allowed programs with changes on disk to be loaded whenever the cache no longer held a reference to the program, set this option to "False".
Note:  Setting this value to "False" can cause unpredictable behavior with BBj Custom Objects, where FIELD and METHOD declarations are determined by the program whenever another program references them. A change on disk will not be loaded at a deterministic time.

THROW_UNWINDS

True

 

Causes THROW to unwind the program stack in search of an error handler, even if Drop to Console is allowed in public program.

STBL("!PROMPT_SPLIT")

In BBj 23.03 and higher, the !PROMPT_SPLIT string can be set to an integer value to break long PROMPT() message text into chunks of a selected width.

STBL("!SAME_SITE")

By default, BUI client-side user properties map directly to browser cookies. In BBj 20.0 and higher, the !SAME_SITE global can be set to "Lax", "None", or "Strict" to control the set of domains that can read a given cookie. For more information, see Google's notes for Chrome 80+.

STBL("!SESSIONINFO")

The !SESSIONINFO string defines an optional message to be displayed in BBjSessionInfo::getMessage and the Enterprise Manager Processes list. For more information, see BBjSessionInfo.

STBL("!SHELL") and STBL("!C")

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$

STBL("!TIME")

In BBj 24.00 and higher, this STBL entry defines the time mask that will be used by the BBjInputT and BBjInputTSpinner controls and the TIME() function when a mask isn't explicitly specified.

The STBL("!TIME") string contains the default input and output time formats, each terminated by a $00$ character. The input time format comes first and is used by the BBjInputT and BBjInputTSpinner controls if no mask is explicitly specified. Some locales, including fr_CA, define an output time format that includes additional literal text.

The following is a template that may be used for accessing the STBL("!TIME") string. Additional values may be added in the future.

DIM TIME$:"mask:c(16*=0),omask:c(16*=0)"

By default, both mask values are "%h:%mz %a". As with STBL("!DATE"), the contents of STBL("!TIME") are automatically updated whenever STBL("!LOCALE") is changed.

STBL("!THROWERROR")

In BBj 6.0 and higher, this STBL entry controls how a program handles errors when the program is allowed to drop to console (i.e., when setopts 1 $08$ is set).

If the developer allows the program to drop to console and there is an STBL entry for !THROWERROR, then when program encounters an error, BBj looks for an error handler at the current program level. If BBj cannot find an error handler, BBj pops the program stack until it finds an error handler or until it reaches level zero. Once it finds a program handler, execution proceeds under the control of the error handler. However, because the program allows dropping to console, the error handler will stop if it encounters an ESCAPE or if the user BREAKs the program.

STBL("!UMASK")

In BBj 9.00, the !UMASK string returns the current session-specific umask for the interpreter. If no session-specific umask has been configured, requesting this format will cause an error. Setting this format will cause subsequent files created in the current BBj session to have the permissions specified by the !UMASK setting, using standard UNIX umask syntax. For example:

0010 REM Readable by everyone but only writable by the owner:
0020 unused$=stbl("!UMASK","022");
0030 tempfile$=env("TEMP")+"/"+info(3,2)+str(dec(info(3,0)))+"_ro.tmp"
0040 string tempfile$
0050
0060 REM Readable and writable by everyone:
0070 unused$=stbl("!UMASK","000");
0080 tempfile$=env("TEMP")+"/"+info(3,2)+str(dec(info(3,0)))+"_rw.tmp"
0090 string tempfile$

STBL("!UNT_START")

By default, the UNT Variable looks for an unused channel starting at 1. In BBj 14.00 and higher, the !UNT_START global can be set to an integer value that causes the search to start at a higher value.  For example:

READY
>OPEN (9)FID(0)
>OPEN (10)"X0"
>PRINT UNT
1
>PRINT STBL("!UNT_START","9")
9
>PRINT UNT
11
>

STBL("!USER_PROPERTIES")

By default, BUI client-side user properties map directly to browser cookies. In BBj 15.00 and higher, the !USER_PROPERTIES global can be set to 0, 1, or -1 to select cookies or HTML web storage (either persistent or limited to the current browser session).

STBL("!YYDATE")

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.