Re: MVS send command in REXX

2018-06-11 Thread Nims,Alva John (Al)
Does the contents of "mtxt" happen to have a parentheses ["(" or ")"]?  Several 
years ago, I worked at a shop that we maintained the broadcast messages, this 
was a multiple send situation, but might be applicable, but if one line had a 
"(" in it and with the closing ")" on the next line, it would totally mess up 
and we had to rework the message so that both "(" and ")" were on the same send 
command to work.

Don't know if that is your problem, but thought I would put that out there.

Al Nims
Systems Admin/Programmer III
UF Information Technology
East Campus 
P.O. Box 112050
Gainesville, FL. 32611
(e) ajn...@ufl.edu 
(p) (352) 273-1298

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of saurabh khandelwal
Sent: Saturday, June 09, 2018 12:27 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: MVS send command in REXX

Hello,

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 < 
elardus.engelbre...@sita.co.za> wrote:

> saurabh khandelwal wrote:
>
> >000120 parse arg mtxt . mtxt
>
> How long is that mtxt? If it is too long, the rest of the message 
> command will be trimmed off.
>
>
> >000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
>
> Change above to this (replacing two spaces with two commas):
>
>  mvs "send 'AG54LST JOB "mtxt"',user(AG54),now"
>
> Look up SEND for specific message  receivers in
>
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ibm.com_suppo
> rt_knowledgecenter_SSLTBW-5F2.2.0_=DwIBaQ=pZJPUDQ3SB9JplYbifm4nt2l
> EVG5pWx2KikqINpWlZM=0Ef64GJS77DVfhr5GGKZeQ=ChEpTjtAfIGIeIguFdpbIOZ
> 9it2jm0UHEzW4CP3CBJc=MRuaj8EZbz1UR_mOmI804GVPybeqMi6oXDIJ1JYv1z4=
> 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, send 
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-10 Thread saurabh khandelwal
changing  user=(AG54) from  user(AG54) finally worked for me  and now this
command performing correctly.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-09 Thread ITschak Mugzach
tso and console send commad syntax is different.

ITschak

בתאריך שבת, 9 ביוני 2018, 16:39, מאת Bill Godfrey ‏:

> According to the Knowledge Center link that was given, user(AG54) should
> be user=(AG54).
>
> Bill
>
> On Sat, 9 Jun 2018 07:27:19 +0300, saurabh khandelwal wrote:
>
> >Hello,
> >
> >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 wrote:
> >
> >> saurabh khandelwal wrote:
> >>
> >> >000120 parse arg mtxt . mtxt
> >>
> >> How long is that mtxt? If it is too long, the rest of the message
> command
> >> will be trimmed off.
> >>
> >>
> >> >000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
> >>
> >> Change above to this (replacing two spaces with two commas):
> >>
> >>  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.
> >>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-09 Thread Bill Godfrey
According to the Knowledge Center link that was given, user(AG54) should be 
user=(AG54).

Bill

On Sat, 9 Jun 2018 07:27:19 +0300, saurabh khandelwal wrote:

>Hello,
>
>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 wrote:
>
>> saurabh khandelwal wrote:
>>
>> >000120 parse arg mtxt . mtxt
>>
>> How long is that mtxt? If it is too long, the rest of the message command
>> will be trimmed off.
>>
>>
>> >000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
>>
>> Change above to this (replacing two spaces with two commas):
>>
>>  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.
>>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Quotes? (was: MVS send command in REXX)

2018-06-09 Thread Paul Gilmartin
On Sat, 9 Jun 2018 06:26:36 +0100, CM Poncelet wrote:
> 
>... (I am putting everything in quotes to avoid my
>email's data being interpreted as commands.)
>
When does such a problem occur?  (Example?)  Have you a broken
Mail User Agent?

> MEMBER NAME  TSOSEND (JCL)
>"// ...  ...  "
>"/*JOBPARM SYSAFF=()  "
>"//*    "
>"//*"
>"//* NOTE: NO LINE NUMBERS IN COLS 73-80 ALLOWED, ELSE CLIST FAILS!    *"
>...

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread CM Poncelet
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)
"// ...  ...  "
"/*JOBPARM SYSAFF=()  "
"//*    "
"//*"
"//* 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=    "
"//SYSTSIN  DD  DUMMY   "
"//SYSTSPRT DD  SYSOUT=*    "
"//CONSIDS  DD  *   "
"...  ...    "
"//*    "
"//DESTIDS  DD  *   "
"...  ...    "
"//SYSIN    DD  *   "
"...  ...   "
"... <... 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 |  = D THEN +    "
"    CONTROL LIST SYMLIST CONLIST MSG ASIS  "
"  ELSE +   "
"    CONTROL NOLIST NOSYMLIST NOCONLIST NOMSG ASIS  "
"ERROR: +   "
"ERROR DO   "
"  SET CC =  "
"  IF  = 400 THEN RETURN "
"  ELSE DO  "
"  WRITE ERROR WITH CONDITION CODE =  OCCURRED : INTERRUPT A LABEL + "
"    'ERROR'    "
"  WRITE CLIST RUN ABANDONED    "
"  GOTO EXIT    "
"  ENDO "
"  ENDO "
" 

Re: MVS send command in REXX

2018-06-08 Thread saurabh khandelwal
Hello,

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 <
elardus.engelbre...@sita.co.za> wrote:

> saurabh khandelwal wrote:
>
> >000120 parse arg mtxt . mtxt
>
> How long is that mtxt? If it is too long, the rest of the message command
> will be trimmed off.
>
>
> >000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
>
> Change above to this (replacing two spaces with two commas):
>
>  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,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread CM Poncelet
Here is a Clist version, invoked from batch TSO (JCL):
 
'// ...  ...  '
'/*JOBPARM SYSAFF=()  '
'//*    '
'//*'
'//* 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=    '
'//SYSTSIN  DD  DUMMY   '
'//SYSTSPRT DD  SYSOUT=*    '
'//CONSIDS  DD  *   '
'...  ...    '
'//*    '
'//DESTIDS  DD  *   '
'...  ...    '
'//SYSIN    DD  *   '
'...  ...   '
'... <... 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 IS TO    */
/* BE SENT - DEFAULT=NONE    */
/*    MESSAGE: DDNAME OF MESSAGE TEXT TO BE SENT - DEFAULT=NONE  */
/*    DEBUG:   SETS TRACE ON - DEFAULT=OFF   */
/*   */
/* 13/12/94 CMP - ALLOW SENDING TO USERID(S) OR TO MVS CONSOLE(S)    */
/* 17/04/89 CMP  */
/*---*/
CONTROL: +
  CONTROL END(ENDO)
  IF  = DEBUG |  = D THEN +
    CONTROL LIST SYMLIST CONLIST MSG ASIS
  ELSE +
    CONTROL NOLIST NOSYMLIST NOCONLIST NOMSG ASIS
ERROR: +
ERROR DO
  SET CC = 
  IF  = 400 THEN RETURN
  ELSE DO
  WRITE ERROR WITH CONDITION CODE =  OCCURRED : INTERRUPT AT LABEL +
    'ERROR'
  WRITE CLIST RUN ABANDONED
  GOTO EXIT
  ENDO
  ENDO

IF  ¬= THEN SET TO = USER
ELSE IF  ¬= THEN SET TO = CN
ELSE +
WHERE: +
  DO
  WRITE YOU MUST SPECIFY PARAMETER 'USERID' OR 'CONSOLE'
  WRITE
  GOTO EXIT
  ENDO WHERE

SET SENDTO =
SET K = &
SET USREC  = &&
SET MSGREC = &&
SET MAXCC = 0
OPENFILE  INPUT
GETFILE 
DO I = 0 TO 99 WHILE  = 0
  SET USER = 
  SET J = (( ),,1)
  SET J =  - 1
  SET USER = (1:,)
  SET SENDTO = (,)
  GETFILE 
  ENDO
CLOSFILE 
IF  > 0 THEN +
  DO
  SET LSENDTO = (()) - 1
  SET SENDTO = (1:,())
  SET MSG = &
  SET MAXCC = 0
  OPENFILE  INPUT
  GETFILE 
  DO J = 1 TO 99 WHILE  = 0
    SET MSG = (1:71,)
    SET K0 = 1
    DO I = 1 TO 99 WHILE () > 0
  SET K = (('),(),())
  IF  > 0 THEN SET K =  + 1
  ENDO
    DO L =  TO 1 BY -1 WHILE  > 0
  SET MSG = (1:,())(')+
  (:(()),())
  ENDO
    GETFILE 
    ENDO
  SET J =  - 1
  DO I = 1 TO 
    SEND '' +
    (()) LOGON
    ENDO
  ENDO
EXIT: +
  EXIT CODE(0)


On 08/06/2018 11:36, saurabh khandelwal wrote:
> Hello Group,
>
> In this below REXX,  I want to send message only to operator AG54 but, not
> sure why this send command sending message to all users in system , not
> 

Re: MVS send command in REXX

2018-06-08 Thread Paul Gilmartin
On Fri, 8 Jun 2018 11:55:47 -0500, Elardus Engelbrecht wrote:
>
>>What is in mtxt? You display it with a say statement but didn't include the 
>>output in your query. Is it pssible that it include an apostrophe/
>
>Excellent catch! Thanks! I forgot about that about apostrophe inside a 
>variable inside that line. Really confusing and certainly would trip a parser 
>into a black hole! ;-) 
>
https://xkcd.com/327/

>Ok, it is a long time ago I had to handle a similar problem where lots of 
>apostrophes are in a parsed line. It is a real PITA to handle such characters 
>which could throw later parsing astray.
> 
I applaud ISPF Edit for allowing, in some cases, a reference to a variable
rather than constructing a command line containing the value of that variable.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread CM Poncelet
Should you not be using TSO SEND?
 
Here is a Clist version, invoked in batch.
 
 MEMBER NAME  TSOSEND
 // 
 //*
 //* 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=
 //SYSTSIN  DD  DUMMY
 //SYSTSPRT DD  SYSOUT=*
 //CONSIDS  DD  *
 
 //*
 //DESTIDS  DD  *
 
 //SYSIN    DD  *
 
 
 
 //*
 //
 
 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 IS TO    */
 /* BE SENT - DEFAULT=NONE    */
 /*    MESSAGE: DDNAME OF MESSAGE TEXT TO BE SENT - DEFAULT=NONE  */
 /*    DEBUG:   SETS TRACE ON - DEFAULT=OFF   */
 /*   */
 /* 13/12/94 CMP - ALLOW SENDING TO USERID(S) OR TO MVS CONSOLE(S)    */
 /* 17/04/89 CMP  */
 /*---*/
 CONTROL: +
   CONTROL END(ENDO)
   IF  = DEBUG |  = D THEN +
 CONTROL LIST SYMLIST CONLIST MSG ASIS
   ELSE +
 CONTROL NOLIST NOSYMLIST NOCONLIST NOMSG ASIS
 ERROR: +
 ERROR DO   
   SET CC =  
   IF  = 400 THEN RETURN 
   ELSE DO  
   WRITE ERROR WITH CONDITION CODE =  OCCURRED : INTERRUPT AT LABEL +
 'ERROR'
   WRITE CLIST RUN ABANDONNED
   GOTO EXIT
   ENDO
   ENDO 

 IF  ¬= THEN SET TO = USER
 ELSE IF  ¬= THEN SET TO = CN
 ELSE +
 WHERE: +
   DO
   WRITE YOU MUST SPECIFY PARAMETER 'USERID' OR 'CONSOLE'
   WRITE
   GOTO EXIT
   ENDO WHERE

 SET SENDTO =
 SET K = &
 SET USREC  = &&
 SET MSGREC = &&
 SET MAXCC = 0
 OPENFILE  INPUT
 GETFILE 
 DO I = 0 TO 99 WHILE  = 0
   SET USER = 
   SET J = (( ),,1)
   SET J =  - 1
   SET USER = (1:,)
   SET SENDTO = (,)
   GETFILE 
   ENDO
 CLOSFILE 
 IF  > 0 THEN +
   DO
   SET LSENDTO = (()) - 1
   SET SENDTO = (1:,())
   SET MSG = &
   SET MAXCC = 0
   OPENFILE  INPUT
   GETFILE 
   DO J = 1 TO 99 WHILE  = 0
 SET MSG = (1:71,)
 SET K0 = 1
 DO I = 1 TO 99 WHILE () > 0
   SET K = (('),(),())
   IF  > 0 THEN SET K =  + 1
   ENDO
 DO L =  TO 1 BY -1 WHILE  > 0
   SET MSG = (1:,())(')+
   (:(()),())
   ENDO
 GETFILE 
 ENDO
   SET J =  - 1
   DO I = 1 TO 
 SEND '' +
 (()) LOGON
 ENDO
   ENDO
 EXIT: +
 EXIT CODE(0)
 
Cheers, CP
 


On 08/06/2018 11:36, saurabh khandelwal wrote:
> Hello Group,
>
> In this below REXX,  I want to send message only to operator AG54 but, not
> sure why this send command sending message to all users in system , not
> only AG54.
>
> I checked syntax for this send command but result is same,
>
>
>
>
>
> EDIT   NETVIEW.CNMCLST(FAIREXX1) - 01.14
>
> ** * Top of Data 
>
> 000100 /*  REXX */
>
> 000120 parse arg mtxt . mtxt
>
> 000240 say 'AG54LST Job STARTED at' mtxt
>
> 000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"
>
> 000600 exit
>
> **  Bottom of Data **
>
> Can you please help.
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> .
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread Seymour J Metz
In general, when you run into such problems "trace I" is your friend. I've 
stared blindly at lot's of code without spotting what was wrong, only to say 
"Aha!" the instant that I looked at a trace.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
Elardus Engelbrecht 
Sent: Friday, June 8, 2018 12:55 PM
To: IBM-MAIN@listserv.ua.edu
Subject: Re: MVS send command in REXX

Seymour J Metz wrote:

>What is in mtxt? You display it with a say statement but didn't include the 
>output in your query. Is it pssible that it include an apostrophe/

Excellent catch! Thanks! I forgot about that about apostrophe inside a variable 
inside that line. Really confusing and certainly would trip a parser into a 
black hole! ;-)

Ok, it is a long time ago I had to handle a similar problem where lots of 
apostrophes are in a parsed line. It is a real PITA to handle such characters 
which could throw later parsing astray.

I would suggest that a parse/checking and re-parse to be run on that mtxt 
before passing it on to "mvs send".

Thanks Shmuel for your kind and helpful reply.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread Elardus Engelbrecht
Seymour J Metz wrote:

>What is in mtxt? You display it with a say statement but didn't include the 
>output in your query. Is it pssible that it include an apostrophe/

Excellent catch! Thanks! I forgot about that about apostrophe inside a variable 
inside that line. Really confusing and certainly would trip a parser into a 
black hole! ;-) 

Ok, it is a long time ago I had to handle a similar problem where lots of 
apostrophes are in a parsed line. It is a real PITA to handle such characters 
which could throw later parsing astray.

I would suggest that a parse/checking and re-parse to be run on that mtxt 
before passing it on to "mvs send".

Thanks Shmuel for your kind and helpful reply.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread Seymour J Metz
What is in mtxt? You display it with a say statement but didn't include the 
output in your query. Is it pssible that it include an apostrophe/


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List  on behalf of 
saurabh khandelwal 
Sent: Friday, June 8, 2018 6:36 AM
To: IBM-MAIN@listserv.ua.edu
Subject: MVS send command in REXX

Hello Group,

In this below REXX,  I want to send message only to operator AG54 but, not
sure why this send command sending message to all users in system , not
only AG54.

I checked syntax for this send command but result is same,





EDIT   NETVIEW.CNMCLST(FAIREXX1) - 01.14

** * Top of Data 

000100 /*  REXX */

000120 parse arg mtxt . mtxt

000240 say 'AG54LST Job STARTED at' mtxt

000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"

000600 exit

**  Bottom of Data **

Can you please help.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: MVS send command in REXX

2018-06-08 Thread Elardus Engelbrecht
saurabh khandelwal wrote:

>000120 parse arg mtxt . mtxt

How long is that mtxt? If it is too long, the rest of the message command will 
be trimmed off.


>000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"

Change above to this (replacing two spaces with two commas):

 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,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


MVS send command in REXX

2018-06-08 Thread saurabh khandelwal
Hello Group,

In this below REXX,  I want to send message only to operator AG54 but, not
sure why this send command sending message to all users in system , not
only AG54.

I checked syntax for this send command but result is same,





EDIT   NETVIEW.CNMCLST(FAIREXX1) - 01.14

** * Top of Data 

000100 /*  REXX */

000120 parse arg mtxt . mtxt

000240 say 'AG54LST Job STARTED at' mtxt

000500 mvs "send 'AG54LST JOB "mtxt"' user(AG54) now"

000600 exit

**  Bottom of Data **

Can you please help.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN