In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
Home page Home page Home page Home page
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel

QTIPS - Toggling Bell

A reader recently asked how she could get some messages to sound a beep when displaying but prevent others. Setting the appropriate prompt in the environment window caused all messages to bell.

There are two ways of achieving this depending upon whether you want a particular message ALWAYS to bell, or whether you want the bell status to be toggled depending upon circumstances. The first method is simply to place the literal %B% within the body of the message, which will be interpreted as a bell at display. EG

0001      MESSAGE = "FATAL ERROR %B%"
0002      CALL MSG(MESSAGE, "", "", "")

The second method relies upon toggling the system environment parameter which controls whether a bell sounds with a message. This is in @ENVIRON.SET<34>. If a bell is desired, toggle this field to 1, EG

0002      @ENVIRON.SET<24> = 1
0003      CALL MSG(MESSAGE, "", "", "")
0004      @ENVIRON.SET<24> = 0

(Volume 1, Issue 9, Page 3)
Pixel Footer R1 C1 Pixel