Join this group to access featured content and participate in discussions related to all Syncsort Mainframe Products.

112 Members
Join Us!

Conditionally send an email based in RC

hello guys,

in my previous posting I was able to force a RC=4 based on a condition.

now I would like to send an email if RC > 0 in the same step. Is it possible?

I am just trying to save an extra step to send the email.

I didn't find anything in the manual. If possible can someone point me in the right direction?

Much appreciated

You need to be a member of Syncsort Community to add comments!

Join Syncsort Community

Email me when people reply –

Replies

  • Miguel,

    Yes, you can conditionally execute a batch TSO step (EXEC PGM=IKJEFT1B) and use a %XMITIP command in it. Works beautifully!

    Igor

    • thanks for the response Igor.

      I couldn't make it work in the same step, so I am sending the email with a second step added.

      It would be nice if you can share how you did it

      thanks!

    • Miguel - sure, it should be a separate step! Did you want to send an email as part of your Syncsort step?

      Glad you were able to do it!

    • Here is my code. I am sending an attachment to a group of people, there is nothing in the body of the email:

      // IF (STEP1.RC NE 0) THEN                                      

      //**************************************************************** 

      //*    SEND EMAIL                                                

      //**************************************************************** 

      //TSOA EXEC PGM=IKJEFT1B                                           

      //SYSEXEC  DD DISP=SHR,DSN='TSODTSOL.P000XMIP.EXEC'                

      //SYSPRINT DD SYSOUT=*                                              

      //SYSTSPRT DD SYSOUT=*                                             

      //SYSTSIN  DD *                                                    

      %XMITIP * ADDRESSFILE 'HILEVEL.LIBRARY.SYSIN(ADDRLIST)' -           

      MSGDS 'ATTACHED.DATASET' -                                        

      SUBJECT 'EMAIL SUBJECT                 ' -                    

      FROM FROMADDRESS@GMAIL.COM                       

      //*                                                                

      // ENDIF                                                             

This reply was deleted.

To access Syncsort Knowledge Base, visit:

My Support