Problem solve Get help with specific problems with your technologies, process and projects.

Using a "?" to prompt for valid values

I have a program where the user enters a "?" to prompt for valid values and then calls another program where the user can select the value he wishes. This value is passed between the two programs using parms. When I return to the calling program, I immediately validate the selected value, seton an error indicator and do EXFMT. When an error condition exists, the fields where I keyed "?" still have the "?" instead of the selected value.

If I remove the error messages from the display file, the fields where I keyed "?" have the values I selected. What do I need to do to have the selected values display when I have an error condition?

There are several things that could be causing this and without seeing your DDS or program, I'll give you a couple general suggestions. The first thing to do is to figure out if this is a display file problem or a program problem. I would do this by putting the program into debug and looking at the contents of your fields right before the EXFMT. If the field is filled correctly but just not displaying properly, then check your DDS keywords. A couple keywords to look at in particular, make sure your DSPF is compiled as RSTDSP(*YES), if you are using PUTOVR, make sure you have OVRDTA specified on your fields. If this is a display problem and this still doesn't fix it, then you might want to check the keywords and functions associated with your error messaging. If it is a program problem and not a display problem, then it should be relatively easy to fix.

This was last published in December 2002

Dig Deeper on iSeries COBOL programming

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.