Skip to content

INPUT MESSAGE

FUNCTION This command uses messages from Dictionary-IV to prompt for and accept operator input from the terminal.

SYNTAX

INPUT MESSAGE msg-code-string INTO data-name/variable
[USING "msg-dict-name"]
[POST-HELP PROCESS IS procedure]
msg-code-string
type, number [, display-mode [, clear [, (col,ln)
[, *1-replacement [, *2-replacement ..]]]]]
type
is one of the following values:
IInput
N Non-Input
PPrompt
SSelector (normal and background reverse video)
Y Yes/No
iInput, prints data from "INTO" data-name or variable as default value
nNon-Input, no suffix, no carriage return needed
sSelector (background reverse video and foreground reverse video)
xNon-Input, no suffix, carriage return needed
number
the number of a message in Dictionary-IV.
display-mode
is one of the following values:
(blank) Standard Print Mode
B Background
C Clear message area and exit
F Foreground
R Reverse Video Foreground
X Return Message, do not print
r Reverse Video Background
clear
is one of the following values:
AClear Line Before & After
BClear Line Before
CClear Line After
DClear Message Area After
EClear Screen Before & After
FClear Screen Before
GClear Screen After
XDo Not Clear
(blank) Do Not Clear
col,ln
the column and line position of the display, where (0,0) specifies the top left of the screen.
*1-replacement
if the message number is null, this can specify a message. If the message number is not null this contains a string value that is to be placed in a message that contains *1, *2, and so on.
msg-dict-name
the name of a Dictionary-IV defined message dictionary.
procedure
the name of a procedure to be performed.
data-name/variable
a numeric data name or variable name.

NOTES

  • If the USING “msg-dict-name” clause is not specified, the system will use the last opened message dictionary. The USING option overrides this default for the current command.
  • INPUT MESSAGE msg-code-string INTO prints the specified message from the message dictionary and stores operator response in the data-name or variable specified by the INTO clause.
  • All parameters specified with the INPUT MESSAGE command override the values defined for the message in the message dictionary.
  • POST-HELP procedure is a procedure performed after help is displayed, if the operator requested on-line help.
  • The replacement value in the msg-code-string can specify a replacement value that is to be placed in a message that contains *1, *2, and so on.
  • In order to perform a replacement, the message must contain a *1. If the replacement value is ABCD, and the message is ‘File *1 is busy,’ then the displayed message will be ‘File ABCD is busy’. For each substitution there is another *n entry in the message, where n is a positive integer.
  • To display a non-dictionary message using the msg-code-string options, specify a null message number, any display mode, clear, or position options and a *n-replacement that equals the message you wish to display.
  • The TERM-KEY variable can be used to specify an input time limit.
  • The elastic string variable ]MD$ controls whether the message is printed in the current window, in a new window, or physically on the screen. For more information see the on-line documentation for the Dictionary-IV API 8MSG and refer to the ninth entry in the 8MSG message array. Setting ]MD$=“*” applies the default.

EXAMPLES

INPUT MESSAGE "I,2" INTO INPUT-FLAG USING "4SSAMPLE"
INPUT MESSAGE "Y,5" INTO INPUT-FLAG
IF INPUT-FLAG = "Y" THEN
LET INPUT-FLAG = "T"
ELSE
IF INPUT-FLAG = "N" THEN
LET INPUT-FLAG = " "
ENDIF
ENDIF

SEE ALSO

OPEN MESSAGE, PRINT MESSAGE, TERM-KEY

From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF