we do something similar ... our exec submits a batch job that runs
XMITIP ...

--Stephen




On 09/10/2010 07:33 AM, Dale McCart wrote:
> The following OPS/MVS  MSG rule and REXX uses SMTP to send message to 
> e-mail and phones.
>
> )MSG IEC070I 
> )PROC 
>   IF  (MSG.JOBNAME = "DLISASPP"), 
>     THEN DO 
>            ADDRESS OSF 
>              /*-------------------------------------------------------*/
>              /* SCHEDULE AN OPS/REXX PROGRAM TO RUN IN A SERVER.      */
>              /* THE BELOW PASSES THE MESSAGE (MSG.TXT) TO THE         */
>              /* MEMBER 'IEC070I' IN CAI.OPSMVS.TARG.REXX              */
>              /*-------------------------------------------------------*/
>              "OI IEC070IE "MSG.TEXT 
>            RETURN 
>          END 
>  RETURN "SUPPRESS" 
>
> IEC070I member in IN CAI.OPSMVS.TARG.REXX
> /*-------------------------------------------------------------------*/ 
> 00250000
> /*  You must customize the following code for your environment       */ 
> 00260000
> /*  or change it to obtain the JES node name in some other way.      */ 
> 00270000
> /*--+----1----+----2----+----3----+----4----+----5----+----6----+----*/ 
> 00280000
> targeta ="[email protected]" 00290001
> targetb ="[email protected]"
> targetc ="[email protected]" 00290101
> system = OPSINFO('SMFID') 00300000
> ARG msgtxt 00301000
> select 00302000
>   when system = 'KMC1' then node = 'KMCJES2' 00303000
>   when system = 'CPAC' then node = 'CPACJES2' 00304000
>   otherwise 00305000
>     do 00306000
>       say OPSINFO("PROGRAM") "unable to determine the JES node" 00307000
>       exit 00308000
>     end 00309000
> end 00310000
> /*-------------------------------------------------------------------*/ 
> 00320000
> /*  Build the variables that are used to create the email text       */ 
> 00330000
> /*--+----1----+----2----+----3----+----4----+----5----+----6----+----*/ 
> 00340000
> date = DATE('N') 00350000
> ipltime = OPSINFO('ipltime') 00360000
> ipldate = OPSINFO('ipldate') 00370000
> iplyr = SUBSTR(ipldate,1,4) 00380000
> iplmn = SUBSTR(ipldate,5,2) 00390000
> ipldy = SUBSTR(ipldate,7,2) 00400000
> ipldate = iplmn'/'ipldy'/'iplyr 00410000
> parse var date dd mm yy 00420000
> yy=SUBSTR(yy,3,2) 00430000
> date = dd mm yy 00440000
> /*-------------------------------------------------------------------*/ 
> 00450000
> /*  Allocate the SMTP output file                                    */ 
> 00460000
> /*--+----1----+----2----+----3----+----4----+----5----+----6----+----*/ 
> 00470000
> address OPSDYNAM "ALLOC FILE(PUNCH1) SYSOUT(B) WRITER(SMTP)" 00480000
> if RC <> 0 then 00490000
>   do 00500000
>     say "EMAILTXT OPSDYNAM ALLOC RC="RC 00510000
>     exit 00520000
>   end 00530000
> /*-------------------------------------------------------------------*/ 
> 00540000
> /*  Queue the sample email text onto the stack                       */ 
> 00550000
> /*--+----1----+----2----+----3----+----4----+----5----+----6----+----*/ 
> 00560000
> queue "HELO "node 00570000
> queue "MAIL FROM:<OPSMVS@"node">" 00580000
> queue "RCPT TO:<"targeta">" 00590001
> queue "RCPT TO:<"targetb">" 00591001
> queue "RCPT TO:<"targetc">"
> queue "data" 00600000
> queue "Date:    "date time()" EST" 00610000
> queue "To:      "targeta 00620001
> queue "To:      "targetb 00621001
> queue "To:      "targetc
> queue "Subject:  IEC070I: out of space occured" 00630000
> queue "                                               " 00640000
> queue "The following message has occured:" 00650000
> queue msgtxt 00660000
> queue "Please take the appropriate action." 00670000
> queue "This e-mail came from OPS/MVS." 00680000
> queue "                                               " 00690000
> /*-------------------------------------------------------------------*/ 
> 00700000
> /*  Send the email from the records on the stack                     */ 
> 00710000
> /*--+----1----+----2----+----3----+----4----+----5----+----6----+----*/ 
> 00720000
> address TSO "EXECIO * DISKW PUNCH1 ( FINIS" 00730000
> if RC <> 0 then 00740000
>   do 00750000
>     say "EMAILTXT EXECIO DISKW RC="RC 00760000
>     exit 00770000
>   end 00780000
> /*-------------------------------------------------------------------*/ 
> 00790000
> /*  Free the SMTP output file                                        */ 
> 00800000
> /*--+----1----+----2----+----3----+----4----+----5----+----6----+----*/ 
> 00810000
> address OPSDYNAM "FREE FILE(PUNCH1)" 00820000
> if RC <> 0 then 00830000
>   do 00840000
>     say "EMAILTXT OPSDYNAM FREE RC="RC 00850000
>     exit 00860000
>   end 00870000
> exit 
>
>
>
> Dale McCart 
>  Senior Systems Programmer / zSeries, z/OS, z/VM, zLinux 
>  Kawasaki Motors Corp., U.S.A. 
>  Telephone: (949) 770-0400 extension 2316 
>  Fax: (949) 460-5576 
>  E-mail: [email protected] 
>
> *********************************************************************************************************************************************
>  
>
> This Email is covered by the Electronic Communications Privacy Act, 18 
> U.S.C. Sections 2510-2521, and is confidential, legally privileged, and 
> exempt from disclosure. 
> The information contained in this Email is intended only for the use of 
> the individual or entity named above. 
> Any review, retransmission, dissemination or other use of, or taking of 
> any action in reliance upon, this information by persons other than the 
> intended recipient is strictly prohibited. 
> If you have received this communication in error, please notify us by 
> replying to this Email and destroy all copies of the original message. 
> Internet communications cannot be guaranteed to be timely, secure, error 
> or virus-free. 
> The sender does not accept liability for any errors, omissions or damage 
> caused by any virus transmitted by this email. 
> The recipient should check this email and any attachments for the presence 
> of viruses. 
> The view and/or opinions of individuals expressed within this document do 
> not necessarily reflect the views of the Kawasaki or it's affiliates. 
> Please be aware that any message addressed to our domain is subject to 
> archiving and review by persons other than the intended recipient. 
> *********************************************************************************************************************************************
>  
>
> © 1966-2010 Kawasaki Motors Corp., U.S.A.   00880000 
>
>
>
> Jack Kelly <[email protected]> 
> Sent by: IBM Mainframe Discussion List <[email protected]>
> 09/10/2010 09:37 AM
> Please respond to
> IBM Mainframe Discussion List <[email protected]>
>
>
> To
> [email protected]
> cc
>
> Subject
> CA OPS/MVS phone home
>
>
>
>
>
>
> Does OPS have the ability to call a phone number and send a message to 
> someone? Or does another product, eg NetView?
> I assume that any of them can send a email but I hate assumption?
>  
> TIA
> Jack
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>
>   

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to