Change defaut reply on errormessage

Hi Experts,

More then onec some stupid users (it seems they will never learn) press enter on a system message.
result..... cancel the job.
- Is there a way to change the default answer from 'C' into 'R' (if available) ?
- Is it possible to make the 'C' protected for some users or for a group ?

I know the software has to be build so that no errors will occur, but this is not paradise so.....

Thanks,
Murph
LVL 17
Theo KouwenhovenApplication ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ShadowProgrammerCommented:
from command entry - enter command WRKMSGF and prompt (F4)

The main system message file is QCPFMSG in QSYS....   choose this message file

specify the error message you would like to change the default reply in the position to and press enter.

First - view the message details (option 5) - you are interested in
reply specifications - describes valid replies
and message attributes - includes the default reply


Ready to change default reply, use option 2 which will prompt the CHGMSGD (change message description) command prefilling all prompts with current values.... scroll down to default reply and put in the desired default reply.

Tony.
ShadowProgrammerCommented:
Some extra information...
If you want, you can just go straight to the CHGMSGD command but this won't prefill the current values - every field is marked *SAME (ie. no change)....

Also be warned, when you upgrade the operating system, QCPFMSG will be overwritten with a new version which will have IBMs default replies....

What you could do...  is write a CL program to have a list of change message description commands

CHGMSGD   MSGID(MSG1) MSGF(QSYS/QCPFMSG) DFT('R')
CHGMSGD   MSGID(MSG2) MSGF(QSYS/QCPFMSG) DFT('R')
etc...

So that after a system upgrade, you can call the CL program to RE-SET to your desired defaults.  
It may be worth checking that these messages have not changed as part of the upgrade before running the CL.

Tony.
Theo KouwenhovenApplication ConsultantAuthor Commented:
Hello Tony,

Yep that is the solution I had in mind, but I don't like to change system default commands, message files etc.
I like to be able to arrange it for a user or a usergroup.




Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

LewisPowerCommented:
I Murphey,

The solution made by Tony was also my suggestion.

The way you could do it for specifics users would be to have more than one copy of QCPFMSG file... And to be sure the place where you'll saved it will be in front of QSYS in there library list... Not sure this solution would be better than changing default value of the message...
ShadowProgrammerCommented:
Is your question related to one (or more) specific error messages ?   or ALL error messages in general ?

If you are talking about one or more specific error messages there may be a better solution than changing the default reply...   what is/are the error message(s) ?


I am not too sure how easy to implement individual copies of QCPFMSG by user or groups of users will be..
- it would depend on the number of different groups you want to break the users into
- you would need to cater for system upgrades... copy the new QCPFMSG to all locations and keep a seperate list of each groups changes (or as previously suggested have a seperate program to change each copy)
- ensure that each user or group of users had a different library list to force "their" QCPFMSG to the top of the list.

Tony.
LewisPowerCommented:
Finaly, I think it would be better to change QCPFMSG file directly in QSYS.

Just think that every upgrade, you will need to do all the steps again (copy the new QCPFMSG file to your lib(s) and then change the default again). Cause will want to have a complete QCPFMSG file in your specifics lib(s)...

So using main QCPFMSG file and have one-shot program is probabely the easiest way !
Member_2_276102Commented:
Murph:

One possibility... OVRMSGF QCPFMSG for users or user groups. You could create an alternative msgf that contains only those msgids that you want included. Set defaults or valid reply values any way you wish. Execute the override in an initial program or routing program or wherever needed.

I've never tried this for inquiry messages, but it can be tested easily enough with a simple CL program and you don't even need to test with QCPFMSG.

A msgf override will look through the new msgf for a msgid before looking in the overridden msgf. If a msgid exists in the new msgf, it'll use that one. (Heh, I've executed OVRMSGF at a QSYSOPR session for unsuspecting operators and put bogus msgids in the new msgf just to watch them scratch their heads after DSPMSG QSYSOPR or DSPJOBLOG.)

Tom

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Theo KouwenhovenApplication ConsultantAuthor Commented:
Hi ShadowProgrammer,


On this moment it's just one RPG1218 (can not allocate record).
but maybe it isn't a bad idea to set the 'R' reply for all messages
that have the posibility to retry. we have to discuss it in the team.


ShadowProgrammerCommented:
If it is basically RPG1218, I would be inclined to change the default reply in the QSYS version.  

It requires no programming and the change is immediate.

Tony.
Member_2_276102Commented:
Murph:

I'd be very careful about a mass change to msgs that allow C/R alternatives. This would be especially true for jobs that could be submitted as SBMJOB INQMSGRPY(*DFT).

Tom
Theo KouwenhovenApplication ConsultantAuthor Commented:
Hi Tom,

Thanks for this remark, I don't need it for batch jobs, it's only to protect the system against the most supid one. ;-)
On this moment it's included in just 2 Interactive CL's

Thanks a lot
Murph
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.