The API (Application Program Interface) to the MEMO-system is intended to provide to a batch program a similar set of functions that a MEMO user has.
The following functions are provided today:
- signon and signoff to MEMO
- list the contents of the mailbox
- create and send a memo
- create and save a memo
- delete a memo/reference to a memo
- retrieve a memo.
- notification when a memo arrives to the mailbox
Examples of situations where the API could be used:
- a batch program that has a need to create and send an e-mail
- a batch program that has a need to distribute small amounts of information
Memo API has three different protocol layers.
- a macro type level for use by assembler programs
- a call type level for use by higher level languages
- an external type level for other users.
Macro level (L1 interface)
The macro type level has a set of macros that are directly related to the basic requests that can be issued to the internal MEMO request handler within the MEMO-system. This level gives the highest degree of control of the available functions that MEMO/API provides.
Call level (L2 interface)
The call type level is intended for use by batch programs that basically have a need to send/save/retrieve/delete a memo but do not want to get involved in the maillog processing. This level gives functions on a higher functional level like ’delete all references of memos being older than date so and so …’. Such high level requests are broken down into a set of requests operating on the maillog automatically by the call type interface program. However, to provide a higher degree of control, this level also gives a possibility to operate on single entries in the maillog.
External level (L3 interface)
The external level specifies the syntax of a control file that can be read as a SYSIN file to an API program that issues the appropriate request through the API L2 interface program to accomplish a send/save/retrieve/delete of memos. This can be used by batch programs to create a control file according to these specifications and then in a later jobstep execute the API program to get the memo functions done.