I have to send an email from JCL with an attachment. The attachment has nearly 40,000 records with record length 60.
When the mail is received, the records in the attachment will be truncated and will get maximum of 2500 records only.
So any one suggest what should be changed in the below process so that all the records can be send in the attachment?
The JCL step is as below.
Code:
//*****************************************************************
//* EMAIL THE EXTRACT FROM FIRST STEP TO THE CUSTOMER
//*****************************************************************
//STEP1 EXEC PGM=LINKABND,PARM=(UCANDU,12)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=STEP1.EMAIL.CONTROL.LIB(EMAILST),
// DISP=SHR
// DD DSN=STEP1.INPUT.FILE1,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD *
COPY,ALL
//*
Where STEP1.INPUT.FILE1 is the file to be attached and STEP1.EMAIL.CONTROL.LIB(EMAILST)contains
Code:
HELO TORGPC
MAIL FROM:<first.last@ABC.COM>
RCPT TO:< first.last@ABC.COM >
DATA
FROM: first.last@ABC.COM
TO: first.last@ABC.COM
SUBJECT: TEST MAIL
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TESTFILE.TXT
Hence we zipped the input file using the below jcl steps and used the same email as above to email. We received the email and attachment as zipped file. But had problem in opening it and got the error something like “Downloaded zip file not archived properly”
HELO TORGPC
MAIL FROM:<XYZ@rediff.COM>
RCPT TO:<XYZ@rediff.COM>
DATA
FROM: SMB RA - ONTARIO - JVH019
TO: XYZ@rediff.COM
SUBJECT: SMB RA - ONTARIO - ADHOC ORDER ACTIVITY EXTRACT
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="---- =_NEXTPART_000_01BD3BAF.A7
THIS MESSAGE IS IN MIME FORMAT. SINCE YOUR MAIL READER DOES NOT UNDERSTA
THIS FORMAT, SOME OR ALL OF THIS MESSAGE MAY NOT BE LEGIBLE.
------ =_NEXTPART_000_01BD3BAF.A762FD80
CONTENT-TYPE: TEXT/PLAIN; CHARSET="US-ASCII"
CONTENT-TRANSFER-ENCODING: 7BIT
ATTACHED IS A ZIP FILE
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
Contact your site support group, explain the problem to them, and get their help in resolving it. When the TCP/IP stack is installed for z/OS, there is a default size limit on SMTP emails. If you have exceeded this limit, nothing you can do in your job will allow you to get around that limit -- only your site support group can change the limit, issue an OBEYFILE against TCP/IP, and allow your complete email to be sent. If the issue is something else, your site support group is again the place to start as they have the tools to diagnose the problem and help you resolve it.
Thank you for guiding. But In order avoid that we ZIPed the file uisng PKZIP as below and then sent an email. But had problem in opening it and got the error something like “Downloaded zip file not archived properly”
Hence the ZIP file was then converted to BASE 64 using the below jcl step and emailed using the next step. But not able to send the ZIP file properly through email.
Yes, I pulled the Ziped file from mainframe to PC and tried opening but it gave below error message.
"End-of-central-directory signature not found. Either this file is not a Zip file, or it constitutes one disk of a multi-part Zip file"
Means in the mainframe file is not Ziped properly. Or it might ziped in EBSIDC format and in PC it is ASCI format. This could be the probelm. If yes how this can be solved.
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
The problem will not be that the data file is EBCDIC and the PC is ASCII -- zip file control bytes are in binary, not EBCDIC or ASCII.
Your problem indicates a PKZIP issue. Contact the vendor and get their help -- only the vendor can tell you why this problem is occurring and how to fix it.
I also used the same code to send a zip file as attachment in mail. When performing FTP from mainframe I am able to open the ZIP file, but when I try to open the file which I received through mail its showing the error message “This is not a valid ZIP archive”. Also the zip file should have a size of 6mb, but the file which I received through mail has only 260 B. Please help me to resolve this.
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
An attachment of 260 bytes indicates to me that your MIME is not working. You need to review your JCL, paying particular attention to the MIME definitions since a single byte mistake can cause the email attachment to fail. Since you didn't post any JCL there's not much we can do to help you.
And when you have an issue, start a new topic -- don't append to the end of a 6-year-old thread.