Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Dot "." missing from email attachment sent using SMTP.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Harsh Pawar

New User


Joined: 04 Jun 2008
Posts: 25
Location: Noida

PostPosted: Thu Apr 30, 2015 4:13 pm    Post subject: Dot "." missing from email attachment sent using SMTP.
Reply with quote

First let me apologize if this is a re-post. I tried searching but did not get the resolution.

I am sending an email as text attachment (which is an assembler macro) using SMTP. If we have a dot (".") on the first line; dot is neglected in the actual attachment. Example :


//IEBGENER EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP),DCB=(RECFM=FBA,LRECL=80,BLKSIZE=0)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=FILE1,DISP=OLD
// DD DSN=FILE2,DISP=SHR
// DD DSN=FILE3,DISP=OLD
/*

FILE1 is :
HELO MVSHOST
MAIL FROM:<abc@xyz.com>
RCPT TO:<abc@xyz.com>
DATA
FROM: <abc@xyz.com>
TO:<abc@xyz.com>
SUBJECT: TEST
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
This is for SMTP
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="SMTP.TXT"


Initial code in FILE2
-----------------------------------------------------------------------
MVC VAR1,VAR2
LA R05,VAR3
AGO .AAA30
.AAA20 ANOP ,
MVC VAR2,VAR1
.AAA30
-----------------------------------------------------------------------

Code in email attachment (notice the missing "." in AAA20 and AAA30)
-----------------------------------------------------------------------
MVC VAR1,VAR2
LA R05,VAR3
AGO .AAA30
AAA20 ANOP ,
MVC VAR2,VAR1
AAA30
-----------------------------------------------------------------------

SMTPĀ parameters are very sensitive , Is there a way to send the macro as it is in text format?

Thanks for helping.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Apr 30, 2015 6:00 pm    Post subject:
Reply with quote

SMTP attaches special meaning to a period (or dot) in the first position. I have not researched the SMTP specification in the RFC documentation to see if that can be avoided. If you want to know for sure, check the RFC specification.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 998
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Apr 30, 2015 7:13 pm    Post subject:
Reply with quote

One workaround which worked for me was to preprocess the macro into a temporary dataset, prefixing each line with a dot and then e-mailing the temporary dataset. The prefixed dot gets removed from each line and the result looks just like the original......

Garry.
Back to top
View user's profile Send private message
Harsh Pawar

New User


Joined: 04 Jun 2008
Posts: 25
Location: Noida

PostPosted: Mon May 04, 2015 12:36 pm    Post subject:
Reply with quote

Thanks,
I increased the size of file to 81 and put an extra '.' at column 1 using following :

OPTION COPY
OUTREC IFTHEN=(WHEN=(1,1,CH,EQ,C'.'),
OVERLAY=(1:C'.',1,80))

And in email job, I used all 81 LRECL files and following :

//SYSUT2 DD SYSOUT=(B,SMTP),DCB=(RECFM=FBA,LRECL=81,BLKSIZE=0)


Now it is working as expected and '.' is coming in the email attachment.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sending email from jcl using the mail... niloyarp JCL & VSAM 5 Tue Oct 10, 2017 12:32 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us