Page 1 of 2

Problem sending a seq. file as an email attachment

PostPosted: Fri Oct 19, 2012 10:33 pm
by Balesh013GG
Hi I am trying to send a mail along with attachment.

1). I have a attchment that needs to be send of fomrat (FBA,133)
2).I have created two file, one file contains

Sysin file :

HELO SMTP
MAIL FROM: <BALESH.xx@xx.COM>
RCPT TO:<BALESH.xx@xx.COM>
DATA
FROM: BALESH.xx@xx.COM
SUBJECT: ASO REPORT STATUS
MIME-VERSION: 1.0
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE1.TXT

the Period file.

.

3). The third file is the file which needs to be attached.(FBA,133)

Job code is as follows.

//SMTP OUTPUT DEST=(SMTP),CLASS=A
//********************************************************************
//STEP010 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=A,DEST=(SMTP)
//SYSOUT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=Sysin file
// DD DISP=SHR,DSN=Data file
// DD DISP=SHR,DSN=Period file
.
/*

I am getting MAXX CC 0 but not getting the mail. would you please tell me where I am going wrong.

Re: Problem sending a seq. file as an email attachment

PostPosted: Fri Oct 19, 2012 10:47 pm
by NicC
Welcome to the forum and please do not piggy-back old topics. Yours has been split off into its own topic.

Are you not getting the mail or not getting the attachment - or both?
Are you using the correct parameters for SYSUT2 - i.e. did you get the information from an already working job at your site, make it up or get it from some other source. This information is site specific so if you did not get it from an existing job then you have to go and ask the people in your organisation for the correct info.

Re: Problem sending a seq. file as an email attachment

PostPosted: Fri Oct 19, 2012 11:30 pm
by Balesh013GG
Sorry, I didnt get the mail and attachment also, I have the same JCL working for FB, 80 formatted data.

Would you please let me know if I can go through any other way.

Re: Problem sending a seq. file as an email attachment

PostPosted: Fri Oct 19, 2012 11:36 pm
by Robert Sample
I suspect the DEST= parameter is part of the problem. In many years of dealing with SMTP to transfer data, I've not seen DEST used for email. The normal format is SYSOUT=(A,SMTP) where A is site-specified as the class for email (B and 9 are what I've seen the most), and SMTP is the name of the started task that TCP/IP kicks off to handle email (again, this name is dependent upon the site). From the JCL Reference manual:
12.18 DEST Parameter

Parameter Type

Keyword, optional

Purpose

Use the DEST parameter to specify a destination for a sysout data set. The DEST parameter can send a sysout data set to a remote or local terminal, a node, a node and remote workstation, a local device or group of devices, or a node and userid.
There is no mention in the manual of started tasks.

Re: Problem sending a seq. file as an email attachment

PostPosted: Fri Oct 19, 2012 11:55 pm
by steve-myers
In

//SYSUT1 DD DISP=SHR,DSN=Sysin file
// DD DISP=SHR,DSN=Data file
// DD DISP=SHR,DSN=Period file

The RECFM and LRECL of the 3 data sets must be the same or nearly the same. I suspect they are not.

Re: Problem sending a seq. file as an email attachment

PostPosted: Sat Oct 20, 2012 3:10 pm
by Balesh013GG
All the three file have the format 133, FBA....

Re: Problem sending a seq. file as an email attachment

PostPosted: Sat Oct 20, 2012 7:04 pm
by Balesh013GG
After the clean run of the job I am gettting mail like

Unable to deliver mail to some/all recipients.
050 DATA 00000600
501 Syntax Error. No Args after 'DATA' command
050 FROM: BALESH.GG@xx.COM 00000700
500 Unknown command, 'FROM'
050 SUBJECT: ASO REPORT STATUS 00000800
500 Unknown command, 'SUBJECT'
050 MIME-VERSION: 1.0 00000900
500 Unknown command, 'MIME'
050 CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY" 00000910
500 Unknown command, 'CONTENT'
050 00000911
500 Unknown command, '00000911'
050 --SIMPLE BOUNDARY 00000920
500 Unknown command, '-'


Not sure whats the problem. would please someone help ?

Re: Problem sending a seq. file as an email attachment

PostPosted: Sat Oct 20, 2012 7:15 pm
by enrico-sorichetti
NUMBER ON ???

Re: Problem sending a seq. file as an email attachment

PostPosted: Sat Oct 20, 2012 7:22 pm
by Balesh013GG
Do I need to have NUM OFF on both SYSIN file and the period file ?

Please suggest..

Re: Problem sending a seq. file as an email attachment

PostPosted: Sat Oct 20, 2012 7:33 pm
by enrico-sorichetti
why don' t You try ?