I am using the SAS module to email mainframe file to an email address. I found out through testing that maximum allowable record length is 999 for successful email transmission.
I could not find out what is the maximum number of records (and record length combination) could be successfully transmitted.
I tested with record length of 100 bytes and about 700K records, the transmission failed with RC=0008,
Code:
ERROR: Email server did not respond.
NOTE: The SAS System stopped processing this step because of errors.
Could any of experts clarify if the record length limit and number of records limit that can be successfully transmitted using the SAS emailing utility?
Could any of experts clarify if the record length limit and number of records limit is an issue with the target email server or is it a limitation of the SAS emailing utility?
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
SMTP-based emails (such as SAS) are limited to 1000 bytes per record per the RFC specification. There typically is 1 or 2 bytes for end-of-line (LF or CR/LF) so 998 or 999 is the longest record.
We cannot tell you the maximum number of records you can transmit -- that depends upon settings in your TCP/IP configuration and these are generally customized per site. Specifically, the SMTP MAXMAILBYTES configuration setting determines the maximum size in bytes of mail messages sent using TCP/IP. The default is 524288 (or 512K) and cannot be more than 2147483647 (2G-1). Since system resources are impacted by this setting, you MUST contact your site support group to find out your site limit.
Let's assume, if the email SMTP is configured to receive a maximum of 25MB of attachment in a single email(pardon me if I used any terminology incorrect).
Would it be possible to predict/calculate what would be the size of the mainframe file(based on record length and number of records) once it reaches/ tries to reach email?
By this way we would be able to throw an error message if the attachment size is calculate as more than 25 MB(in this case).
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
First, a terminology note -- mainframes do NOT "throw an error message", ever. They may generate an abend or error message, but they don't "throw" things.
Second, you would be better off working with your site support group on your specific requirements. If you have 500 byte records, 25,000,000 bytes would be 50,000 records. If these records are binary, then that would require 25,000,000 bytes on the mainframe as well as the PC. If these records are text, they would require 25,050,000 on a Linux / Unix machine or 25,100,000 on a Windows machine but still require 25,000,000 on a mainframe (since line terminators are used on a Linux / Unix / Windows machine but not on the mainframe).
And in any case, you cannot tell (at least on the mainframe) in advance if the email exceeds the site limit so you could not generate any error message about it. You might be able to on a Linux / Unix / Windows machine -- I don't deal enough with them to know for sure.