SYSVIEW Performance Management

 View Only
  • 1.  SENDMAIL data for email body

    Posted Nov 14, 2019 12:08 PM
    The Sysview SENDMAIL command panel allows text data to be typed (or pasted) that will form the BODY of the email sent.
    I see the command syntax allows a LINES parameter to specify how many lines are to be included in the email body, but I cannot see how to specify that text data when invoking SENDMAIL from an IMOD. (I tried defining stem variables "Message", "Line" and "Lines" but none passed the BODY to SENDMAIL, so only the subject and footer were received). I must have missed something obvious but I just can't find the answer, despite searching. Please can someone enlighten me?

    ------------------------------
    Technical Consultant
    Dixons Carphone
    ------------------------------


  • 2.  RE: SENDMAIL data for email body

    Broadcom Employee
    Posted Nov 21, 2019 08:55 AM
    Owen,
    Try using the SYSVIEW TYPE command after you've issued SENDMAIL to put data in specified locations on the panel.
    I'm not sure what you're trying to accomplish, but if it is related to sending an email notification from a threshold triggering you may want to review the method we provide to do this using our Event Capture feature.  On the TOPICS display you'll find 'Email notifications on exceptions or thresholds' that walks you through it.  Following that process you can also see an example of how to use a TEMPLATE for the SENDMAIL command, even if you don't have the Event Capture option.
    Regards, 
    Doug

    ------------------------------
    Regards,
    Doug Miller
    Software Engineer
    Broadcom
    ------------------------------



  • 3.  RE: SENDMAIL data for email body

    Posted Nov 21, 2019 11:40 AM
    Hi @Douglas Miller,

    Thank you for the reply. In this case I am not using Sysview online so I'm not sure how I can populate the "panel" fields.
    Let me explain what I am trying to do. We use MVS THRESH to set thresholds for the CA Datacom MUF region's zIIP CPU% (JOBIIPT%). When the threshold is triggered an IMOD is called that checks...
    1. Whether the trigger was "upward" (from NORMAL to WARNING/PROBLEM, or if it is still in a PROBLEM state).
    2. Issue TASKMON to check various criteria about JOBCPU and individual modules/offsets contribution to the high zIIP usage.
    If the 1+2 above determine that there is data of interest then we want to send an email that contains:
    1. The full TASKMON output from (2) above)
    2. DCTASKS output (+ any other snapshot data that we choose to add to this IMOD - this will evolve over time).
    As a result the BODY of the email is going to be variable. I looked at the TEMPLATEs that CA Sysview supplies but they all seem to be a fixed-length/format body. The email contents will be variable in our case, so I could not see how to do it.
    The online SENDMAIL function evidently picks up the text from the panel somehow. The SENDMAIL command syntax allows specification of the other email components, but I can't see how to pass it the many text lines that will make up the body of the email.
    Similarly I looked at EMAILTO but that cannot be executed from an IMOD.
    Your advise would be greatly appreciated.

    Cheers,
    Owen​

    ------------------------------
    Technical Consultant
    Dixons Carphone
    ------------------------------



  • 4.  RE: SENDMAIL data for email body

    Broadcom Employee
    Posted Nov 21, 2019 12:34 PM
    When you issue the SENDMAIL command, whether manually in an online session or via IMOD/REXX exec, the SENDMAIL display panel will be presented (just like you get the TASKMON display returned).  Use the SYSVIEW TYPE command (do HELP TYPE) to programmatically interact with it just like you would manually.

    Example:
    ADDRESS 'SYSVIEWE'
    'C(SENDMAIL TO JOHN.SMITH@THERE.COM SUBJECT TEST)'
    'C(TYPE NEWLINE 5 DATA ''THIS IS LINE1'' NEWLINE DATA ''THIS IS LINE2'' ENTER)'
    'C(SEND)'
    'C(END)'

    ------------------------------
    Regards,
    Doug Miller
    Software Engineer
    Broadcom
    ------------------------------



  • 5.  RE: SENDMAIL data for email body

    Posted Nov 21, 2019 04:46 PM
    Hi @Douglas Miller,

    Thanks again for the explanation/example. I managed to send some simple emails using this method. But when sending the DCTASKS output it choked as soon as it reached the first "long" line (DCTASKS has 362 characters on each header/data line)...
    Pull SvLine
    command_input='TYPE' Continued 'DA C'quote || Strip(SvLine,'T') || quote' C'
    ...results in...
    SYSVIEW_REQUEST (00078) MGSVX355E Mismatched parenthesis - C(TYPE C N DA C'H|CMD|JOBNAME |MUFNAME |TAS

    It seems that the command string is truncated and so the TYPE command fails. I could split the "long" lines into smaller chunks but it will quickly use up the 50 lines available on this panel.​
    Is there a better way to send command output from an IMOD via email (as EMAILTO does so successfully for the Sysview online (ISPF-only) environment?

    Cheers,
    Owen

    ------------------------------
    Technical Consultant
    Dixons Carphone
    ------------------------------



  • 6.  RE: SENDMAIL data for email body

    Broadcom Employee
    Posted Nov 25, 2019 04:53 PM
    SENDMAIL has a max of LINES 999 (default is 50).  Max length of a SYSVIEW command is 256.  You could create/use a Display Format for DCTASKS / TASK that only contains a subset of fields to shorten up the line.


    ------------------------------
    Regards,
    Doug Miller
    Software Engineer
    Broadcom
    ------------------------------



  • 7.  RE: SENDMAIL data for email body

    Posted Nov 26, 2019 11:16 AM
    I tried using LINES 999 but if I type more than 24 data lines then I receive message "GSVX079E Invalid scroll amount" so it seems the Scroll field has been overwritten instead of moving to the next line. .
    While the max length of a Sysview command is 256, the maximum line length in SENDMAIL is 131. I need a lot more than 131 characters for these displays as I need most of the DCTASKS fields in this case (and for several other diagnostic displays that I will also need to collect for other cases). SENDMAIL also adds a "<BR>" tag to each line from the panel, so even if I break up the DCTASKS output into multiple TYPE commands I then receive an email body that is wrapped undesirably (whether using SEND or SEND TEXT).

    ------------------------------
    Technical Consultant
    Dixons Carphone
    ------------------------------



  • 8.  RE: SENDMAIL data for email body

    Broadcom Employee
    Posted Jun 01, 2020 11:42 AM
      |   view attached
    Just noticed this post was left dangling.  It ended up being continued offline with the desired outcome.
    The attached example IMOD issues a SYSVIEW command and then writes the content of the stack to a temporary external writer (SMTP) file to be included as an attachment to an email.  This required existing GSS PTF RO80766 for the BPXWDYN function to work.

    ------------------------------
    Regards,
    Doug Miller
    Software Engineer
    Broadcom
    ------------------------------

    Attachment(s)

    txt
    EMAILTO_IMOD.txt   2 KB 1 version