DFLAG

Set runtime option flags

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall DFLAG(flags[, control])

Arguments

flags

The runtime option flags. Each flag is a single digit, and the digit positions are assigned ordinal numbers from right to left. Thus, the low‑order digit is digit number 1. Synergy DBL examines the flags value digit by digit to determine which flags are set, and hence, which functions are to be performed. The Discussion contains a detailed description of the flags and their meanings. (n)

control

(optional) A value that controls how the individual digit positions in the flag specification value are interpreted. If control is not specified, each digit in flags is interpreted as follows: (n)

0

Reset the associated flag.

n

Set the associated flag, where n is any nonzero decimal number.

We recommend that you use the control value when setting and resetting your flags values. If control is present, its value is interpreted as follows:

0

Reset all flags whose corresponding digit position contains a nonzero value. Leave all other flags unmodified.

1

Set all flags whose corresponding digit position contains a nonzero value. Leave all other flags unmodified.

2

Set the flags variable to a value that reflects the current settings of the flags and leave all flags unmodified. Each digit of the flags variable is set to zero if the associated flag is currently reset or to one if the flag is set. If the length of the variable is less than 10, the settings are returned as in a decimal‑to‑decimal assignment. (See Moving decimal/packed data to a decimal/packed destination for more information about decimal‑to‑decimal assignments.)

Discussion

The DFLAG subroutine, like the FLAGS subroutine, controls the settings of various runtime option flags. These flags control the way the runtime acts in response to the execution of Synergy DBL statements.

When program execution begins, all program‑controlled flags are normally reset, and the program can alter them as needed. The flag settings are not preserved across program chaining. In effect, the STOP statement resets all of the flags as its last action, even if another program is being started. The flag settings in one program do not affect the settings in a program that is running concurrently from another terminal.

Remember that the rightmost digit in the flag specification string corresponds to flag number 1, as shown in figure 1. Because Synergy DBL interprets the flags argument as if it were storing it to a d10 variable, you don’t have to specify a flag if that flag and all flags to its left have a value of zero. All rules that apply when storing to a decimal variable apply here. For example, if you specify

xcall dflag(00100)

Synergy DBL interprets your argument as 0000000100. (All flags corresponding to these zeros are cleared.)

1. DFLAG runtime option flags.

 

A more detailed description of the flags is provided below.

Flags for DFLAG

Flag

Description

Windows

UNIX

OpenVMS

1

When flag 1 is set, the program receives any available global messages before any local messages. When flag 1 is reset, the program receives local messages before global messages.

 

2

Flag 2 causes the program to wait for a message if no messages exist. When flag 2 is reset, program control transfers to the “no message pending” label specified in the RECV statement.

 

3

When an I/O statement tries to access a locked record and flag 3 is set, execution is suspended until the record is unlocked. At that time, the I/O statement is completed. When flag 3 is reset, an attempt to access a locked record generates a “Record is locked” error ($ERR_LOCKED). This error is trapped if an ONERROR statement or an I/O error list that contains a LOCK entry is included in the I/O statement that attempted access. (This flag is overridden by the WAIT qualifier.)

4 – 7

No longer available.

 

 

 

8

When flag 8 is set, SJC$_NOPAGINATE is set in LPQUE statements. When flag 8 is reset, SJC$_NOPAGINATE is turned off.

 

 

9

When flag 9 is set, the “Unexpected VMS system error” message (VMSERROR) is suppressed on any signaled error condition. When flag 9 is reset, the message is issued on any signaled error condition. This flag does not affect trapped OpenVMS error conditions, only unexpected signaled conditions such as those created by LIB$SIGNAL and LIB$STOP.

 

 

10

When flag 10 is set, Synergy DBL traceback is suppressed on any signaled error condition. When flag 10 is reset, traceback is not suppressed. This flag does not affect trapped OpenVMS error conditions, only unexpected signaled conditions such as those created by LIB$SIGNAL and LIB$STOP.

 

 

Tip

To make your code easier to maintain, use the flag number as the nonzero digit that sets the flag. For example, a flags value of “301” tells you at a glance that flags 3 and 1 are set.

See also

FLAGS.

Examples

The example below sets DFLAG flags 1 and 3 and leaves the others unmodified.

xcall dflag(301, 1)