Hello,
Here is a Clist version, invoked in TSO batch. Check it against what you
are doing in REXX. (I am putting everything in quotes to avoid my
email's data being interpreted as commands.)
MEMBER NAME TSOSEND (JCL)
"// ... <job card> ... "
"/*JOBPARM SYSAFF=(<LPAR>) "
"//* "
"//*********************************************************************"
"//* NOTE: NO LINE NUMBERS IN COLS 73-80 ALLOWED, ELSE CLIST FAILS! *"
"//* ¯¯¯¯¯ *"
"//*********************************************************************"
"//* NOTE: 'U' => TSO USERID(S); SPECIFY LIST OF USERIDS UNDER DESTIDS *"
"//* ¯¯¯¯¯ 'C' -> CONSOLE; SPECIFY MASTER ETC. UNDER CONSIDS *"
"//* *"
"//* 04/01/95 CMP *"
"//*********************************************************************"
"//* "
"//* "
"//CLIST EXEC PGM=IKJEFT01, "
"// REGION=512K, "
"//* PARM='%TSOSEND DESTIDS SYSIN USERID' "
"// PARM='%TSOSEND CONSIDS SYSIN CONSOLE' "
"//* "
"//SYSPROC DD DISP=SHR,DSN=<Clist DSN> "
"//SYSTSIN DD DUMMY "
"//SYSTSPRT DD SYSOUT=* "
"//CONSIDS DD * "
"... <master console ID> ... "
"//* "
"//DESTIDS DD * "
"... <userid(s)> ... "
"//SYSIN DD * "
"... <multi-line message> ... "
"... <... ditto etc etc.> ... "
" "
"/* "
"//* "
"// "
MEMBER NAME TSOSEND
"PROC 2 DESTLIST MESSAGE DEBUG USERID CONSOLE "
"/*------------------------------------------------------------------*/ "
"/* N.B. DEFAULT IS 'NOW' */ "
"/* 'LOGON' -> 'NOW' IF LOGGED ON, ELSE AT LOGON TIME. */ "
"/* 'SAVE' -> ONLY AT NEXT LOGON TIME (OR LISTBC) */ "
"/* */ "
"/* PARMS: DESTLIST DDNAME OF USERS/CONSOLES TO WHOM MESSAGE ISTO */ "
"/* BE SENT - DEFAULT=NONE */ "
"/* MESSAGE: DDNAME OF MESSAGE TEXT TO BE SENT - DEFAULTNONE */ "
"/* DEBUG: SETS TRACE ON - DEFAULT=OFF */ "
"/* */ "
"/* 13/12/94 CMP - ALLOW SENDING TO USERID(S) OR TO MVS CONSOLES) */ "
"/* 17/04/89 CMP */ "
"/*------------------------------------------------------------------*/ "
"CONTROL: + "
" CONTROL END(ENDO) "
" IF &DEBUG = DEBUG | &DEBUG = D THEN + "
" CONTROL LIST SYMLIST CONLIST MSG ASIS "
" ELSE + "
" CONTROL NOLIST NOSYMLIST NOCONLIST NOMSG ASIS "
"ERROR: + "
"ERROR DO "
" SET CC = &LASTCC "
" IF &CC = 400 THEN RETURN "
" ELSE DO "
" WRITE ERROR WITH CONDITION CODE = &CC OCCURRED : INTERRUPT A LABEL + "
" 'ERROR' "
" WRITE CLIST RUN ABANDONED "
" GOTO EXIT "
" ENDO "
" ENDO "
" "
"IF &USERID ¬= THEN SET TO = USER "
"ELSE IF &CONSOLE ¬= THEN SET TO = CN "
"ELSE + "
"WHERE: + "
" DO "
" WRITE YOU MUST SPECIFY PARAMETER 'USERID' OR 'CONSOLE' "
" WRITE "
" GOTO EXIT "
" ENDO WHERE "
" "
"SET SENDTO = "
"SET K = &&K "
"SET USREC = &&&DESTLIST "
"SET MSGREC = &&&MESSAGE "
"SET MAXCC = 0 "
"OPENFILE &DESTLIST INPUT "
"GETFILE &DESTLIST "
"DO I = 0 TO 99 WHILE &MAXCC = 0 "
" SET USER = &USREC "
" SET J = &SYSINDEX(&STR( ),&USER,1) "
" SET J = &J - 1 "
" SET USER = &SUBSTR(1:&J,&USER) "
" SET SENDTO = &STR(&SENDTO&USER,) "
" GETFILE &DESTLIST "
" ENDO "
"CLOSFILE &DESTLIST "
"IF &I > 0 THEN + "
" DO "
" SET LSENDTO = &LENGTH(&STR(&SENDTO)) - 1 "
" SET SENDTO = &SUBSTR(1:&LSENDTO,&STR(&SENDTO)) "
" SET MSG = &&MSG "
" SET MAXCC = 0 "
" OPENFILE &MESSAGE INPUT "
" GETFILE &MESSAGE "
" DO J = 1 TO 99 WHILE &MAXCC = 0 "
" SET MSG&J = &SUBSTR(1:71,&MSGREC) "
" SET K0 = 1 "
" DO I = 1 TO 99 WHILE &K&EVAL(&I-1) > 0 "
" SET K&I = &SYSINDEX(&STR('),&STR(&MSG&J),&K&EVAL(&I-1)) "
" IF &K&I > 0 THEN SET K&I = &K&I + 1 "
" ENDO "
" DO L = &I-2 TO 1 BY -1 WHILE &K&L > 0 "
" SET MSG&J = &SUBSTR(1:&K&L-1,&STR(&MSG&J))&STR(')+ "
" &SUBSTR(&K&L:&LENGTH(&STR(&MSG&J)),&STR(&MSGJ)) "
" ENDO "
" GETFILE &MESSAGE "
" ENDO "
" SET J = &J - 1 "
" DO I = 1 TO &J "
" SEND '&MSG&I' + "
" &TO(&STR(&SENDTO)) LOGON "
" ENDO "
" ENDO "
"EXIT: + "
" EXIT CODE(0) "
Cheers, CP (retired sysprog)
Post by saurabh khandelwalHello,
Thanks for reply.
below command doesn't work. After changing
mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
to
mvs "send 'AG54LST JOB "mtxt"',user(AG54),now"
I stopped getting any notification as i was getting on any system.
Is there any other syntax for this command .
here mtxt is notthing but a tapped message from syslog , we tried to
capture using netview and we should like to display it to particular tso
user when even triger.
but instead , it was displaying it to all users. I am unable to find
correct way to isolate this issue.
On Fri, Jun 8, 2018 at 1:52 PM, Elardus Engelbrecht <
Post by Elardus EngelbrechtPost by saurabh khandelwal000120 parse arg mtxt . mtxt
How long is that mtxt? If it is too long, the rest of the message command
will be trimmed off.
Post by saurabh khandelwal000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
mvs "send 'AG54LST JOB "mtxt"',user(AG54),now"
Look up SEND for specific message receivers in
https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/
com.ibm.zos.v2r2.ieag100/s1mess1.htm
Disclaimer - I am not a NETVIEW expert anymore...
So, you, not me, need to double check all those ' and " are properly balanced.
Groete / Greetings
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN