Link to home
Start Free TrialLog in
Avatar of Theo Kouwenhoven
Theo KouwenhovenFlag for Netherlands

asked on

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
Avatar of ShadowProgrammer
ShadowProgrammer

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.
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.
Avatar of Theo Kouwenhoven

ASKER

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.




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...
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.
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 !
ASKER CERTIFIED SOLUTION
Avatar of Member_2_276102
Member_2_276102

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.


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.
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
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