View previous topic :: View next topic
|
Author |
Message |
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Hi All,
I know this could be a very basic requirement but I was not able to achieve the same so I need your help/comments
I have a huge flat file which in file size is near to 15MB, this file needs to be sent as an report to a mail group using SFTP. The attachment is of .csv type.
Since it is of around 15 MB size, the mail server is restricting to send this mail to the receptents. Though it may be a lame way, I tried to to give .zip instead of .csv in the SMTP step, the job ended with RC=0 but still I haven't received the mail.
Please suggest me if you have any better options |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
For anyone to be able to help, you need to post the jcl and control statements used as well as the JES sysouts from the run.
As files go 15meg is not very large, but many e-mail systems will not permit files of this size to be sent as attachments.
Suggest you consider not use e-mail and just transfer the file using SFTP. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Hi Dick,
Firstly, my apologies for not posting the JCL or the JES messages, below is the SMTP step that I am using. Secondly, I agree with your option of sending it to a location on a server via SFTP instead of mailing but thats still under consideration by our client partners but wanted to see if I could acheive this using SMTP and zip that file.
here is the JCL statement
Code: |
//*******************************************************************
//* EMAIL XXXX REPORT
//*********************************************************************
//SAS1 EXEC SMTPMAIL,PARM='%SMTPREXX A1 DSN="XXX.YY.ZZZZ.RRRR.
// REPT" NAME="XXX_REPORT" EXT="ZIP";',
// COND=(0,LT)
//SMTPOUT DD SYSOUT=(B,SMTP),
// DCB=(RECFM=FB,LRECL=1023)
//SMTP DD *
HELO NJED
MAIL FROM:<firstname.lastname@companyname.COM>
RCPT TO:<firstname.lastname@companyname.COM>
DATA
FROM: firstname.lastname@companyname.COM
TO: firstname.lastname@companyname.COM
SUBJECT: *** REPORT TEST ***
REPORT.
.
/*
// |
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Which ZIP product are you using on the mainframe? If the answer is "none", then your first problem is that merely indicating to SMTP that you are sending a ZIP file does not, in any way, reduce the size of nor change your source file.
If you are using a ZIP product and generating a ZIP file from your source file, you can search this forum for "SMTP" and "ZIP" and find some topics dealing with using MIME to send ZIP files through SMTP. Getting the precise data format correct can take a few iterations, but MIME handles ZIP files just fine. Whether or not the zipped file is small enough to pass your SMTP filter is another question. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Hi Robert,
We are currently not using any zip product and that as mentioned by you could be the primary take of no mail being generated.
As I am not sure if there are any zip products available in our shop, could you suggest the most common zip products on mainframes so that I can check with my systens manager to obtain a license for that product.
Thanks a many for clarifications.
Regards,
Ravi |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
ravindra.vadali wrote: |
As I am not sure if there are any zip products available in our shop, could you suggest the most common zip products on mainframes so that I can check with my systens manager to obtain a license for that product. |
I would certainly approach both PKWARE and Data 21. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
PKZIP has a product called PKZIP/MVS last I heard (several years back).
My site uses DATA 21'S ZIP-390.
There are other ZIP products for z/OS but those are the two I've tried myself at one point or another. ZIP products for the mainframe will typically run several thousand (and up) dollars, depending upon your machine size.
Unix System Services supports PAX and TAR, both of which can compress files similar to ZIP. Many PC ZIP products can recognize tar files and treat them as if they were a ZIP file. There's also GZIP and GUNZIP available to install on the mainframe (at least the last time I looked) and being GNU licensed, they are free.
And when you get something zipped, remember that you cannot treat that file as text in MIME (or FTP or whatever) since it is a binary file. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Thanks All, I will suggest these products and check my fate. Once again I am very grateful to all of you for your valuable suggestions.
In the mean time I will try my way through FTP.
Thanks,
Ravi |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
PKZIP and ZIP-390 have options to convert EBCDIC to ASCII while zipping the file. If you use Unix System Services, iconv can convert an EBCDIC file to ASCII before using tar (or pax) against it. If this conversion is not done, the data on the receiving system will still be in EBCDIC and *nix machines (and PCs and Macs) don't do well with EBCDIC data. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
Hello,
Since your step name has "SAS", by any chance do you generate the attachment CSV using SAS?
If yes, then you can change the CSV output destination filename to a Unix directory with ASCII conversion(TRANTAB=ASCII option or something similar)
Then perform a TAR compression of the file.
SAS can send the TAR compressed file as email directly from USS.
Hope it helps. |
|
Back to top |
|
|
ravindra.vadali
New User
Joined: 30 Jan 2012 Posts: 34 Location: USA
|
|
|
|
Hi Vasanth,
Actually my stepname is SAS but the actual utility that I am using is an SMTP. Sorry for any confusion caused because of the step name.
Thanks,
Ravi |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
No problem :-) Good you don't have SAS, it makes people lazy & forget COBOL. |
|
Back to top |
|
|
|