Skip to Content

How to display a notification window that requires no user intervention

Estimated Reading Time: 1 Minutes

The display window syntax was extended in version 2018R1 to add the display of a notification window.  A notification window is an undecorated window notifying the user about events that will or are happening in your program.  This window doesn't require an accept statement or user interaction.

Here is a sample snippet to display a notification window that would disappear automatically after 5 seconds of being displayed.

    display notification window
            top right
            lines 5
            size 35
            before time 550
            visible 0
            handle h-notif.

You can select the location of the notification window from 4 different locations: the top left, top right, bottom left or bottom right corners of the screen.

The "before time" clause is optional.  Omit it if you want the notification window to continue to be displayed until the program finishes its execution.

Once the notification window is displayed, you can display GUI controls in either a screen section screen or defined separately in your code.

The following snippet shows how to display a series of GUI controls upon the notification window.

     display label
             line 2 
             col  3
             title "This is a notification window..."
             upon h-notif.
     display label
             line 4 
             col 3
             title "The notification will close in 5 seconds"
             upon h-notif

The attached sample program shows a notification window on any one of the corners of the screen. Compile the program:

  iscc  notif.cbl

And then run it.  You can pass a number 1 through 4 as a parameter to select the location of the window or 5 for a "before time" type of notification window:

  iscrun  NOTIF  1
How to display a notification window that requires no user intervention
  • Attached Files
  • notif.cbl (3.28 KB) 257