Consultor Eletrônico



Kbase 12992: S/E 208 PROMPT field should be used with INPUT prefix
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
S/E 208 PROMPT field should be used with INPUT prefix

System Error 208
** PROMPT field <field> should be used with INPUT prefix
or ASSIGNED.
========================================================

This is a compiler warning that the procedure is using
a value in the SCREEN BUFFER (which is not also in the
RECORD BUFFER) in a WHERE clause. The procedure will
still compile and run, but it indicates the developer
has overlooked something with respect to data movement.

=========================================================

The PROMPT statement does not cause a field to be updated
with a value.
It only moves data from the INPUT source (user's
fingertips or maybe a disk file) into the SCREEN BUFFER.
It doesn't move data to the record buffer.

It merely allows the value to be entered for the field and
held as INPUT field, until it is needed.
The adjective INPUT tells PROGRESS to reference a value
in the SCREEN buffer memory area.

The FIND and FOR EACH verbs move data from the database
into the RECORD BUFFER memory area. Consequently, they
default to also looking only in the record buffer area
(which you can think of as the "closest" thing)
for values and expressions and fields used in WHERE
clauses.

If you use it [the field or variable that was
PROMPTed-FOR] as a look-up value, a FIND ... USING will refer
to it. If you use it for assignment, you can refer to it in an
ASSIGN statement or assign it to another field using the INPUT
prefix:
FLD1 = INPUT FLD2.

The SET statement does assign the value entered to the field.

SET is the combination of a PROMPT-FOR _and_ an ASSIGN
verb, and so a copy of the value is placed into _both_
the screen buffer and record buffer, and whether you
include a "INPUT" or a "USING" qualifier, or whether
you don't, suppresses the warning message.

ACTIONS TO TAKE IN MODIFYING THE CODE:

- ASSIGN the value from the screen buffer to the
record buffer, OR
- Qualify the WHERE clause expression with INPUT, OR
- Qualify the WHERE clause expressing with USING
(This choice is only available if the field you
prompted for is an index key), OR
- Change the PROMPT-FOR to a SET.

Progress Software Technical Support Note # 12992