|
On Fri, 29 Jul 2005, Dwayne Allison wrote:
How can I automate it by putting user name in it?
Here's a sample of sending a break message to a user with QEZSNDMG:
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
All you have to do is call it and pass the message & userid:
CALL PGM(WHATEVER) PARM('hello!' USERNAME)
If you modify the parameters to allow for a longer message (which seems
likely) please consider creating a command front-end to prevent garbage in
the command string.
More details about QEZSNDMG can be found here: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/ic2924/info/apis/QEZSNDMG.htm
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.