Return to the API Tips
Use QEZSNDMG to SNDBRKMSG to only active work stations.
Compile it with QSYS/QEZSNDMG as the command-processing program.
Example usage might be:
sndbrkmsga msg('Only for active') msglen(15) + rcp(*ALLACT) nbrrcp(1) namtyp(*DSP)
See the Operational Assistant API guide for documentation on QEZSNDMG
if you want details about the parms. It isn't perfect for command-line usage,
but it makes it easy to see how the API works and to code simple CL to take advantage.
Tom Liotta
Command definition:
/*-----------------------------------------------------------*/ /* Use QEZSNDMG as the CPP */ /*-----------------------------------------------------------*/ SNDBRKMSGA: CMD PROMPT('Send break message (assisted)') PARM KWD(MSGTYP) TYPE(*CHAR) LEN(10) RSTD(*YES) + DFT(*INFO) VALUES(*INQ *INFO) + PROMPT('Message type') PARM KWD(DLVRY) TYPE(*CHAR) LEN(10) RSTD(*YES) + DFT(*BREAK) VALUES(*BREAK *NORMAL) + PROMPT('Delivery mode') PARM KWD(MSG) TYPE(*CHAR) LEN(494) EXPR(*YES) + PROMPT('Message text') PARM KWD(MSGLEN) TYPE(*INT4) DFT(*MAX) + SPCVAL((*MAX 494) (*MIN 0)) EXPR(*YES) + PROMPT('Message text length') PARM KWD(RCP) TYPE(*CHAR) LEN(1000) EXPR(*YES) + PROMPT('Recipients') PARM KWD(NBRRCP) TYPE(*INT4) EXPR(*YES) + PROMPT('Number of recipients') PARM KWD(MSGSNT) TYPE(*CHAR) LEN(4) + CONSTANT(X'00000000') PARM KWD(FUNC) TYPE(*CHAR) LEN(4) RTNVAL(*NO) + CONSTANT(X'00000000') /* */ /* ERRCOD: Required ERRCODE definition minimum... */ /* */ PARM KWD(ERRCOD) TYPE(*INT4) CONSTANT(0) /* */ /* Optional parameter group #1... */ /* */ PARM KWD(SHOSNDDSP) TYPE(*CHAR) LEN(1) RSTD(*YES) + DFT(*NO) SPCVAL((*YES Y) (*NO N)) + EXPR(*YES) PROMPT('Show "Send a message" + display') PARM KWD(RPYMSGQ) TYPE(QRPYMSGQ) + PROMPT('Qualified reply *msgq name') QRPYMSGQ: QUAL TYPE(*NAME) LEN(10) QUAL TYPE(*NAME) LEN(10) SPCVAL((*CURLIB) + (*LIBL)) PROMPT('*msgq library') PARM KWD(NAMTYP) TYPE(*CHAR) LEN(4) RSTD(*YES) + DFT(*USR) VALUES(*USR *DSP) EXPR(*YES) + PROMPT('Name type') -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 Fax 253-872-7904 http://www.400Security.com
[report a broken link by clicking here]