× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: MSF mail stopped working
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Wed, 23 Jun 1999 12:49:58 -0600

Gerald,

Here are some answers to some common problems encountered when 
using MSF APIs and the source members included with that article.  
Because MSF APIs are used by Office, Qtmfsndmail, and Snddst, 
these instructions apply in part to these interfaces also.  Where it puts 
the mail is dependent on how your directory entry is set up (or not set 
up).

The printed article was shortened to fit the allotted space.  The web 
version had more "how to use" information.  The URL is:

http://www.news400.com/bonusfeature/nov98/index.html 

To start you will need to set up the copy source members correctly.  
When I submitted the code to News/400 I sent two members with 
the same name, MSF.  The module MSF supports Mail Server 
Framework APIs.  The reason for MSF1 and MSF2 is that one is the 
module source and one a copy source that contains prototypes.  
Prototypes provide a description of a procedures parameters.  I 
usually name my prototypes the same as their corresponding module.  
News/400 renamed the members to prevent accidental overlay.

First you will need to rename member MSF1 to MSF and rename 
MSF2 to MSFPROTO.  Next change the /copy lines in MSF and 
TSTMSF to use the source file sndmail in library yourlib.  If yourlib is 
in your library list for compiles change:

/copy qprotosrc,msf  -to-  /copy sndmail,msfproto
/copy apierrdef  -to-  /copy sndmail,apierrdef
/copy qprotosrc,ceedod  -to-  /copy sndmail,ceedod
/copy qprotosrc,ceetsta  -to-  /copy sndmail,ceetsta

If yourlib is not in your compile library list change:

/copy qprotosrc,msf  -to-  /copy yourlib/sndmail,msfproto
/copy apierrdef  -to-  /copy yourlib/sndmail,apierrdef
/copy qprotosrc,ceedod  -to-  /copy yourlib/sndmail,ceedod
/copy qprotosrc,ceetsta  -to-  /copy yourlib/sndmail,ceetsta

Once the changes are made to your source follow the compile 
options listed in the source headings.  If you decide to keep it 
simple and not use a service program it will be compile module 
MSF, then module TSTMSF.  Next create program TSTMSF 
specifying the two module on the CRTPGM command.  To use 
a service program first compile module MSF, then create service 
program MSF.  Next compile module TSTMSF and then compile 
program tstmsf.

The /copy source which defines the prototypes QPROTOSRC,MSF is 
MSF1. The module source for MSF is MSF2. I could have made it easier 
to understand by naming the prototype something like "msfproto".  
Instead, I used what I felt was the more flexible naming convention.

The MSF APIs were extracted from Office Vision and are used by 
Office Vision to send messages. I do not have Office Vision, and 
it works fine on our system. I am not certain, but from what I understand, 
the format of messages can be determined by the Mail Service Level.  
I have always set this to the system message store. 

The following are answers to questions that have come up about using 
MSF:

Neither SndMail or SndDst require Office Vision.  The most likely problem 
is that one of the required servers is not started.  Following are the steps 
I followed (as best I can remember.)  First the MSF server, SMTP server, 
and QSNADS subsystems must be started.  Use STRSBS QSNADS, 
STRTCPSVR *SMTP,  and STRMSF.  Start the SMTP server before 
the MSF server.  If you are not sure stop and restart the MSF server 
(you might want to do this anyway).  

Do you have directory entries for the people sending E-mail?  You should 
not need them for the SndMail utility, other than to specify an address 
for non-delivery messages, which is a message sent when an E-mail 
cannot be delivered.  The directory entry ties the user profile sending the 
E-mail to an address.  You can use the ADDDIRE command to add 
entries.  They can be displayed using DSPDIRE or WRKDIRE.

We have an entry that also specifies the SMTP name so that the correct 
sender SMTP address is used when the SNDDST command is used.  
Ours specify system message store, and a preferred address type of 
SMTP name.

My entry was added using:

ADDDIRE USRID(DMORRIS PLUM)  
                 USRD('Text stuff')  
                 USER(DMORRIS)
                 USRDFNFLD((SMTPAUSRID SMTP 'DMORRIS')
                                        (SMTPDMN SMTP 'PLUMCREEK.COM'))
                  MSFSRVLVL(*SYSMS) 
                  PREFADR(*SMTP)

You also need an internet routing directory entry before an internet 
address can be specified on the SNDDST command.  Following is the 
command we used.

ADDDIRE USRID(INTERNET USERS)
                 SYSNAME(TCPIP)  
                 USRD('Context switching entry')  
                 USER(*NONE)
                 MSFSRVLVL(*USRIDX) 
                 PREFADR(NETUSRID *IBM ATCONTXT)

David Morris

>>> "Gerald Magnuson" <magnuson@knapheide.com> 06/23/99 10:33AM >>>
Monday morning I was given a challenge to send an e-mail from the AS/400.
(conversation went like this:)
MIS director:  The president needs to see the data first thing every
morning.

Network Admin:   Well, if the data was on the NT server, we could E-mail it
                         him.

ME (and my big mouth):   I can do that on the AS/400, no problem....



By Monday at lunch I had it done (which I like to thank members of this
list).

I am using the QzmfCrtMailMsg api found coded in the news400 nov. 1998
(SndMail by David Morris)

We have a in-house mail server (Linux) that the mail goes to.

-Cut to Wednesday morning!!!
I cannot send mail.

I have made sure that the QMSF jobs are running (3).

I have ended and restarted MSF.

There were 1 entry in each of the Distribution Queues (QSMTPQ)
and they were in failed status. I deleted the entries, held and released the
queues and they are now in waiting status. These appeared to be messages
saying that a mail message failed.

I have ran a comm trace on the ethernet, and it appears that the mail data
is
not comming out of the AS/400.

I have looked at the QZMF journal and I do not see anything that helps me.

What am I to do???    Where does the mail go when I put it through the API?

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.