STBL Formats

For BBj-Specific information, see STBL Formats - BBj.

STBL("!CONEXIT")

STBL("!CONMESS")

STBL("!CONPASS")

STBL("!CTYPE")

STBL("!DATE")

STBL("!DSOPEN")

STBL("!EDIT")

STBL("!IFIELDOVERFLOW")

STBL("!IRULES")

STBL("!SAVEPVER")

STBL("!TERMS")

The STBL() function may be used to load several configuration tables used by PRO/5. The following is a description of each table recognized.

STBL("!CONEXIT")

The !CONEXIT entry forces PRO/5 to exit the application the next time the application stops running.

STBL("!CONMESS")

The !CONMESS entry defines the message to be given before the application exits.

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 PRO/5.

The interaction of the global strings is as follows:

!CONEXIT

!CONMESS

!CONPASS

Behavior

set

not set

not set

PRO/5 waits for the user to press the Enter key before exiting. The user cannot go to console mode.

set

set

not set

PRO/5 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.

set

not set

set

PRO/5 displays the message: "Enter password to enter debug mode or RELEASE to exit application." The user can either enter the password or type "RELEASE" to exit PRO/5 and the application. If the user presses the Enter key, the message is redisplayed.

set

set

set

The message specified by !CONMESS is displayed and PRO/5 waits for the user to either enter the password to enter console mode or type "RELEASE" to exit PRO/5 and the application. If the user presses the Enter key the message is redisplayed.

not set

either

either

No effect if !CONEXIT is not set.

STBL("!CTYPE")

The !CTYPE string is used by PRO/5 to determine character types and lower/upper case conversions. Specifically, this string is used for character type checking during string masking (and INPUTE), and by the CVS() function. The !CTYPE string is actually 3 tables. The first table is a bitmap table used to obtain character characteristics, the second table is a "lower to upper" case conversion table and the last entry is an "upper to lower" case conversion table. Each of the tables is 256 bytes in length.

Following are the "bitmaps" used to describe the characteristics table:

Bit

Hex Value

Meaning

0

01

Upper case alpha

1

02

Lower case alpha

2

04

Numeric

3

08

Punctuation

4

10

White space

International users may have to make changes to !CTYPE to accommodate various character sets used in different countries.

STBL("!DATE")

The !DATE string contains the default date format as well as the text for month and day names each separated by a $00$ character. The default date format comes first and is used by the DATE() function if no format is specified. Next come abbreviated month names, followed in order by long month names, abbreviated day names, and long day names.

Following is a template that may be used for accessing the !DATE string. It defines the default date format followed by 12 short month names (sm), 12 regular month names (m), 7 short day names (sd), and 7 normal day names (d).

DIM DATE$:"default:c(32*=0),sm[12]:c(3*=0),m[12]:c(32*=0),sd[7]:c(3*=0),d[7]:c(32*=0)"

For example the short name for January is usually Jan. The month and day names returned by the DATE() function may easily be changed for international users.

STBL("!DSOPEN")

In PRO/5 15.0 and higher, use the !DSOPEN entry to specify data server connection information used by all file OPEN verb calls. This feature is useful as a single point of configuration to configure a program to use the PRO/5 Memory Mapped protocol to access data files via the BBj PRO/5 Data Server (see  PRO/5 Memory Mapped Data Server Access for complete details). Using the BBj PRO/5 Data Server allows PRO/5 programs to utilize some of the BBj file system features including triggers, asynchronous triggers, replication and write auditing.

The value should include the data server hostname and port reference to be prepended to all OPEN calls. When using the PRO/5 Memory Mapped protocol to communicate with a local BBj file system, use 127.0.0.1 for the hostname. Some formatting examples include:

Local BBj file system using Memory Mapped protocol:

/<127.0.0.1,port=2100>

Remote server:  

/<myserver,port=2100>

STBL("!EDIT")

The !EDIT string is used to map input characters to edit functions. This string is used by PRO/5 for the EDIT window, the INPUTE verb, and the INPUTN verb. The string must be an even number of bytes long and consist of byte pairs. The first byte of each pair contains a keystroke value that would be typed by the user. The second byte indicates which editor function is invoked by that keystroke. The function values are as follows:

Function Name

Value

Default Key(s)

Default String

Exit

0..62

CR ($0D$)

$0D00$

Help

63 ($3F$)

^Y ($19$)

$193F$

Left

64 ($40$)

LEFT, F2 ($1D$)

$1D40$

Right

65 ($41$)

RIGHT, F1 ($1C$)
^L ($0C$)

$1C41$
$0C41$

Up

66 ($42$)

UP, F3 ($1E$)
^K ($0B$)

$1E42$
$0B42$

Down

67 ($43$)

DOWN, F4 ($1F$)
^J ($0A$)

$1F43$
$0A43$

Backspace

68 ($44$)

BACKSPACE, ^H ($08$)

$0844$

Restore value

69 ($45$)

^R ($12$)
ESC ($1B$)

$1245$
$1B45$

Toggle insert

70 ($46$)

^T ($14$)

$1446$

Insert char

71 ($47)

^E ($05$)

$0547$

Delete char

72 ($48$)

^X ($18$)

$1848$

Tab

73 ($49$)

TAB, ^I ($09$)

$0949$

Back tab

74 ($4A$)

^B ($02$)

$024A$)

Clear

75 ($4B$)

^W ($17$)

$174B$

Beginning line

76 ($4C$)

^A ($01$)

$014C$

End

77 ($4D$)

^Z ($1A$)

$1A4D$

Insert line

78 ($4E$)

^O ($0F$)

$0F4E$

Delete line

79 ($4F$)

^D ($04$)

$044F$

Page down

80 ($50$)

 

 

Page up

81 ($51$)

 

 

Reprint

82 ($52$)

 

 

Next word

83 ($53$)

 

 

Prev word

84 ($54$)

 

 

Popup Calendar (BBj)

85 ($55$)

^P ($10$)

$1055$

Select All (BBj 17+)

86 ($56$)



PRINT HTA(STBL("!EDIT"))

0D00 0844 1D40 0C41 1C41 0B42 1E42 0A43 1F43 1245 1B45 1446 014C 1A4D 0949 024A 174B 1848 0547 044F 0F4E 193F

Any value less than 63 will cause the input function to exit setting the CTL value to the function value. The "help" function causes an exit with CTL=-1.

When insert mode is toggled with CTL-T, SETOPTS byte 1 bit $20$ is also toggled.

STBL("!IFIELDOVERFLOW")

In PRO/5 14.0 and higher, when the variable is set to "1", assigning an out-of-range value in the sign overflow region to a type "I" (int) template field causes PRO/5 to generate an !ERROR=41. BBj has always generated an error in this situation and ignores this variable. For example:

10 DIM T$:"F1:I(1)"

20 LET T.F1=130

30 PRINT T.F1; REM Prints -126 instead of 130 as 130 exceeds the capacity of a 1 byte signed integer

40 LET TMP$=STBL("!FIELDOVERFLOW","1")

50 LET T.F1=130; REM Causes an !ERROR=41 (Integer or range error)

STBL("!IRULES")

The !IRULES entry affects the behavior of the INPUTN verb, and uses the following hex values:

Flag Bit

Effect on Input if Bit is Set

$01$

Digits are entered from the right-most position. Normally, input begins to the left of the decimal point in the input mask and proceeds past the decimal only when "." is entered.

$02$

Commas and numeric characters are copied when generating the edit mask.

$04$

Accepts the decimal point replacement character for data entry defined by SETOPTS(6,1).

$80$

Causes the system to beep upon entry of invalid data.

The values are additive. For example the following causes digits to be entered from the right most position, and causes the system to beep upon entry of invalid data.

1000 A$=STBL("!RULES",$81$)

STBL("!SAVEPVER")

PRO/5 6.0 and higher supports the !SAVEPVER STBL() global variable to specify which SAVEP algorithm should be used. The variable is defined as follows:
 

A$=STBL("!SAVEPVER","1") - Selects the original SAVEP format

A$=STBL("!SAVEPVER","2") - Selects the SAVEP format introduced in Rev 2.2

A$=STBL("!SAVEPVER","3") - Selects the SAVEP format introduced in Rev 6.0

A$=STBL("!SAVEPVER","4") - Selects the SAVEP format introduced in Rev 18.0

STBL("!TERMS")

The !TERMS string is used by PRO/5 during INPUT from the terminal to recognize field terminators. By default the usual terminators (CR, LF, etc.) are recognized and set the CTL value accordingly. However, developers may chose to add more terminators (such as TAB) and define additional CTL values. Each entry is a 2-byte pair, the first byte indicates a desired field terminator and the second byte indicates the corresponding CTL value to be returned for that character. This string is used by the INPUT verb but not by editors (such as INPUTE).

A typical application would be to add the tab character to the list in the following manner:

1000 A$=STBL("!TERMS")
1010 IF POS($09$=A$,2)=0 THEN
1010:A$=STBL("!TERMS",A$+$0900$)

The example adds the tab character as a separator (if it wasn't already there) returning a CTL value of 0.