× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Dwayne,

> Is there a command I can put in a CL to get the user work station ID,
> so I can send them a break message.

I'm not convinced that you REALLY want a break message. You might be better off using SNDUSRMSG if you're only communicating with the user attached to the same display as your CL program.

However, if you're trying to contact a user from a batch program, a break message might be in order. And, just for the archive's sake, it's useful to understand how to send a break message to a userid, so here goes:

To do so interactively, just type the following:

CALL QEZSNDMG

It will prompt you for the message and other details. Place a 'Y' under "Interrupt User" to make it a break message.

It's also possible to specify all of the needed info via parameters, which make it possible to send break messages to users from a program, even in batch.

PGM PARM(&MSG &USERID)

DCL VAR(&MSGTYPE) TYPE(*CHAR) LEN(10)
DCL VAR(&DELIVERY) TYPE(*CHAR) LEN(10)
DCL VAR(&MSG) TYPE(*CHAR) LEN(32)
DCL VAR(&MSGLEN) TYPE(*CHAR) LEN(4)
DCL VAR(&USERID) TYPE(*CHAR) LEN(10)
DCL VAR(&NUMUSERS) TYPE(*CHAR) LEN(4)
DCL VAR(&MSGSNT) TYPE(*CHAR) LEN(4)
DCL VAR(&FUNCREQ) TYPE(*CHAR) LEN(4)
DCL VAR(&ERRORCODE) TYPE(*CHAR) LEN(8)
DCL VAR(&DISPLAY) TYPE(*CHAR) LEN(1)
DCL VAR(&MSGQ) TYPE(*CHAR) LEN(20)
DCL VAR(&DSTTYPE) TYPE(*CHAR) LEN(4)
DCL VAR(&CCSID) TYPE(*CHAR) LEN(4)

CHGVAR VAR(&MSGTYPE) VALUE('*INFO')
CHGVAR VAR(&DELIVERY) VALUE('*BREAK')
CHGVAR VAR(&DISPLAY) VALUE('N')
CHGVAR VAR(&DSTTYPE) VALUE('*USR')

CHGVAR VAR(%BIN(&MSGLEN)) VALUE(32)
CHGVAR VAR(%BIN(&NUMUSERS)) VALUE(1)
CHGVAR VAR(%BIN(&MSGSNT)) VALUE(0)
CHGVAR VAR(%BIN(&FUNCREQ)) VALUE(0)
CHGVAR VAR(%BIN(&ERRORCODE 1 4)) VALUE(0)
CHGVAR VAR(%BIN(&CCSID)) VALUE(0)

CALL PGM(QEZSNDMG) PARM(&MSGTYPE +
&DELIVERY +
&MSG +
&MSGLEN +
&USERID +
&NUMUSERS +
&MSGSNT +
&FUNCREQ +
&ERRORCODE +
&DISPLAY +
&MSGQ +
&DSTTYPE +
&CCSID )

ENDPGM



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.