0

community!

I 've got an interesting question. I write a small jcl, which xmit file to another email. XMIT Is it possible to add some information to email, such as subj?

1 Answers1

1

Yes, but exactly how will depend upon your system e.g. here is an email job from my previous company:

    //jobname JOB (acct_no),'EMAIL',    
    //         MSGCLASS=X,
    //         NOTIFY=&SYSUID
    //*
    //********************************************************************
    //*                                                                  *
    //* EMAIL STEP                                                       *
    //* ADDRDD KEEPS DISTRIBUTION LIST                                   *
    //* MESSGDD KEEPS EMAIL TEXT                                         *
    //* ATTACHDD KEEPS ATTACHMENT FILE                                   *
    //*                                                                  *
    //********************************************************************
    //EMAIL    EXEC PGM=IKJEFT1B
    //SYSEXEC  DD DISP=SHR,DSN=SYS1.TCPIP.SMTP.CEXEC
    //SYSPRINT DD SYSOUT=*
    //ADDRDD   DD *
    To someone@somedomain.com
    //MESSGDD  DD *
    Here is the text of my email.
    Here is some more text.
    //ATTACHDD DD DISP=SHR,DSN=my.attached.dataset
    //SYSTSPRT DD SYSOUT=*
    //SYSTSIN  DD *
    %XMITIP * +
    SUBJECT 'My email subject' +
    ADDRESSFILEDD ADDRDD +
    MSGDD MESSGDD + 
    FILEDD ATTACHDD 
Steve Ives
  • 7,894
  • 3
  • 24
  • 55
  • 1
    You look to be using XmitIp (which is a good option for small files). Xmitip if not already installed can be downloaded from http://www.lbdsoftware.com/tcpip.html – Bruce Martin Jun 07 '16 at 22:54
  • //XMIT EXEC PGM=IKJEFT01,REGION=6M
    //SYSTSPRT DD SYSOUT=*
    //SYSTSIN DD DSN=HIQUAL.TRANSMIT,DISP=SHR
    I 've write this code, where transmit file contains: TRANSMIT DOmain.AKALIACH DSN('hiqual.TEMP2')
    I just try to modify this code with subject
    – Andrei Kaliachka Jun 08 '16 at 09:16
  • @AndreiKaliachka - XMIT on the mainframe is purely for sending files to another system; it is not a replacement for email and does not have a subject. XMITIP is different from XMIT, as it *is* an email program. – Steve Ives Jun 08 '16 at 09:21