skip to main content

Procedure Division Statements : INQUIRE

INQUIRE
Format 1
INQUIRE {Control-Item       } [ ( {Index-1} ... ) ]
        {CONTROL AT Location}
    { PROPERTY Property-Type }      { [TABLE   ]                         {= }            } 
  { CLASS [IN] Control-Class}
  { STATUS [IN] Control-Status}
Location is defined as follows:
  LINE NUMBER Line-Num [CELL  ]
Format 2
INQUIRE { window-handle           } { Property-Name          [IN] Property-Value }
         { WINDOW [generic-handle] } { STATUS                 [IN] Control-Status }
Syntax rules
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
General rules
1.
The INQUIRE statement retrieves some or all of a control's current properties, and stores them as data items. Control-item identifies the control to inquire. If the CONTROL phrase is used instead, the runtime inquires the control located at the screen position specified by the AT, LINE, and COLUMN phrases in the current window. A list of controls is maintained for each window. This list is kept in the order that controls are created.
2.
If control-item does not refer to a valid control, or if the runtime cannot locate a control at the specified screen location, the INQUIRE statement returns the “Invalid Hanlde” error or has no effect if iscobol.ignore_invalid_handle is set to true.
3.
Each occurrence of index-1 modifies one property.
 
4.
5.
6.
7.
Examples
Format 1 - Get the value from a entry-field to a variable
inquire scr-cust-code value ws-cust-code
Format 1 - Get the size of a label to a variable
inquire scr-cust-label size ws-lbl-size
Format 2 - Get the size in columns and lines of a graphical window
inquire mywin-handle size ws-win-size

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