Kbase 33592: FOR FIRST not clearing record buffer after block is finished
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Solution ID: P3592
FACT(s) (Environment):
Progress 9.1x
SYMPTOM(s):
Running this code against sports:
FOR FIRST order WHERE order.cust-num = 10 AND order.sales-rep = 'SLS':
END.
DISPLAY order.
MESSAGE AVAILABLE order VIEW-AS ALERT-BOX INFO BUTTONS OK.
displays "YES" where actually it should return "NO" and error 91
** No <file-name> record is available. (91)
CAUSE:
The record buffer is not always cleared when it should be
FIX:
The state of a FOR block buffer is UNDEFINED after the END statement. If the developer wants a record from within the FOR block to be available outside the
FOR block, then the LEAVE statement should be used inside the FOR block.
For example,
FOR FIRST order WHERE order.cust-num = 10 AND order.sales-rep = 'SLS':
LEAVE.
END.
DISPLAY order.
MESSAGE AVAILABLE order VIEW-AS ALERT-BOX INFO BUTTONS OK.