IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to send email with Rich Text using SMTPNOTE command


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
santhosh5983

New User


Joined: 11 Mar 2015
Posts: 10
Location: India

PostPosted: Fri Apr 08, 2016 2:30 am
Reply with quote

Hi All,

Am currently using SMTPNOTE command to send a file (report file) as email. But the email is received as text and the formatting of report fields are messed up. Could anyone help me if theres any option that can be used with SMTPNOTE command to send the email with the file data being formatted in the email body.

Below is the control card am using:
Code:
***************************** Top of Data *****************
      PROFILE PREFIX(ASUXXXP)                             
      SMTPNOTE TO(xx@xx.com)-               
        FROM(xx@xx.com)-   
        SUBJECT(Jobs run time report)-             
        DATASET('ASUXXXP.XX.XXXXXX.CCCC')-               
        BATCH                                             
      END                                                 
**************************** Bottom of Data ***************


JCL Step
Code:

//PSTY090   EXEC PGM=IKJEFT01,COND=(4,LT)                 
//********************************************************
//SYSPRINT  DD SYSOUT=*                                   
//SYSPROC   DD DSN=SYS7.ISPCLIB,                         
//             DISP=(SHR,KEEP,KEEP)                       
//SYSTSPRT  DD SYSOUT=*                                   
//SYSOUT    DD SYSOUT=*                                   
//SYSTSIN   DD DSN=DOC.PB.CTLCARD(AXXXXXXX),DISP=SHR     
//*                                                       
**************************** Bottom of Data **************
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Apr 08, 2016 2:56 am
Reply with quote

How is the report being messed up? Please show an example of before and after.
Back to top
View user's profile Send private message
santhosh5983

New User


Joined: 11 Mar 2015
Posts: 10
Location: India

PostPosted: Fri Apr 08, 2016 3:30 am
Reply with quote

----------------------------------------------------------------------
THURSDAY, 07 APR 2016
----------------------------------------------------------------------
| JOBNAME | DESCRIPTION | START TIME | END TIME | DURATION |
----------------------------------------------------------------------
| ASXXXXXX | JAS COLLECTIONS COPY | 05.28.22 | 05.28.23 | 00.00.01 |
| ASXXXXXX | YAC SDD COPY | 05.33.05 | 05.33.05 | 00.00.00 |
| ASXXXXXX | TRJ FL COPY | 05.24.41 | 05.24.41 | 00.00.00 |
| ASXXXXXX | TRJ SDD | 05.33.14 | 05.33.14 | 00.00.00 |
| ASXXXYYY | TRJ TJ | 05.24.41 | 05.24.41 | 00.00.00 |
| ASZZZZZZ | XXXXXXXXX-UTL0 | 06.30.08 | 06.32.51 | 00.02.43 |
| ASSSSSSS | XXXXXXXXX-UTL1 | 06.30.08 | 06.31.58 | 00.01.50 |
| ATTTTTTT | XXXXXXXXX-UTL3 | 06.30.08 | 06.32.20 | 00.02.12 |
| ARRRRRRR | | 06.17.35 | 06.20.13 | 00.02.38 |
| AQQQQQQQ | | 06.32.56 | 06.33.26 | 00.00.30 |
| ABBBBBBB | | 06.26.01 | 06.26.12 | 00.00.11 |
| AOOOOOOO | | 06.27.50 | 06.28.03 | 00.00.13 |
----------------------------------------------------------------------


The file is not formatted as we see in the mainframe session or as its displayed on a word document with courier font.

Please use the code tags - look how much better your report looks when the code tags are used
Code:
----------------------------------------------------------------------
                          THURSDAY,  07 APR 2016
 ----------------------------------------------------------------------
 | JOBNAME  |    DESCRIPTION       | START TIME | END TIME | DURATION |
 ----------------------------------------------------------------------
 | ASXXXXXX | JAS COLLECTIONS COPY |  05.28.22  | 05.28.23 | 00.00.01 |
 | ASXXXXXX | YAC SDD COPY         |  05.33.05  | 05.33.05 | 00.00.00 |
 | ASXXXXXX | TRJ FL COPY          |  05.24.41  | 05.24.41 | 00.00.00 |
 | ASXXXXXX | TRJ SDD              |  05.33.14  | 05.33.14 | 00.00.00 |
 | ASXXXYYY | TRJ  TJ               |  05.24.41  | 05.24.41 | 00.00.00 |
 | ASZZZZZZ | XXXXXXXXX-UTL0       |  06.30.08  | 06.32.51 | 00.02.43 |
 | ASSSSSSS | XXXXXXXXX-UTL1       |  06.30.08  | 06.31.58 | 00.01.50 |
 | ATTTTTTT | XXXXXXXXX-UTL3       |  06.30.08  | 06.32.20 | 00.02.12 |
 | ARRRRRRR |                      |  06.17.35  | 06.20.13 | 00.02.38 |
 | AQQQQQQQ |                      |  06.32.56  | 06.33.26 | 00.00.30 |
 | ABBBBBBB |                      |  06.26.01  | 06.26.12 | 00.00.11 |
 | AOOOOOOO |                      |  06.27.50  | 06.28.03 | 00.00.13 |
 ----------------------------------------------------------------------
Back to top
View user's profile Send private message
santhosh5983

New User


Joined: 11 Mar 2015
Posts: 10
Location: India

PostPosted: Fri Apr 08, 2016 3:55 am
Reply with quote

Hi Used the below control card and it worked. But the file contect is passed as an attachment, but it works for me as the file content is formatted with courier new font.

Code:
***************************** Top of Data **************************
      PROFILE NOPREFIX                                             
      %XMITIP -                                                     
           (XXXX@XXX.com) -                             
         FROM XXXX@XXX.com  -         
       SUBJECT 'Jobs run time report'  -                   
       FILEDD EMAILFIL -                                           
       FORMAT RTF                                                   
      END                                                           
**************************** Bottom of Data ************************



JCL Step:

Code:

//STEP0700 EXEC PGM=IKJEFT01                         
//STEPLIB   DD DISP=SHR,DSN=SYS7.ISPLLIB             
//SYSPROC   DD DISP=SHR,DSN=SYS7.ISPCLIB             
//SYSPRINT DD  SYSOUT=*                             
//SYSTSPRT DD  SYSOUT=*                             
//SYSOUT   DD  SYSOUT=*                             
//EMAILFIL DD  DISP=SHR,DSN=File.name
//SYSTSIN  DD  DISP=SHR,DSN=XXX.XX.CTLCARD(XXXXXXX)
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 08, 2016 4:22 am
Reply with quote

The display of text and attachments of email is pretty much under the control of the email client, and the mainframe has nothing to do with it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to convert RESP code 12 to text? CICS 9
No new posts Command line placement in DB2I panels TSO/ISPF 2
No new posts A command to change LRECL of an exist... JCL & VSAM 7
No new posts How to pass arguments in a ISPSTART c... CLIST & REXX 6
No new posts TXT2PDF and then SMTP email a PDF JCL & VSAM 4
Search our Forums:

Back to Top