This being my first post, please allow me to introduce myself. My name is Eric and I am currently a Administrator/Senior Programmer for H&M International Transportation, Inc. in Central NJ. Although I have only been working here for 3 months now, I have been in the AS/400 World for about 15 years now. I started doing Programming at 19 and have loved the work ever since.
I wanted to address an issue that I have seen pop-up throughout my career. However, this is the first time I’ve seen an actual resolution that worked.
The Error Message received to our *SYSOPR is as follows:
Distribution limit of 9999 reached.
The sender has sent 9999 distributions. These distributions still exist on the system.
Either delete any incoming distributions that you sent to yourself or any outgoing distributions that you sent with confirmation of delivery
In a lot of our programs we use the SNDDST command to send emails and reports to users all over the county. As it turns out, my company has had a problem with this issue for years. The only resolution they could find that worked (for them) was to create duplicate User Profiles and use that when doing the SNDDST command.
I know what you’re thinking, “That’s Absurd!” Well, you’re right. It is absurd. When I found this out, I was determined to find a resolution which would not only help the company, but also give me some points in the new job.
I contacted IBM and informed them of the issue and the resolution my predecessors took in order to “fix” the problem. They laughed, which is fine, because I did too.
Apparently this is a pretty common issue and they even wrote a Technical Document for it. The document contains 4 programs that clean up the mail on the system. The only thing is, they left out a big part of what needs to be done before implementing what was in the Technical Document.
Here is what you need to do:
- Navigate to the Work with Directory Entries screen – WRKDIRE
- Take Option 2 to make changes to the User Profile in the list.
- Page-Down 4 times until you get to the screen with the Mail Service Level entry.
- Change the value for Mail Service Level to 2 for System Message Store
- Change the value for Preferred Address to 3 for SMTP Name
- Submit the Job to call the Control Program CLEANMAILC (Code is Below)
The reason we change the Mail Service Level to System Message Store is so that the mail can be stored in the System Supported Message store. This can be accessed by using the industry standard mail API’s on the client.
The reason we change the Preferred Address to SMTP is so that when a SNDDST command is executed, the mail doesn’t somehow get stuck in the IBM Limbo.
So let’s say you’re running a process that sends a report to 10 users in your community. What if one or two of those users no longer works for the company anymore? That User ID or Email Address was most likely deactivated or removed from the system. Well if the report is being sent to that deactivated address and SMTP Name isn’t specified, the user requesting the report will NEVER know. However, if specified, the requesting user will receive an email saying that it was Undeliverable to that specific address or addresses.
Once all Users are changed in the Work with Directory Entries screen, you can submit the below calling program which in turn will submit 3 other programs and by the end of it, all distributions will be cleared.
Here is what the procedure contains:
Text: Process Mail: Inbound/Outbound/In-Error
Role: Control Program
Text: Process Inbound Mail
Text: Process Outbound Mail
Text: Process Mail in Error
Here’s the IBM Technical Document
Finally, here is my code. I realize it may not fit on the entire screen. But if you give it a click, it should open in a new window which will allow you to save it and check it out in Paint or Word or whatever other program works for you best.
Thank you for taking the time to read this article. Please be on the lookout for more articles from me.
If anyone has any topic suggestions, or wants some assistance with an issue they have, please don’t hesitate to email me at WitheringGnomes@gmail.com
Have a Great Day.