EMS Manual
Retrieving Event Messages Programmatically
EMS Manual—426909-005
4-2
Getting Started
Getting Started
1. Start the consumer distributor interactively or programmatically:
If you start the distributor interactively, you can provide all of its environment 
specifications when you start it, or you can leave some of the specifications for 
the management application to establish when it has opened the distributor.
Enter a TACL command to RUN EMSDIST (the distributor):
RUN EMSDIST / NAME $DIST1, CPU 3 / TYPE CONSUMER, BACKUP 
4, COLLECTOR $0, FILTER FCRIT
For a detailed description of the RUN EMSDIST command, see EMSDIST—
Distributor Program on page 13-34. This sample command runs a consumer 
distributor as a process pair named $DIST1 in processors 3 and 4. The 
distributor accesses the current collector log using the filter contained in file 
FCRIT.
To let the management application specify some of the environment 
specifications, omit one of these parameters:
FILTER parameter, letting the application specify a filter later or default to 
“pass all event messages”
COLLECTOR parameter, in which case the application would have to 
specify either a collector or a saved log file before it could retrieve any 
event messages
Although this example does not show the TIME parameter, you can also 
specify it in the RUN command, allow it to default, or have the management 
application specify it later.
To start the distributor programmatically, use the NEWPROCESS procedure or 
the PROCESS_CREATE_ procedure. You must use PROCESS_CREATE_ to 
create high-PIN processes. This TAL example initiates a consumer distributor 
called $MYDST as a process pair with the primary process running in 
processor 7:
distprog ':=' ["$SYSTEM SYSTEM EMSDIST "];
distname ':=' ["$MYDST "];
CALL NEWPROCESS(distprog,
 , !priority--default!
 , !memory pages--default!
 7, !primary process in cpu 7!
 emsdist^pid, !process ID returned!
 error, !error returned!
 distname, !process name!
 , !hometerm defaults!
 , !inspect flag defaults!
 );
! Check for NEWPROCESS error
IF error THEN ... !unsuccessful!










