promptok - WORKAROUND

Michael Lee mcl_systems@bc.sympatico.ca
Fri, 04 Jun 1999 09:28:09 -0700


You're welcome Terry and I think others have posted what the problem was: This being the fact that PROMPTOK doesn't get set until AFTER the INPUT procedure. Good call guys.

Michael Lee
MCL Systems Inc.

Terry Pickering wrote:

> Michael Lee suggested:
>
> IF (0 = size(fieldtext) or " " = fieldtext) AND T_QTY_REMAINING > 0
>
> I had to modify it somewhat from what he said, but here is what I ended up with:
>
> PROCEDURE INPUT PO-QTY
> BEGIN
> IF (0 = size(fieldtext) or " " = fieldtext) AND T-QTY-REMAINING > 0
> THEN LET FIELDTEXT = ASCII(T-QTY-REMAINING)
> ELSE
> IF (0 = size(fieldtext) or " " = fieldtext) AND T-QTY-REMAINING <= 0
> THEN ERROR "YOU MUST ENTER A QUANTITY"
> ELSE
> NULL
> END
>
> Still not sure why PROMPTOK is not being re-evaluated. I did find in the manual under the ERROR verb (chapter 12, page 1086) where it says "In many cases QUICK backs up to a previous ACCEPT or PROMPT verb when an error occurs". This appears to be happening because it still prompts for the PO-QTY field. Yet it doesn't set promptok to true after it's entered. Also under the ERROR verb, table 12.2 explains what actions are taken for certain procedures. The INPUT procedure is not listed though. It is listed in table 12.3, but only for errors initiated by ACCEPT, REQUEST and PROMPT verbs.
>
> Maybe one of the wise sages of Powerhouse can further explain this. In any case, thanks Michael for the work around.
>
> Terry P.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Terry Pickering Consultant Extraordinare
> Monday and Friday Tuesday - Thursday
> Portland Eugene
> (503) 245-7178 (541) 687-3416
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l This list is closed, thus to post to the list, you must be a subscriber.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.