Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Default reply taken when pressing enter on halt

254 views
Skip to first unread message

Scott Coffey

unread,
Nov 30, 2012, 10:37:21 AM11/30/12
to
I've Googled this but can't come up with anything...

A user got a duplicate key halt when adding records to a database
file. When the system issued the duplicate key halt error (attempts
to write duplicate record (C G S D F)), the user simply pressed enter
without taking a response, and the system defaulted to a "C". When I
look in the joblog, I see that the message type is "Message default
reply".

I looked in the system reply list and didn't see an entry for this
halt, so I'm wondering where it's getting the default reply from? I
want to prevent this (pressing enter without entering a reply yields a
default response) going forward but don't know how to proceed. Could
someone provide some help?

BTW, I tested this on a couple of different systems and they both do
the same thing.
--
ScottCoffey at Scott dash(-) Coffey dot net

Marc Rauzier

unread,
Nov 30, 2012, 1:18:59 PM11/30/12
to
Scott Coffey écrivait dans
news:ugjhb8tbfdebmgr0u...@4ax.com ce qui suit:

> I've Googled this but can't come up with anything...
>
> A user got a duplicate key halt when adding records to a database
> file. When the system issued the duplicate key halt error
> (attempts to write duplicate record (C G S D F)), the user simply
> pressed enter without taking a response, and the system defaulted
> to a "C". When I look in the joblog, I see that the message type
> is "Message default reply".
>
> I looked in the system reply list and didn't see an entry for this
> halt, so I'm wondering where it's getting the default reply from?
> I want to prevent this (pressing enter without entering a reply
> yields a default response) going forward but don't know how to
> proceed. Could someone provide some help?

Look at the message id in the message file with command DSPMSGD or
WRKMSGD.

>
> BTW, I tested this on a couple of different systems and they both
> do the same thing.



--
Cordialement
Marc Rauzier
(pour me répondre, ne pas utiliser le from mais le reply-to)

Ken Sims

unread,
Nov 30, 2012, 4:31:20 PM11/30/12
to
Hi Scott -

On Fri, 30 Nov 2012 10:37:21 -0500, Scott Coffey
<no...@noemail.com.invalid> wrote:

>I looked in the system reply list and didn't see an entry for this
>halt, so I'm wondering where it's getting the default reply from? I
>want to prevent this (pressing enter without entering a reply yields a
>default response) going forward but don't know how to proceed. Could
>someone provide some help?

The default reply for a given message is part of the message
description attributes in the message file. It's visible with
DSPMSGD. This is completely separate from the system reply list.

The system reply list can be used to automatically generate a reply to
a message without the message being displayed to the user at all.

--
Ken
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.

Scott Coffey

unread,
Dec 5, 2012, 7:54:51 AM12/5/12
to
On Fri, 30 Nov 2012 13:31:20 -0800, Ken Sims
<ng12207@kensims.#nospam#.net.invalid> wrote:

>Hi Scott -
>
>On Fri, 30 Nov 2012 10:37:21 -0500, Scott Coffey
><no...@noemail.com.invalid> wrote:
>
>>I looked in the system reply list and didn't see an entry for this
>>halt, so I'm wondering where it's getting the default reply from? I
>>want to prevent this (pressing enter without entering a reply yields a
>>default response) going forward but don't know how to proceed. Could
>>someone provide some help?
>
>The default reply for a given message is part of the message
>description attributes in the message file. It's visible with
>DSPMSGD. This is completely separate from the system reply list.
>
>The system reply list can be used to automatically generate a reply to
>a message without the message being displayed to the user at all.

OK, thanks for that.

The message ID is RPG1021 (duplicate key halt). I can see that the
default reply is "C". I tried changing the default reply to *NONE,
but it's still not giving me the results I want (so I changed it
back).

In this instance the user pressed enter on three different halts:

RPG1021 - duplicate key halt. Pressed enter, default "C" was taken,
RPG9001 received by CL program blah, blah. Pressed enter, default "C"
was taken.
CPF9999 received by CL program blah, blah. Pressed enter, default "C"
was taken.

I would prefer that pressing enter on these halts just asked the user
to enter a correct response. Is that possible?

Ken Sims

unread,
Dec 5, 2012, 4:35:11 PM12/5/12
to
Hi Scott -

On Wed, 05 Dec 2012 07:54:51 -0500, Scott Coffey
<no...@noemail.com.invalid> wrote:

>The message ID is RPG1021 (duplicate key halt). I can see that the
>default reply is "C". I tried changing the default reply to *NONE,
>but it's still not giving me the results I want (so I changed it
>back).
>
>In this instance the user pressed enter on three different halts:
>
>RPG1021 - duplicate key halt. Pressed enter, default "C" was taken,
>RPG9001 received by CL program blah, blah. Pressed enter, default "C"
>was taken.
>CPF9999 received by CL program blah, blah. Pressed enter, default "C"
>was taken.
>
>I would prefer that pressing enter on these halts just asked the user
>to enter a correct response. Is that possible?

As a side note, ideally the program should handle a duplicate key
error if it is a situation that could be expected to ever occur. I.e.
two users attempting to add the same value to a master file at the
same time. The user should never see the system inquiry message.
However that's not always possible, especially if dealing with
third-party software.

Getting back to the specific question ...

I ran a test. With a default reply of *NONE, the operating system was
still happy to accept just the Enter key, and returned a null reply
(indicated on the screen by *N) to the program instead of the original
C default reply.

The RPG400 error handler appear to treat the null response the same as
a C response.

So it *appears* to not be possible to force the user to have to
actually key one of the valid responses.

Scott Coffey

unread,
Dec 6, 2012, 7:20:17 AM12/6/12
to
That's my finding too Ken. I appreciate your testing it locally.

Tom Liotta

unread,
Dec 11, 2012, 7:40:35 PM12/11/12
to
On 12/5/2012 4:54 AM, Scott Coffey wrote:

> I would prefer that pressing enter on these halts just asked the user
> to enter a correct response. Is that possible?

What is the "correct response"? Why not just change the default to
be the "correct response"?

Tom Liotta
0 new messages