Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
Hi Rob -
I have a command that I ran
CHGCMD CMD(SNDBRKMSG) ALLOW(*IMOD *BMOD *IREXX *BREXX *BPGM *IPGM *EXEC
*BATCH)
Basically it has everything but *interact because I had users that went
nuts with SNDBRKMSG to all users.
I have a utility program called SNDBRKUSR that finds all the sessions for
a user, using api's, and then sends a break message to those sessions.
However, since I took away *INTERACT this code:
cmd='SNDBRKMSG MSG(' + Apostrophe + %Trim(BrkMsg) + Apostrophe +
') TOMSGQ(' + %trim(JLJobNam) + ')';
qcmdexc(cmd:%len(%trim(cmd)));
generates this:
CPD0031-Command SNDBRKMSG not allowed in this setting.
I take it I either add *INTERACT back in, or replace the call to QCMDEXC
with a CL program, right?
From the Fine Manual: __________ *EXECThe command can be used as a parameter on the CALL command and be passed as a character string to the system program QCMDEXC (or QCAEXEC) for processing. If *EXEC is specified, either *BATCH or *INTERACT must also be specified.
__________You need *EXEC to use SNDBRKMSG with QCMDEXC and need either *BATCH or *INTERACT depending on the environment.
For your purposes it sounds like using a CL program is the simplest thing. Just a side note, you should use %trimr, not %trim, in%len(%trim(cmd)), otherwise if there are any leading blanks in the command, that many non-blank characters will be lost from the end because the length parameter will be less than what it should be by the number of leading blanks. Also, %trimr runs faster than %trim because it only has to trim one end.
Ken http://www.ke9nr.net/ Opinions expressed are my own and do not necessarily represent the views of my employer or anyone in their right mind.
This mailing list archive is Copyright 1997-2026 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.