MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Reference and Help > Technical Support > Key Concepts and Procedures > Operation Procedures > Asynchronous Monitors

Asynchronous Monitors

 

 

MAC-PAC uses monitors to process asynchronous transactions.  An asynchronous monitor is a program that determines what processing is waiting to be performed and either performs the processing itself or calls another program to perform the processing.  You determine which monitors are active through the Initiate/Cancel Monitors option on the MAC-PAC System Processing Menu.  This procedure is described later in this chapter.

MAC-PAC uses two types of monitors:

·     Multi-transaction monitors

·     Single-transaction monitors

Multi-Transaction (Manufacturing) Monitors

Multi-transaction monitors are used primarily in the manufacturing modules.  Consequently, they are sometimes referred to as the manufacturing monitors.  They are command language (CL) programs that remain in memory whenever the monitor is active.  The following steps occur for asynchronous processes that use multi-transaction monitors.

1.   The monitor polls the message queue periodically to determine if any asynchronous requests are waiting to be processed.

2.   When you request asynchronous processing, the workstation sends a message to a message queue.  The data to be processed is written to a transaction file.

3.   The monitor receives the message, determines which type of transaction is being processed (through the transaction ID), and calls the proper application program. 

4.   The application program reads the transaction file and processes the record.  The program processes the transaction file until all related records are complete.

5.   After the processing is complete, a message is sent to the terminal and control is returned to the monitor. 

6.   The monitor continues to poll the message queue for additional transactions until it is canceled.  The monitor is canceled when a SHUTDOWN message is received.  The JIT monitor can be canceled with a SHUTDOWN or a SHUTDOWNNIGHT message is received.  See How Monitors are Canceled later in this section.

This transaction flow is shown in the figure below.  Detailed information about the follows the figure.

Processing Flow for Multi-Transaction Monitors.

 

 



Monitor


Message
Queue



Transactions Processed

Transaction
ID


Program
Called

Electronic Data
Collection
(BCASYNCMON)

BCASYNMSGQ

All EDC transactions (routed to the appropriate MAC-PAC program for validation)

 

BC200E

Just-in-time
(JTASYNCMON)

JTASYNMSGQ

Deduct point issues
Flow receipts - to schedule
Flow receipts - to bill of material
Labor transaction - direct
Labor transaction - indirect
Lot control inventory relief
Machine transaction - direct
Machine transaction - indirect
Production schedule maintenance
Unplanned material usage

DDT
FRS
FRB
DLB
ILB
LTI
DMC
IMC
FMP
UNP

JT145CLP
JT125CLP
JT135CLP
JT200CLP
JT200CLP
JT150CLP
JT210CLP
JT210CLP
JT105CLP
JT170CLP

MAC-PAC
(MPASYNCMON)

            or

(MPASYNCMN2)

            or

(MPASYNCMN3)

            or

(MPASYNCMN4)

MPASYNMSGQ


            or

MPASY2MSGQ

            or

MPASY3MSGQ

            or

MPASY4MSGQ

 

Bar coded shipments, returns, and adjustments
Bar-coded shop floor transactions
Bar-coded stock transfers
Bar-coded purchase order receipts
Bill of Documents Mass Maintenance
Component issue processing (pick complete)
Copy bill of material
Copy routing
Labor requirements maintenance
Manufacturing receipts
Manufacturing receipts SIR processing
Manufacturing order maintenance
Manufacturing order release
Manufacturing order shop paperwork request
Projected demand (forecast)
maintenance
Tentative master schedule
maintenance
Transfer Order Maintenance
Transfer Requisition Maintenance

SRA

SFT
R70
TRN
TM1,TM2,TM3,TM4CIP

SA2
OA4
AS4
CIO
CIS
AS1
AS2
AS3

FCM
MSM


TOR
TRQ

IC120CLP7

SF127CLP
PO220CLP2
IC120CLP7
BD220CLP

IC130CLP3

DE120CLP4
ME130CLP
IC102CLP
IC130CLP3
IC130CLP3
IC102CLP
IC102CLP
IC102CLP

MS155CLP
MS165CLP


TC100CLP
TC110CLP

Purchasing
(POASYNCMON)

POASYNM
SGQ

Automatic PO Close
Identification tag print
Immediate purchase order print
Immediate receipt notice print
Quality Control Maintenance Request
Quantity and Quality Control Report print

PO2
RC2
PO1
RC1
R72
RC3

PO180CLP
PO660CLP1
PO630CLP1
PO650CLP1
PO220CLP
PO670CLP1

Synchro Report
Request
(GAASYNCMON)

GAASYNM
SGQ

AVIEXP transmission
INVOIC transmission
Picker print
Shipping/Billing
Shipping list (delivery note) print
Synchro label print

AVI
INV
PCK
BIL
DLN
LBL

GA260CLP
GA240CLP
GA530CLP
GA540E
GA540CLP
GA325CLP

                 Multi-Transaction Monitors

 

Single-Transaction (Distribution) Monitors

Single-transaction monitors are used primarily in the distribution modules.  Consequently, they are sometimes referred to as the distribution monitors.  Each monitor is an application program that processes a single type of transaction.  The program remains in memory whenever the monitor is active.  The following steps occur for asynchronous processes that use single-transaction monitors.

1.   The monitor polls a transaction file periodically to determine if any asynchronous jobs are waiting to be processed.

2.   When you request asynchronous processing, the workstation writes a record on the transaction file.

3.   When the monitor program determines that a record exists in the transaction file, it processes that record.  Note that no additional program is called to perform the processing.

4.   The monitor will wait for 60 seconds, then read the transaction file again.  The monitor will continue to poll the transaction file until it is canceled.

This flow is illustrated in Figure 3.  Details about single-transaction monitors are provided in Figure 4.

Processing Flow for Single-Transaction Monitors.

 

 

Monitor

Monitor Description

Program

Transaction File

GAIITMON

Synchro INVOIC Message Extraction

GA240E

GA235AP

GASBUMON

Synchro Shipping/Billing

GA270E

GA270AP

MFGCFGMON

Manufacturing Configuration

EC200E

EC200DP

MPBOLMON

Immediate Bill of Lading Print

OP690E

OP690BP

MPCBUMON

Consolidated Billing

OP640E

OP290AP1

MPESOMON

EDI Sales Order Generation

ED140CLP

ED105AP1-4

MPIIPMON

Immediate Invoice Print

OP540E

OP535AP

MPIPPMON

Immediate Picker Print

OP510E

OP505AP

MPPOAMON

EDI PO Ackn Update

ED100E

ED100AP1-3

MPPOGMON

PO Generation

PO185E

PO185AP1

MPPORMON

EDI PO Receipts Update

ED120E

ED120AP1-4

MPQTEMON

Immediate Quote Acknowledgment Print

OP550E

OP550AP

MPRMAMON

Immediate RMA Print

OP710E

OP710AP

MPSBUMON

Shipping/Billing Update

OP125E

OP120BP

MPSLRMON

Stock Location Reservation

OP220E

OP220AP

MPSOAMON

Immediate SO Ackn Print

OP520E

OP515AP

SAPSTMON

Sales Analysis Post

SA130E

OP120ML6

               Single-Transaction Monitors.

 

Modules Affected by Each Monitor

Figure 5 indicates which modules are affected by the MAC-PAC monitors.

 

Monitor Name

Monitor

Modules Affected

 

Multi-Transaction Monitors

Electronic Data Collection

BCASYNCMON

Electronic Data Collection (BC)

 

Just-in-Time

JTASYNCMON

Just-in-Time (JT)

 

MAC-PAC

MPASYNCMON

MPASYNCMN2

MPASYNCMN3

MPASYNCMN4

Bill of Documents (BD)
Electronic Data Collection (BC)
Design Engineering (DE)
Inventory Control (IC)
Manufacturing Engineering (ME)
Master Scheduling (MS)

 

Purchasing

POASYNCMON

Purchasing (PO)

 

Synchro Report Request

GAASYNCMON

Synchro (GA)

 

Single Transaction Monitors

 

Consolidated Billing

MPCBUMON

Accounts Receivable (AR)
Order Processing (OP)

 

EDI PO Ackn Update

MPPOAMON

Purchasing (PO)
Electronic Data Interchange (ED)

 

EDI PO Receipts Update

MPPORMON

Purchasing (PO)
Electronic Data Interchange (ED)

 

EDI Sales Order Generation

MPESOMON

Order Processing (OP)
Electronic Data Interchange (ED)

 

Immediate Bill of Lading Print

MPBOLMON

Order Processing (OP)
Transfer Control (TC)

 

Immediate Invoice Print

MPIIPMON

Accounts Receivable (AR)
Order Processing (OP)

 

Immediate Picker Print

MPIPPMON

Order Processing (OP)

 

Immediate Quote Acknowledgment Print

MPQTEMON

Order Processing (OP)

 

Immediate RMA Ackn Print

MPRMAMON

Order Processing (OP)

 

Immediate SO Ackn Print

MPSOAMON

Order Processing (OP)

 

Manufacturing Configuration

MFGCFGMON

Accounts Receivable (AR)
Expert Configurator (EC)
Inventory Control (IC)
Order Processing (OP)

 

PO Generation

MPPOGMON

Purchasing (PO)

 

Sales Analysis Post

SAPSTMON

Order Processing (OP)
Sales Analysis (SA)

 

Shipping/Billing Update

MPSBUMON

Accounts Receivable (AR)
Inventory Control (IC)
Order Processing (OP)

 

Stock Location Reservation

MPSLRMON

Inventory Control (IC)
Order Processing (OP)

 

Synchro INVOIC Message Extraction

GAIITMON

Synchro (GA)

 

Synchro Shipping/Billing

GASBUMON

Accounts Receivable (AR)
Design Engineering (DE)
Inventory Control (IC)
Synchro (GA)

 

         

                Modules Affected by Asynchronous Monitors

 

Viewing Messages in Message Queues and Transaction Files

The following examples illustrate how the transactions appear in a message queue (waiting to be processed by a multi-transaction monitor) or in a transaction file (waiting to be processed by a single-transaction monitor).  In each example, the first line indicates the command that would be used to display messages in the queue or file.

Multi-Transaction Messages

WRKMSGQ AADATLIB/message queue name

Example:

FROM   :  CONJAY     02/07/99   08:25:26
                   DSPLY1 ASQ2DAA3770B443JAYTST4

1     AS/400 Operator Code
2     Transaction Identified
3     Job Name
4     Data to identify the transaction

Single-Transaction Messages

DSPPFM AADATLIB/message queue name

Example:

00110012IN314000000485CONJAY  699020872029078

1     Company code
2     Location code
3     Document type
4     Document code
5     Document number
6     User ID
7     Date
8     Time

Multi-transaction vs. Single-transaction Monitors

Each type of monitor has its advantages and disadvantages. 

With multi-transaction monitors, only a very small CL program remains in memory while the monitor is active.  In addition, no files are open to support the monitor.  Thus, the monitor itself requires minimal machine resources, and the system processes efficiently when no requests are pending.  However, when a request is received, a multi-transaction monitor can be relatively inefficient.  For each transaction that is sent, the appropriate application program must be loaded and files opened.  If several transactions of the same type are processed immediately after each other, the same overhead is incurred for each transaction, and the process is inefficient.

To solve this inefficiency in the MAC-PAC monitor, three additional monitors can be used in order to separate the high volume transactions from those transactions which are not performed as often.  With these four monitors, you will have the ability to group transactions in such a way as to find the optimal solution for your business needs.

The three monitors are exact copies of the MPASYNCMON except each has a different message queue.  Each monitor will receive a message from a different message queue and they will all have a unique data area.  Reference File category N37 will be used to group transactions into four different message queues.  The category consists of 12 entries, one for each asynchronous program called from MPASYNCMON (the same asychronous programs will be called from the three new monitors).  A separate message queue will be specified for each asychronous program and all transactions processed in a particular asynchronous program will be sent to the same message queue.  If a message queue is not specified, then MPASYNCMSGQ will be used as the default message queue for all transactions, and each transaction will continue to be processed by MPASYNCMON unless you indicate a different message queue.

Likewise, for transactions that are of high volume such as IC102E, IC120E, IC130E, and SF127E, you can indicate on category N37 whether you want to run them in Dedicated mode.  If you want to improve the performance on one of these three types of transactions, you should set the Dedicated Mode flag to 'Y', and you should assign this transaction to an asynchronous message queue that is used only for this transaction.  When a program processes in dedicated mode, the files used by this program are left open after each transaction.  This eliminates the open and close steps that must normally be performed for each transaction, and therefore makes processing faster.  The asynchronous program can be left open while the monitor continues to process the same type of transaction.  As soon as another type of asynchronous transaction is sent to the same message queue, the dedicated program must be closed and the next program opened (which will actually result in slower than normal processing).  It is important, therefore, to ensure that any program that has a Dedicated Mode flag of 'Y' is assigned to a message queue that is only dedicated to it.  For example, if you wish to process IC130CLP3 in a dedicated mode, set the Dedicated Mode flag for IC130CLP3 to 'Y' and assign it to a unique message queue, such as MPASY2MSGQ.  Then assign all other programs to a message queue different from MPASY2MSGQ.

You can change the Dedicated Mode flag for any of the four programs at any time, but you must cancel, then re-initiate the related monitor for the change in Dedicated Mode to take affect.

In addition, Reference File category N36 allows you to define the number of manufacturing monitors (1-4) that you want to use.  MPASYNCMON will always be displayed regardless if there is any data on category N36 or N37.  On category N36 you will also be able to define the description for the monitors that will be displayed on the Initiate/Cancel Monitors screen.  This screen will allow you to initiate and cancel the manufacturing monitors you wish to use.  Only the monitors you defined on category N36 will be displayed.  You must setup a description on category N36 for all MPASYNC monitors you want to use in category N37 or else you won't be able to start the additional MPASYNC monitors on the Initiate/Cancel Monitor screen.

Single-transaction monitors have the opposite advantages/disadvantages of multi-transaction monitors.   With a single-transaction monitor, the application program is loaded into memory when the monitor is activated.  Since the program is already loaded, each transaction can be processed more quickly.  However, a larger share of the machine's resources are dedicated to the monitor at all times.  Note that single-transaction monitors leave the data paths open at all times.  Open data paths also require some system resources but improve processing times when many transactions are being processed.  Open data paths do not allocate or lock records. 

In general, multi-transaction monitors are appropriate when transactions occur infrequently.  Single-transaction monitors are appropriate when asynchronous transactions are processed constantly.  In deciding which type of monitor to use for a given transaction, Andersen Consulting took into account the typical transaction frequency.  For example, in most installations, design changes occur less frequently than shipping and billing transactions, so the MAC-PAC monitor is a multi-transaction monitor and the Shipping/Billing monitor is a single-transaction monitor.  If these assumptions do not hold true for your business, you may wish to customize the code to set up more message queues for manufacturing monitors.