Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display message

Status
Not open for further replies.

loonybin

Programmer
Dec 12, 2002
38
US
Hi In my previous job, everytime i submit a job, it sends me a message when the job is finished. For example I compile a program, it tells me that the job ended normally or not as soon at it finished running. I don't have to look at the spooled file or do a dspmsg to see if the job had ended.
does anyone know how I could set up my sessions like this?

Please help. Thanks in advance.
 
Do you mean break messages? Try at the command line:-

CHGMSGQ MSGQ(YourProfile) DLVRY(*BREAK)




Dazed and confused
 
If you want to get really clever, I issue this command:-

CHGMSGQ MSGQ(MyProfile) DLVRY(*BREAK) +
PGM(MyProfile/RMUMSGC1)


And when I get a message, it triggers this program to display the message on the bottom on the screen only without displaying a message that stops me working:-


PGM (&P1MSGQ &P1MSGL &P1MSGK)
DCL VAR(&P1MSGQ) +
TYPE(*CHAR) LEN(10)
DCL VAR(&P1MSGL) +
TYPE(*CHAR) LEN(10)
DCL VAR(&P1MSGK) +
TYPE(*CHAR) LEN(7)
DCL VAR(&W1MSGD) +
TYPE(*CHAR) LEN(80)
DCL VAR(&W1MSGO) +
TYPE(*CHAR) LEN(78)

RCVMSG MSGQ(&P1MSGL/&P1MSGQ) +
RMV(*NO) MSG(&W1MSGD)MSGID +
(&P1MSGK)

CHGVAR VAR(&W1MSGO) VALUE('** ' *CAT +
%SST(&W1MSGD 1 72) *TCAT +
'**') SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) +
MSGDTA(&W1MSGO) +
TOPGMQ(*EXT) +
MSGTYPE(*STATUS)


Dazed and confused
 
Alternatively you can alter your user profile.

CHGUSRPRF USRPRF(YOURPROFILE) DLVRY(*BREAK)

This way you don't have to keep typing the command. You'll need to log off and back on before it takes effect the first time.

--------------------------------
Codito, ergo sum
 
Skittle,
Immediately after sending the status msg, use DLYJOB 2 or 3 sec for you to have time to read the message.
Just my 2 cents hint.
 
Than you all for your replies. I want the message to be displayed at the bottom of the screen.
For me to get the msgs, do I execute this command to all my sessions everytime? Also those parameters are automatically going to get filled?

CHGMSGQ MSGQ(MyProfile) DLVRY(*BREAK) +
PGM(MyProfile/RMUMSGC1)

Thanks again.
 
Than you all for your replies. I want the message to be displayed at the bottom of the screen.
For me to get the msgs, do I execute this command to all my sessions everytime? Also those parameters are automatically going to get filled?

CHGMSGQ MSGQ(MyProfile) DLVRY(*BREAK) +
PGM(MyProfile/RMUMSGC1)

Thanks again.
 
thank you. very interesting! The message is getting displayed at the bottom of the page. but the problem is only to the screen that i executed the chgmsgq command from. I want it to be displayed on the session that I submitted the job from and not to the session that I called the chgmsgq. Please advise. Thanks.
 

Messages can be displayed to a workstation two ways.
1. Too the workstation's message queue.
2. A user (profile) specific message queue.

If your submit jobs are routing messages to your user message queue, then using CHGMSGQ MSGQ(MyProfile) will send messages to the workstation (job) that has the lock on the message queue. What this means is if you logon to DSP02 and then DSP03. DSP02 has the lock on the user message queue. If you submit a job from DSP03 the message will show up on DSP02. Make sense!

In order to have it routed to the workstation that submitted the job use the RTVJOBA (to get the submit message queue) in a CL and upon completion send a message to that message queue.

I hope this helps..

[thumbsup2]

 
You cant do it. Only one job( session) in one moment can have DLVRY(*BREAK) or DLVRY(*NOTIFY) on msgq. Try next:
1) CHGMSGQ MSGQ(Work station name of your session) DLVRY(*BREAK)
2) In sbmjob command use MSGQ(*WRKSTN)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top