skip to main content

Procedure Division Statements : DISPLAY

DISPLAY
General Format
Format 1
DISPLAY {identifier-1} ... [ UPON mnemonic-name-1 ] [WITH NO ADVANCING] [END-DISPLAY]
Format 2
DISPLAY screen-name-1
  [UPON Tab-Control-Handle (Page-Index)]
[END-DISPLAY]
Format 3
DISPLAY [ ( Line-Num, Col-Num ) ] { Src-Item [ UPON New-Window ] }  [ END-DISPLAY ]
                                  { OMITTED                      }
Remaining phrases are optional, can appear in any order
  AT Screen-Loc
  AT LINE NUMBER Line-Num
  AT {COLUMN  } NUMBER Col-Num
     {COL     }
     {POSITION}
     {POS     }
  WITH SIZE Length
  WITH NO ADVANCING
  {ERASE} [TO END OF] {LINE  }
  {BLANK}             {SCREEN}
  {ERASE} [EOS]
  {BLANK} [EOL]
  {UNDERLINED}
  {HIGHLIGHT }
  {HIGH      }
  {BOLD      }
  {LOWLIGHT  }
  {LOW       }
  {STANDARD  }
  WITH {BLINKING}
       {BLINK   }
  {REVERSE-VIDEO}
  {REVERSE      }
  {REVERSED     }
  SAME
  WITH {COLOR } Color-Val
  {FOREGROUND-COLOR } IS Fg-Color 
  {FOREGROUND-COLOUR}
  {BACKGROUND-COLOR } IS Bg-Color
  {BACKGROUND-COLOUR}
  SCROLL [UP  ] [ BY Scrl-Num {LINE } ]
         [DOWN]               {LINES}
  WITH {CONVERSION}
       {CONVERT   }
  CONTROL Cntrl-String
Format 4
DISPLAY {SUBWINDOW} [ UPON New-Window ] [END-DISPLAY]
        {WINDOW   }
Remaining phrases are optional, can appear in any order.
  AT screen-loc
  AT LINE NUMBER Line-Num
  AT {COLUMN  } NUMBER Col-Num
     {COL     }
     {POSITION}
     {POS     }
  SIZE Length
  LINES Height
  {ERASE} SCREEN
  {BLANK}
  {REVERSE-VIDEO}
  {REVERSE      }
  {REVERSED     }
  WITH {COLOR } Color-Val
  {FOREGROUND-COLOR } IS Fg-Color
  {FOREGROUND-COLOUR}
  {BACKGROUND-COLOR } IS Bg-Color
  {BACKGROUND-COLOUR}
  {HIGHLIGHT}
  {HIGH     }
  {BOLD     }
  {LOWLIGHT }
  {LOW      }
  {STANDARD }
  {BACKGROUND-HIGH    }
  {BACKGROUND-LOW     }
  {BACKGROUND-STANDARD}
  BOXED
  SHADOW
  [TOP   ] [CENTEREDTITLE IS Title
  [BOTTOM] [LEFT    ]
  WITH NO SCROLL
  WITH NO WRAP
  CONTROL VALUE IS Control-Val
  POP-UP AREA IS Save-Area
Format 5
DISPLAY SCREEN SIZE {80 }
  [ NOT ON EXCEPTION statement-2 ] 
END-DISPLAY ] 
Format 6
DISPLAY LINE [ UPON New-Window ] { SIZE Length  } [END-DISPLAY]
Remaining phrases are optional, can appear in any order.
  AT screen-loc
  AT LINE NUMBER Line-Num
  AT {COLUMN  } NUMBER Col-Num
     {COL     }
     {POSITION}
     {POS     }
  {REVERSE-VIDEO}
  {REVERSE      }
  {REVERSED     }
  WITH {COLOR } Color-Val
  [CENTEREDTITLE IS title
  [LEFT    ]
  [RIGHT   ]
Format 7
DISPLAY BOX [ UPON New-Window ][END-DISPLAY]
Remaining phrases are optional, can appear in any order.
  AT screen-loc
  AT LINE NUMBER Line-Num
  AT {COLUMN  } NUMBER Col-Num
     {COL     }
     {POSITION}
     {POS     }
  SIZE Length
  LINES Height
  {REVERSE-VIDEO}
  {REVERSE      }
  {REVERSED     }
  WITH {COLOR } Color-Val
  [TOP   ] [CENTEREDTITLE IS title
  [BOTTOM] [LEFT    ]
Format 8
DISPLAY Source UPON WINDOW [ { TOP    } ] [ { CENTERED }] TITLE  [END-DISPLAY]
Format 9
DISPLAY Title-1 UPON { FLOATING WINDOW Handle-1 } TITLE [END-DISPLAY]
                     { GLOBAL WINDOW            }
Format 10
DISPLAY [ {FLOATING   } [GRAPHICAL] ] WINDOW
          {STANDARD   }
          {INITIAL    }
          {DOCKING    }
          {DOCKABLE   }
  [ HANDLE IN Window-Handle ]
  {MODELESS
  {MODAL   } 
  {LINKTO THREAD 
  {BIND
  SCREEN LINE NUMBER screen-line 
  SCREEN {COLUMN  } NUMBER screen-col 
         {COL     } 
         {POS     } 
  AT screen-loc 
  AT LINE NUMBER line-num 
  AT {COLUMN  } NUMBER col-num 
     {COL     } 
     {POSITION
     {POS     }
  SIZE   length 
  LINES  height 
  FONT {IS} font-1 
  CONTROL FONT {IS} font-3 
  CELL  
   {SIZE  }  [IS] {cell-units                                 } 
   {HEIGHT}  [= ] {control-type-name  FONT font-2 [SEPARATE  ]} 
   {WIDTH }       {control-type-name  FONT        [OVERLAPPED]} 
  {ERASESCREEN 
  {BLANK
  {REVERSE-VIDEO
  {REVERSE      } 
  {REVERSED     } 
  WITH {COLOR } color-val 
  {FOREGROUND-COLOR } IS fg-color 
  {FOREGROUND-COLOUR
  {BACKGROUND-COLOR } IS bg-color 
  {BACKGROUND-COLOUR
  {HIGHLIGHT
  {HIGH     } 
  {BOLD     } 
  {LOWLIGHT } 
  {LOW      } 
  {STANDARD } 
  {BACKGROUND-HIGH    } 
  {BACKGROUND-LOW     } 
  {BACKGROUND-STANDARD
  { [USER-GRAY] [USER-WHITE] } 
  {        USER-COLORS       } 
  BOXED 
  SHADOW 
  TITLE-BAR 
  [TOP   ] [CENTEREDTITLE IS title 
  [BOTTOM] [LEFT    ] 
  WITH SYSTEM MENU 
  WITH NO SCROLL
  WITH NO WRAP 
  {NO-CLOSE
  {AUTO-RESIZE
  {RESIZABLE  } 
  MIN-SIZE  {= } min-size 
  MAX-SIZE  {= } max-size 
  MIN-LINES {= } min-lines 
  MAX-LINES {= } max-lines 
  CONTROL VALUE {IS} control-val 
  LAYOUT-MANAGER {IS} manager 
  VISIBLE {IS} {TRUE         } 
  POP-UP MENU {IS}  {menu-1} 
  {POP-UP AREA IS } handle-name 
  {HANDLE {IS}    } 
  CONTROLS-UNCROPPED 
  EVENT PROCEDURE IS { proc-1 [ {THROUGH} proc-2 ] } 
  ACTION {IS} action 
  LAYOUT {IS} layout 
  UNDECORATED 
Format 11
DISPLAY MESSAGE BOX { Text } ...
  [ TITLE {IS} Title ]
  [ TYPE {IS} Type ]
  [ ICON {IS} icon ]
  [ DEFAULT {IS} default ]
  [ {GIVING   } Value ]
    {RETURNING
Format 12
DISPLAY name UPON { ENVIRONMENT-NAME   } [END-DISPLAY]
Format 13
  [ { UPON New-Window         } ]
    { UPON Grid-Handle (y, x) }
  [ HANDLE IN Control-Handle ]
  { { Property-Name          } [IS ] { [MULTIPLE] Property-Value [ LENGTH {IS} Length-1 ] [ GIVING Result-1 ] } } ...
    { PROPERTY Property-Type } [ARE] { [TABLE   ]                         {= }                                  }
  AT screen-loc 
  AT LINE NUMBER line-num 
  AT {COLUMN  } NUMBER col-num 
     {COL     } 
     {POSITION
     {POS     }
  SIZE   length 
  LINES  height 
  FONT {IS} font-1 
  WITH {COLOR } color-val 
  {FOREGROUND-COLOR } IS fg-color 
  {FOREGROUND-COLOUR
  {BACKGROUND-COLOR } IS bg-color 
  {BACKGROUND-COLOUR
  {BACKGROUND-HIGH    } 
  {BACKGROUND-LOW     } 
  {BACKGROUND-STANDARD
  VISIBLE {IS} {TRUE         } 
  EVENT PROCEDURE IS { proc-1 [ {THROUGH} proc-2 ] } 
Format 14
Syntax rules
1.
COLUMN, COL, POSITION and POS are synonymous.
2.
ERASE and BLANK are synonymous.
3.
BELL and BEEP are synonymous.
4.
HIGHLIGHT, HIGH and BOLD are synonymous.
5.
LOWLIGHT and LOW are synonymous.
6.
BLINKING and BLINK are synonymous.
7.
REVERSE-VIDEO, REVERSE and REVERSED are synonymous.
8.
COLOR and COLOUR are synonymous.
9.
FOREGROUND-COLOR and FOREGROUND-COLOUR are synonymous.
10.
BACKGROUND-COLOR and BACKGROUND-COLOUR are synonymous.
11.
LINE and LINES, in the SCROLL phrase, are synonymous.
12.
JUSTIFIED and JUST are synonymous.
13.
CONVERSION and CONVERT are synonymous.
14.
GIVING and RETURNING are synonymous.
15.
Mnemonic-name-1 can be SYSOUT, SYSERR or CRT.
Format 1
16.
Format 2
17.
18.
19.
Format 3
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
Format 4
31.
32.
Format 5
33.
Format 6
34.
35.
Format 8
36.
Format 9
37.
38.
39.
Format 10
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
Format 11
54.
55.
56.
57.
58.
Format 12
59.
Format 13
60.
A Format 13 DISPLAY creates a new control and displays it either on the screen or within a GRID cell depending on the UPON phrase. A handle to the new control is returned in Control-Handle and is used in future references to the control.
61.
control-class identifies the type of the control. See Controls Reference for the list of available controls.
62.
y and x are respectively the row and column coordinates that identify a GRID cell.
General Rules
Format 1
1.
2.
3.
A.
B.
4.
5.
6.
7.
8.
Format 2
9.
10.
 
NOTE - When two screen items overlap, the display on the screen for the common character positions is determined by the second screen item specified within screen-name-1.
 
The transfer takes place and each elementary screen item is displayed on the terminal display subject to any editing implied in the character-string specified in the PICTURE clause of each elementary screen description entry.
11.
12.
13.
14.
15.
If the UPON clause is used, the destination Tab-Control must have the Allow-Container style. The screen will be bind to the specified tab and the runtime will show it when the tab is selected by the user.
Format 3
16.
17.
18.
19.
Any other keywords and spaces are discarded. If more than one keyword from within the above lines appears in cntrl-string, then only the rightmost one in the data item is used. Each of the keywords performs the same action as the statically declared attribute of the same name. When a CONTROL item conflicts with the statically declared attributes of the DISPLAY statement, the actions specified in the CONTROL item take precedence. The FCOLOR and BCOLOR keywords are used to set foreground and background colors respectively. These keywords must be followed by an equals sign and the name of a color taken from the following list: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, and WHITE. The named color becomes the default foreground or background color for the window. Note that this is different from the COLOR phrase, which sets the color only for the current DISPLAY statement. The FCOLOR and BCOLOR keywords set the default colors for every subsequent DISPLAY until explicitly changed.
20.
Format 4
21.
22.
23.
24.
25.
ERASE Phrase
26.
BOXED Phrase
27.
28.
29.
30.
REVERSED Phrase
31.
32.
COLOR Phrase
33.
34.
HIGH, LOW, and STANDARD Phrases
35.
 
The STANDARD option indicates that a system-dependent default value should be used. You can affect this value with the FOREGROUND-INTENSITY configuration option.
 
If no option is given, the current subwindow's foreground intensity is used (inherit the foreground intensity of the parent).
BACKGROUND-HIGH, BACKGROUND-LOW, and BACKGROUND-STANDARD Phrases
36.
CONTROL VALUE Phrase
37.
TITLE Phrase
38.
39.
NO SCROLL and NO WRAP Phrases
40.
41.
42.
POP-UP AREA Phrase
43.
44.
45.
46.
SHADOW Phrase
47.
 
The way the shadow is displayed is determined by the SHADOW-STYLE setting of the SCREEN option in your runtime configuration file.
 
When a shadow is specified for a window, that window is automatically detached slightly from any intersecting line segments, such as the borders of other windows.
Format 5
48.
A.
49.
Format 6
50.
51.
52.
AT, LINE, and COLUMN Phrases
53.
54.
TITLE Phrase
55.
56.
Format 7
57.
58.
AT, LINE, and COLUMN Phrases
59.
SIZE and LINES Phrases
60.
TITLE Phrase
61.
Format 8
62.
63.
64.
65.
66.
Format 9
67.
68.
69.
Format 10
70.
71.
72.
73.
74.
75.
76.
A.
B.
C.
D.
E.
77.
If Handle-1 points to a subwindow, the parent window title is updated.
GRAPHICAL Phrase
78.
 
CELL SIZE = LABEL FONT
 
This phrase establishes the window's coordinate space based on the font used by controls that occupy the window. The CELL phrase can still be used and any values set in that phrase take precedence over the default value established with GRAPHICAL option. In other words, if you specify only a CELL HEIGHT or CELL WIDTH, then the other dimension receives the default assignment.
 
The intent of the GRAPHICAL option is to make it easier to consistently establish an appropriate coordinate space for windows that contain only controls (see the discussion of cell sizing and coordinate space that is included with the CELL phrase rules, below).
 
For example, the window that is specified with:
 
DISPLAY FLOATING WINDOW,
CELL SIZE = LABEL FONT
 
can be more simply specified with:
 
DISPLAY FLOATING GRAPHICAL WINDOW
UPON Phrase
79.
80.
MODAL and MODELESS Phrases
81.
82.
LINK TO THREAD and BIND TO THREAD Phrases
83.
84.
SCREEN LINE and SCREEN COLUMN Phrases
85.
LINE, COLUMN, and AT Phrases
86.
87.
88.
SIZE and LINES Phrases
89.
90.
FONT Phrase
91.
CONTROL FONT Phrase
92.
CELL Phrase
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
 
CELL SIZE IS ENTRY-FIELD FONT SEPARATE
USER-GRAY, USER-WHITE, and USER-COLORS Phrases
103.
104.
TITLE-BAR Phrase
105.
SYSTEM MENU Phrase
106.
107.
AUTO-RESIZE and RESIZABLE Phrases
108.
 
The RESIZABLE phrase creates a window that the user can resize but omits the automatic handling provided by the AUTO-RESIZE phrase. When the user resizes the window, the size of the logical window is changed to match the new physical window. Any area that is new is displayed with spaces in the window's background color. Any area that has been removed is lost (although any permanent controls in that area will still exist). The window's subwindow is resized to fill the interior of the resized window. The subwindow's background color is changed to match the window's background color. Other traits of the subwindow remain unchanged. The program receives a NTF-RESIZED event to inform it of the new size. See the section on events for details. Windows that have the RESIZABLE attribute can use a resize layout manager to help handle the resizing and positioning of controls in the window.
 
For windows with the RESIZABLE phrase, min-size and min-lines set the windows' smallest width and height respectively. This value is expressed in character cells (fractional cells are ignored). If omitted, or set to zero, the smallest window size is determined by the host system. Similarly, the max-size and max-lines values set the window's largest width and height. If omitted, or set to zero, the host system determines the largest size (usually the entire screen). For windows without the RESIZABLE phrase and for docking windows, these values are ignored.
ACTION Phrase
109.
If the window is currently maximized or minimized, restores the window to its previous size and position; otherwise, it has no effect. Allowed only for windows that can be maximized or minimized.
110.
CONTROL VALUE Phrase
111.
For each value specified, the corresponding attribute is given to the new window. When a value is not specified, the presence or absence of that trait depends on the other phrases included in the DISPLAY FLOATING WINDOW statement. Note that you can only give traits to a window with the CONTROL VALUE phrase; you cannot negate traits specified by the DISPLAY FLOATING WINDOW statement. For example, if you want to specify at run time whether or not a window gets a shadow, you should omit the SHADOW phrase from the DISPLAY FLOATING WINDOW statement and use a CONTROL VALUE phrase to add shadowing when you want it.
LAYOUT-MANAGER Phrase
112.
VISIBLE Phrase
113.
POP-UP MENU Phrase
114.
CONTROLS-UNCROPPED Phrase
115.
 
This can be useful when you are dealing with RESIZABLE windows. Sometimes a resizable window is too small to show all of the controls that your program creates. Normally, these controls either would not be created or would be cropped. This could produce odd results when the window is later resized larger by the user. Although the resized window is now large enough to show everything, the controls still show their cropped appearance, because their (cropped) creation size is recorded in the controls as their actual size. Specifying CONTROLS-UNCROPPED avoids the cropping behavior.
 
This style is useful also when you want to place a combo-box near the bottom of a window. Because the size of the drop-down portion of the combo-box is determined by the control's overall height, cropping the control limits the drop-down box to the window's boundaries. If you want the box to drop down beyond the edge of the window, you need to use the CONTROLS-UNCROPPED window style to allow this.
EVENT PROCEDURE Phrase
116.
117.
118.
 
If you attempt to create a main application window after one already exists, the DISPLAY INITIAL WINDOW statement will have no effect other than to set handle-name to NULL.
 
The runtime automatically constructs the main application window if needed. This occurs any time a screen operation is dictated by the program and the program has not yet constructed a main application window. When this occurs, the runtime executes the following implied statement:
A.
B.
C.
D.
E.
119.
120.
 
Independent windows do not have a parent. As a result, any other window in the application can be placed over them. Also, destroying another window in the application will not destroy the independent window.
 
Although they do not have a parent, independent windows use the current window to determine their default fonts, cell size, and colors. Also, independent windows use the current window when determining their position. This is computed in the same manner as it is for floating windows.
 
Independent windows can be minimized separately. Under Windows and Windows NT, each visible independent window has its own button on the task bar.
 
Independent windows process their close box in the same manner as floating windows--by generating a CMD-CLOSE event.
 
Independent windows can be created before the main window. In this case, there is no current window to provide defaults, so the independent window uses the same defaults as the main application window would. The window is located on the screen as follows:
A.
B.
C.
 
Note that LINE and COL (without the SCREEN option) are ignored in these cases.
 
If an independent window is current when the main application window is created, the defaults for the main window are derived from the independent window.
121.
SCREEN-LINE and SCREEN-COLUMN Phrases
122.
AUTO-MINIMIZE Phrase
123.
 
In addition, the AUTO-MINIMIZE phrase implies the SYSTEM MENU and TITLE-BAR phrases.
UNDECORATED Phrase
124.
STANDARD Phrase
125.
A.
B.
C.
D.
126.
127.
128.
129.
130.
131.
132.
133.
134.
Format 11
135.
 
Text forms the body of the message box. It is the string of text that the user will see. When more than one text item is specified, they are concatenated together to form a single string that the user sees. The limit on the length of the message string is host dependent. The host system wraps the text as needed to fit the message box. If you want to force the text to a new line, you can embed an ASCII line-feed character (h"0A" in COBOL) where you want the new line to start. For example, the following code produces a message box with two lines of text:
78  NEWLINE      VALUE H"0A". 
DISPLAY MESSAGE BOX,  
"This is line 1", NEWLINE,  
136.
137.
138.
78  MB-OK                    VALUE 1.
78  MB-YES-NO                VALUE 2.
78  MB-OK-CANCEL             VALUE 3.
78  MB-YES-NO-CANCEL         VALUE 4.
78  MB-RETRY-CANCEL          VALUE 5.
78  MB-ABORT-RETRY-IGNORE    VALUE 6.
78  MB-CANCEL-RETRY-CONTINUE VALUE 7.
78  MB-YES                   VALUE 1.
78  MB-NO                    VALUE 2.
78  MB-CANCEL                VALUE 3.
78  MB-ABORT                 VALUE 4.
78  MB-RETRY                 VALUE 5.
78  MB-IGNORE                VALUE 6.
78  MB-CONTINUE              VALUE 7.
78  MB-DEFAULT-ICON          VALUE 1.
78  MB-WARNING-ICON          VALUE 2.
78  MB-ERROR-ICON            VALUE 3.
A.
i.
B.
C.
D.
E.
i.
139.
Format 12
140.
141.
Format 13
142.
Format 14
143.
       01  WCB.
           03 WCB-HANDLE PIC 999 BINARY(2VALUE 0.
           03 WCB-NUM-ROWS PIC 999 BINARY(2).
           03 WCB-NUM-COLS PIC 999 BINARY(2).
           03 WCB-LOCATION-REFERENCE PIC X.
              88 WCB-SCREEN-RELATIVE VALUE "S".
              88 WCB-WINDOW-RELATIVE VALUE "W".
           03 WCB-BORDER-SWITCH PIC X.
              88 WCB-BORDER-ON VALUE "Y" FALSE "N".
           03 WCB-BORDER-TYPE PIC 9.
              88 WCB-BORDER-WCB-CHAR VALUE 0.
              88 WCB-BORDER-PLUS-MINUS-BAR VALUE 1.
              88 WCB-BORDER-LINE-DRAW VALUE 2.
              88 WCB-BORDER-DBL-LINE-DRAW VALUE 3.
           03 WCB-BORDER-CHAR PIC X.
           03 WCB-FILL-SWITCH PIC X.
              88 WCB-FILL-ON VALUE "Y" FALSE "N".
           03 WCB-FILL-CHAR PIC X.
           03 WCB-TITLE-LOCATION PIC X.
              88 WCB-TITLE-TOP VALUE "T".
              88 WCB-TITLE-BOTTOM VALUE "B".
           03 WCB-TITLE-JUSTIFICATION PIC X.
              88 WCB-TITLE-CENTER VALUE "C".
              88 WCB-TITLE-LEFT VALUE "L".
              88 WCB-TITLE-RIGHT VALUE "R".
           03 WCB-TITLE-LENGTH PIC 999 BINARY(2).
              88 WCB-TITLE-LENGTH-COMPUTE VALUE 0.
           03 WCB-TITLE PIC X(40).
The border is always drawn in the same way and the fill characters are not supported, hence the variables WCB-BORDER-SWITCH, WCB-BORDER-TYPE, WCB-BORDER-CHAR, WCB-FILL-SWITCH and WCB-FILL-CHAR are ignored.
The pop-up window created by this statement must be closed with a Format 3 CLOSE statement.
Examples
Format 1 - Display to sysout where no GUI terminal exist
display "Hello World!" upon sysout
Format 2 - Display screen from screen section
       working-storage section.
       01 window-handle usage handle.
       01 cust-values.
          05 ws-cust-code  pic x(5).
          05 ws-cust-name  pic x(50).
       screen section.
       01 screen-1.
          03 scr-cust-code Entry-Field
             using ws-cust-code
             size 12.7 cells 
             lines 3.8 cells 
          03 scr-cust-name Entry-Field
             using ws-cust-name
             size 24.5 cells 
             lines 4.6 cells 
          03 scr-lab-1 Label
             size 13.5 cells 
             lines 3.7 cells 
          03 scr-lab-2 Label
             size 13.5 cells 
             lines 3.7 cells 
          03 scr-pb-save Push-Button
             size 15.5 cells 
             lines 6.4 cells 
       procedure division.
          display standard  window background-low
              handle window-handle.
           display screen-1.
           perform until exit-pushed
              accept screen-1 on exception 
                 perform is-screen-1-evaluate-func
           destroy window-handle.
Format 3 - Display variables and literals on specific line and column
display "Customer Code : " line 2 col 10
        "Customer Name : " line 3 col 10
Format 3 - Display variables and literals with Microsoft COBOL compliant syntax
display (2,10) "Customer Code : " cust-code
display (3,10) "Customer Name : " cust-last-name ", " cust-first-name
Format 4 - Display text window with some contents and title
display window erase
display "Press Enter to Exit" upon window bottom centered title
display "This is a help text..." line 4 col 5
display "This is a help text..." line 5 col 5
accept omitted
Format 5 - Change screen size to 132 on text only devices
display screen size 132
Format 6 - Display lines on text only screen
display line size 80 at line 2 col 1 centered title "Customers screen"
display line size 80 at line 23 col 1
Format 7 - Display box on text only screen
display box at line 2 size 80 lines 22
Format 8 - Display text window with some contents and title
display window erase
display "Press Enter to Exit" upon window bottom centered title
display "This is a help text..." line 4 col 5
display "This is a help text..." line 5 col 5
accept omitted
Format 9 - Display title upon floating window
display "Select a customer from list" upon floating window sub-win-handle title
Format 10 - Display graphical window and display/accept a screen on it
      working-storage section.
       01 window-handle usage handle.
       01 cust-values.
          05 ws-cust-code  pic x(5).
          05 ws-cust-name  pic x(50).
       screen section.
       01 screen-1.
          03 scr-cust-code Entry-Field
             using ws-cust-code
             size 12.7 cells 
             lines 3.8 cells 
          03 scr-cust-name Entry-Field
             using ws-cust-name
             size 24.5 cells 
             lines 4.6 cells 
          03 scr-lab-1 Label
             size 13.5 cells 
             lines 3.7 cells 
          03 scr-lab-2 Label
             size 13.5 cells 
             lines 3.7 cells 
          03 scr-pb-save Push-Button
             size 15.5 cells 
             lines 6.4 cells 
       procedure division.
          display standard  window background-low
              handle window-handle.
           display screen-1.
           perform until exit-pushed
              accept screen-1 on exception 
                 perform is-screen-1-evaluate-func
           destroy window-handle.
Format 11 - Display message box to request an answer
display message "Please confirm the deletion of this invoice"
   type mb-yes-no
   giving delete-answer
if delete-answer = mb-yes
   delete customers
   display message "Delete action cancelled"
Format 12 - Display upon environment-name
display "envfullname" upon environment-name
display "Adam Smith" upon environment-value
accept f-name from environment-value
Format 13 - Display combo-box upon grid cell, row 2, col 1
display combo-box upon my-grid-handle (2,1)
        handle in my-combo-box-handle

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left