Send a break message to multiple users

140 pts.
Tags:
CL
CL/400
How to send a break message to multiple users.SNBRKMSG has the option to send it only to worksations.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Don’t use SNDBRKMSG. Instead, wrap the QEZSNDMG API in a CL and use that, since it allows you to send to a user profile and not just a workstation. Here’s my example:

PGM PARM(&MSGTEXT &USERID)

DCL VAR(&MSGTYPE) TYPE(*CHAR) LEN(10) +
VALUE(‘*INFO’)
DCL VAR(&DELMODE) TYPE(*CHAR) LEN(10) +
VALUE(‘*BREAK’)
DCL VAR(&MSGTEXT) TYPE(*CHAR) LEN(256)
DCL VAR(&MSGLENG) TYPE(*CHAR) LEN(04) +
VALUE(X’00000100′)
DCL VAR(&USERID) TYPE(*CHAR) LEN(10)
DCL VAR(&USRCNT) TYPE(*CHAR) LEN(04) +
VALUE(X’00000001′)
DCL VAR(&MSGSENT) TYPE(*CHAR) LEN(04) +
VALUE(X’00000000′)
DCL VAR(&FUNCREQ) TYPE(*CHAR) LEN(04) +
VALUE(X’00000000′)
DCL VAR(&ERROR) TYPE(*CHAR) LEN(256) +
VALUE(X’00000100′)
DCL VAR(&SHOWMSG) TYPE(*CHAR) LEN(01) VALUE(‘N’)
DCL VAR(&REPLYMQ) TYPE(*CHAR) LEN(20)
DCL VAR(&NAMETYPE) TYPE(*CHAR) LEN(04) +
VALUE(‘*USR’)

CALL PGM(QSYS/QEZSNDMG) PARM(&MSGTYPE &DELMODE +
&MSGTEXT &MSGLENG &USERID &USRCNT +
&MSGSENT &FUNCREQ &ERROR &SHOWMSG +
&REPLYMQ &NAMETYPE)

ENDPGM: ENDPGM

Then, just call this CL from your programs or whatever and provide it with the message you want to send as well as the user. Unfortunately, you’ll have to iterate through calling it again and again if you want to send it to multiple users.

–HTH, Koohiisan.

———————
If you have TATOOLs.
Snd Brk Msg to Active WS – TAA (SNDBRKACT) will do what you want.

MAKE IT SIMPLE USE THE KISS RULE. ON A COMMAND LINE KEY IN ‘GO MESSAGE’ IT WILL BRING YOU TO A MESSAGE SCREEN THAT YOU CAN CHOOSE WHAT TYPE OF MESSAGE YOU WANT TO SEND. PICK THE TYPE YOU WANT TO SEND PRESS ENTER. IT WILL BRING YOU TO A SCREEN WERE YOU CAN ENTER YOUR TEXT FOR YOUR MESSAGE. THEN BELOW THAT YOU CAN CHOOSE *ALLWS WHICH MEANS TO ALL WORKSTATIONS OR YOU CAN PUT IN A LIST OF THE DIFFERENT WORKSTATIONS.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cwc
    Alternatively, you could write a CL program that would create an output file of all the active users to whom you want to send a break message, and would then loop through the file to send each of those users the message.
    4,290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following