HP3000-L Archives

September 1997, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Wowchuk <[log in to unmask]>
Reply To:
Jim Wowchuk <[log in to unmask]>
Date:
Tue, 23 Sep 1997 23:38:47 +1000
Content-Type:
text/plain
Parts/Attachments:
text/plain (78 lines)
On Mon, 22 Sep 1997 4:19PM, Jerry Gailey <[log in to unmask]> wrote,
[snip...]
>        I have been given the assignment to find a way to interface a COBOL
>program, which runs on an HP-3000 model 987, with the Microsoft Exchange
>e-mail system (and back again). The particular application we are working
>with is one which will allow operators on our production floor to order
>parts from our purchasing system. Some parts, because of cost, require a
>manager to approve the request before the order can be placed. We would
>like a notification to be sent to the manager, via Exchange, when such a
>part has been requested. The manager could then approve or disapprove the
>request. If it is approved, information from Exchange would have to be
>returned to the COBOL program to notify it that it is okay to release the
>order.
[snip...]
>        Any suggestions?

You've got a couple of problems here:

1)  You need the ability to have an HP3000 program send messages to the
Exchange server.

2)  You need the ability to receive messages on the HP3000 from the Exchange
Server on the 3000.

3)  You need a way to examine a message received on the HP3000 to determine
if the request has been approved or not.

For the first, I would suggest it is relatively easy to interactively
connect from a program through TCP/IP using the SMTP (protocol) to the
Exchange 4.0 Internet Mail Connector (IMC) and pass a message.  With proper
configuation settings, this could be done pretty quickly, though I'd
recommend using the NetIPC intrinsics rather than the ARPA BSD intrinsics
since COBOL is your language.  Alternately, it may be easier to use IPC (msg
files) from your cobol program to a dedicated transport server program
written in Cobol or maybe in 'C'.  More isolation, less mucking up of your
principal app, plug & play.  Third party packages may be supported as well.
If you're not familiar with how to write an SMTP (Simple Mail Transfer
Protocol) client, drop me a line, or look at the source code provided in my
contributed JTMAIL program (mind you it is in 'C').  Don't forget to look at
3rd party tools (e.g. 3K) and see if they may be able to do this for you.

For the second, you will need to write an SMTP Server program to receive the
messages.  This is much more complex and you'll need to decide what to do
with the messages once they are received.  If this application is the only
one to receive e-mail on the 3000, your task will be considerably simpler.
You'll need to spend some time in the Exchange configuration utility to
assist routing the specific messages, but that's not too hard.  Because of
the difficulty here, I'd recommend using a 3rd party tool on the 3000,
unless you're really up with a SMTP RFCs, and Network programming.

That said, a really simple SMTP server only needs to understand about 5
predicate-based commands (HELO, MAIL FROM:, RCPT TO:, DATA, QUIT),
especially if you're not handling other messages, or running concurrent
sessions with multiple hosts.  Again, not brain surgery.

For the 3rd part, you'll need some sort of mail processor that can identify
the original request, and determine the reply.  If your requests are
numbered then perhaps include this in the subject line, so that it is
automatically included on return by most Exchange clients.  The approval may
be placed in the body if you like but you'll probably need some sort of
syntax: e.g. put a single word APPROVED or DENIED on the first line of the
body of the text.  A number of tools like awk, perl, mailproc allow you to
manipulate the text, extracting relevant parts.  This part may actually be
the most difficult, since you can't really ensure that the users enter their
responses correctly. You may need to generate mail messages in reply to the
users to advise them of this.

I hope this helps.  Please feel free to contact me a line if you want more
detail.

Cheers.
----
Jim Wowchuk                Vanguard Computer Services
 _--_|\                    Email: [log in to unmask]
/      \                   Post:  PO Box 18, North Ryde, NSW 2113
\_.--._/ <---Sydney NSW    Phone: +61 (2) 9888-9688
      v      Australia     Fax:   +61 (2) 9888-3056

ATOM RSS1 RSS2