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:
Chris Bartram <[log in to unmask]>
Reply To:
Date:
Mon, 22 Sep 1997 20:23:44 -0400
Content-Type:
Text/Plain
Parts/Attachments:
Text/Plain (95 lines)
 In <01bcc773$5ea83660$e9295ca8@sn23vpwmn> [log in to unmask] writes:

>         Our corporation recently made the Microsoft suite of office products i
> corporate standard. Needless to say, I have very limited knowledge of these
> products since I have only been using them for a few short months.
>
>         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.

This'll need a <plug> ;-)

Here's a potential solution using NetMail/3000 and our API;

Create a mailbox for your application(s) in NetMail, with it's forwarding
info (forward to node field) set to "|rcptconf.xeq.threek" (which means
'pipe' any incoming mail to the command file called 'rcptconf.xeq.threek';
which you'll write - see below).

In your COBOL program, when an order is encountered that needs approval,
create the confirmation-request message (either in a file or in an array)
and call;

      CALL "CMC_SEND_DOCUMENTS" USING SDS-ADDRESSES, SDS-SUBJECT,
                                 SDS-TEXT, \SD-FLAGS\, SDS-FILES,
                                 SDS-TITLES, SDS-DELIMITER,
                                 \SD-UI-ID\
                                GIVING RC.

(Excerpt from a sample COBOL application we provide with the API product;
 the PICs, and other info I'll leave out here, but they're in the example
 code and I can provide copies on request)

SDS-ADDRESSES is a strung-together list of e-mail addresses; your manager's
             exchange address would be on this list
SDS-SUBJECT is the message subject
SDS-TEXT is the message (as an array)
SD-FLAGS is zero in this case
SDS-FILES, SDS-TITLES, SDS-DELIMETER, and SD-UI-ID aren't important in this
  example, but are used to attach files to a message
RC is the result-code, verifying that the message was submitted for delivery.

This sends your message.

When the manager receives it, he then replies to it. The reply will be
directed back to the 3000 to the mailbox you created, which in turn executes
the command file, passing it the contents of the message, which we'll assume
include some string like "approved by j smith" (or whatever you want to look
for).

Your command file can be something like this:

PARM fname,from_addr
FILE input=!fname
RUN MYPROG.PUB.ACCT1;INFO='!from_addr'

Where "MYPROG.PUB.ACCT1" is a program you write which simply opens the
"input" file, reading it (which is the message body) and look for whatever
keyword/values you would look for in the message; perhaps something like

ORDER# nnnnnnnn

You can also verify the "from_addr" passed to you in the info string, to
make sure the "approval" came from an "authorized" mailbox.

Once you find the info you need, your request is approved, so write to a
file or something that your main application can pick up telling it to release
the order.

Simple, huh? :-)

</plug>

            Chris Bartram


______________________/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_
  Chris Bartram        Sales (US):   800 Net-Mail    Fax:+1 703 451-3720
   ______                         +1 703 569-9189    mailto:[log in to unmask]
  /__ |  \__________   Sales (Europe):+44(1480)414131 Fax:+44(1480)414134
 /  / | / ________     Sales (Pacific):+61 3 9489 8216 Fax:+61 3 9482 5124
|  /_ |<  ______       Tech Support:+1 703 569-9189  Fax:+1 703 451-3720
 \ __)| \ ___          mailto:support at 3k.com       Me: rcb at 3k.com
  \______/Associates,  6901 Old Keene Mill Rd Suite 500 Springfield VA 22150
_________________Inc._/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_
Gopher: gopher.3k.com   Anon-FTP: ftp.3k.com  WWW: http://www.3k.com/

ATOM RSS1 RSS2