Problem sending a seq. file as an email attachment



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Problem sending a seq. file as an email attachment

Postby Balesh013GG » Fri Oct 19, 2012 10:33 pm

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.
Balesh013GG
 
Posts: 20
Joined: Fri Oct 19, 2012 4:21 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Fri Oct 19, 2012 10:47 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby Balesh013GG » Fri Oct 19, 2012 11:30 pm

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.
Balesh013GG
 
Posts: 20
Joined: Fri Oct 19, 2012 4:21 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Robert Sample » Fri Oct 19, 2012 11:36 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

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

Postby steve-myers » Fri Oct 19, 2012 11:55 pm

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

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

Postby Balesh013GG » Sat Oct 20, 2012 3:10 pm

All the three file have the format 133, FBA....
Balesh013GG
 
Posts: 20
Joined: Fri Oct 19, 2012 4:21 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Balesh013GG » Sat Oct 20, 2012 7:04 pm

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 ?
Balesh013GG
 
Posts: 20
Joined: Fri Oct 19, 2012 4:21 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby enrico-sorichetti » Sat Oct 20, 2012 7:15 pm

NUMBER ON ???
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

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

Postby Balesh013GG » Sat Oct 20, 2012 7:22 pm

Do I need to have NUM OFF on both SYSIN file and the period file ?

Please suggest..
Balesh013GG
 
Posts: 20
Joined: Fri Oct 19, 2012 4:21 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby enrico-sorichetti » Sat Oct 20, 2012 7:33 pm

why don' t You try ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post