SNMP Subagent Programmer's Guide
Creating Executable Subagents
SNMP Subagent Programmer’s Guide—119728 5-5
Using TACL
Acceleration
When the target system for subagent execution is a RISC system, you have the option of 
accelerating the executable subagent using the Accelerator. The following command 
creates an accelerated object file named hellonwa from the Binder output file named 
hellonw:
AXCEL hellonw, hellonwa
The accelerated object file contains both the original TNS code and the logically 
equivalent optimized RISC instructions. On TNS/R systems, RISC instructions execute 
directly on the RISC processor, so CPU operations are faster. Accelerated object files 
can also be executed, however, on TNS systems; TNS systems simply ignore the RISC 
code.
Subagents for which CPU performance is an issue usually run several times faster when 
accelerated. If a subagent is I/O-bound, you gain little measurable performance by 
accelerating it. Refer to the Accelerator Manual for more information on this utility.
Using TACL
Instead of invoking each utility individually, you can create a TACL routine that invokes 
them all in the proper sequence. Each sample subagent provided with the Toolkit has a 
TACL routine for converting its source files into an executable subagent. Example 5-2 
shows the TACL routine for Static Directory, which is contained in a file named 
fixedlsm; TACL constructs are highlighted in bold type. Numbers in the example 
correspond to these observations:
1. The double equal sign (==) precedes comment lines.
2. The #DEF built-in function defines a variable named checkstep. This variable is 
assigned a value to be included in an error message if any subsequent operation 
fails. If a failure occurs, the #return option terminates execution of the TACL 
routine.
3. The MIB compiler is invoked.
4. The checkstep variable is called with the parameter value GDMOC compilation if 
GDMOC compilation fails.  Then the following message is printed, and the TACL 
routine terminates:
GDMOC compilation failed
5. The subagent source code in fixedlsc is compiled.
6. The subagent source code in dirc is compiled.
7. The TACL #INLINEPREFIX built-in function directs TACL to send lines starting 
with > to an inline process: in this case, the Binder utility. Binder reads its 
commands from lines starting with >.
8. The Binder utility is invoked.










