Non-blocking message to user


I have another question today.
I have Map. There is field called Duration.
The field can accept inputs based on the user access.
Assume user A and user B.

Case 1
If user A and duration > 30
Error message. Should not allow to to proceed furtner

If user B and duration >30 and <40> 40
Arror message. Should not allow to proceed further

I did case 1 and case 3 using Reinput *message. How can I address case 2. Using reinput is not allowing me to go further?

I just want avoind to use window+another Map. In worst case I will use both to display the message.


Your case 2 (only two are described, not 3) is not clear. Perhaps you could paste in the actual code.

If the REINPUT is not allowing you to go further, it would imply that your IF statement is true when you are expecting it to be false, so re-examine your boolean logic first.

To repeat what Douglas said; we have no Case 3. I am guessing that Case 2 is between 30 and 40 and Case 3 is greater than 40, but there is no “action” shown for case 2 or 3.

What is not clear at all is what you are trying to do. What do you mean by:

"Should not allow to proceed further "

Does this mean you will issue a STOP?

REINPUT returns to an INPUT statement (and optionally, via FULL), and waits for user input. Unless you change something, the IF (I presume) for cases 1,2, and 3, will still be true. You will be in a loop.

To repeat Douglas again, we need to see the relevant code; the INPUT, the IFs, and the REINPUTs.


I’m going to try and read Mishra’s mind here.

I think Case 2 should be:
if User B and Duration between 30 and 40
user gets warning message but is allowed to continue processing.

and Case 3 should be:
if User B and Duration > 40
user gets error message and is not allowed to continue.

One way to handle this is to set a switch the first time case 2 is encountered so User B would only get the warning once:



Don’t forget to reset the switch.

Hi Douglas,
I did some changes and the message is working as alert. But this creates another problem.
Before my changes when the user was giving a value of less than 30, it was doing the calculations and showing the results on the screen. As the Reinput statement passes the control to the previous Input screen, it is not processing the statements after REINPUT statement. hence not doing the calculation. and showing the result. To see the results I am going back to previous screen and coming back.

I think Now I have to avoid the REINPUT statement and use the WINDOW to display the alert message. So that, I can execute the statements after alert message and see the result.

Thank you and Steve for your valuable time and suggestions in all my needy times. This is the very best place to improve my skills in Natura/Adabas world.


Now I am somewhat confused. You said:

“Case 1
If user A and duration > 30
Error message. Should not allow to to proceed further”

What does this mean??

If I am user A, am I supposed to get a chance to “fix” duration? If so, I want to use REINPUT, perhaps with a counter/flag as Jerome said.

OR, do I accept the value >30, and continue with everything as if the value was less than 30, but also give the user an alert message that output may be wrong because the input value was “wrong”.


Take a look at the INPUT WITH TEXT option ( - this sometimes helps with “warning” alerts. Set a #MSG text variable to blank, process, if the duration/user values cause concern, set the #MSG text, do other calculations, loop back to INPUT statement to display calculation results and alert.

A REINPUT does indeed immediately return to the previous INPUT statement. As such, it is useful for error messages when you do not want to continue processing the screen’s contents until the error condition is rectified. The REINPUT will only update the specified areas of the screen (MARK option), so if your calculation result fields won’t be updated either unless you MARK them also. Using the INPUT/WITH TEXT might be simpler.

Hi Steve,
Sorry for the confuison in my query. Let me give you a clear picture.

Case 1:
IF User is A and duration > 30
Error message. User will be forced to change the duration <30> Done

Case 2:
If user is B and duration > 30 but <40> 40
Error message. User will be forced to change the duration <40> Done

To address the case 2 what I did is:

Defined a window and created a map. The static message on the MAP will be displayed in the window in case of case 2.

Is my solotution OK or any other simple approach is there?

Hope this clears all the confusion.


Hi Mishra;

I have no idea what the following means:

"If user is B and duration > 30 but <40> 40 "

Could you write this out “longhand”; for example (probably wrong)

duration greater than 30 but not equal to 40

It is not clear from what you have written why REINPUT will not work for this case as well.

I understand Case 1. A simple IF test REINPUT. Nothing further happens unless the user enters a valid duration.

From what you have written, it is not clear why Case 2 is not similar to Case 1. Is there some value of duration for which you continue processing even though duration is greater than 30 in Case 2?



I am so sorry to confuse you all the time.
Let me take little time to explain my problem.
Whenever I write a long description, I find some text missing. So I have attached the text file with the details.

Hope this clears all the confusion.

Query.txt (558 Bytes)

Solution looks ok to me. Testing and user acceptance of course are the real proof!