Many programmers know how to change system message CPX2313 to get a command line by pressing SysReq-3 at any time. The problem is that if you change the message the command line becomes available to any user in the system. In many environments though most of the users do not have (and do not suppose to have) access to the command line. This tip allows you to resolve that conflict.
1. Create a message file in your library. For example: MYLIB/MYMSGF.
2. Copy message CPX2313 from QCPFMSG to the new message file MYLIB/MYMSGF.
Note: The easiest way to copy a message is to use MRGMSGF command:
MRGMSGF FROMMSGF(QCPFMSG) TOMSGF(MYLIB/MYMSGF) SELECT(CPX2313)
3. Change message CPX3213 in MYLIB/MYMSGF to have WRKJOB instead of DSPJOB (second word in the message text).
4. Create a simple CL program to override message file QCPFMSG to your new message file MYLIB/MYMSGF:
/* MYINITPGM - my initial program */
OVRMSGF MSGF(QCPFMSG) TOMSGF(MYLIB/MYMSGF) SECURE(YES)
5. Specify this program MYINITPGM as an initial program in your user profile:
CHGUSRPRF USRPRF(MYPROFILE) INLPGM(MYLIB/MYINITPGM)
After all this done your next signon to the system will allow you to take SysReq3 any time you need a command line while all other users won't have it.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.