SNMP Subagent Programmer's Guide
Using TACL
5-6 119728—SNMP Subagent Programmer’s Guide
Creating Executable Subagents
Example 5-2. TACL Routine for Static Directory
?tacl routine
== make fixedls example <-- 1
== assumes 1) macro run from source subvol
== 2) ISVs are on same disk as current subvol
[#def checkstep macro |body| <-- 2
[#if [:_completion:completioncode]<>0 |then|
#output %*% failed ~; #return]]
== First, create fixedls.h
run zsnmpsdk.gdmoc -g fxdlssmi -I zsnmpsdk -c fixedlsh <-- 3
checkstep GDMOC compilation <-- 4
== second, compile fixedls.c and dir.c
c /in fixedlsc, out $s.#cc.fixedls/ fixedlso; & <-- 5
ssv0 "$system.system", &
ssv1 "zsnmpsdk", ssv2 "[#defaults/current/]", &
wide
checkstep C compilation
c /in dirc, out $s.#cc.dirc/ diro; ssv0 "$system.system", & <-- 6
ssv1 "zsnmpsdk", ssv2 "[#defaults/current/]", &
wide
checkstep C compilation
== third, bind fixedls.o and runtime library
#push #inlineprefix <-- 7
#set #inlineprefix >
bind /inline, out $s.#bind.fixedls/ <-- 8
> set symbols on
> set inspect on
> set saveabend off
> mode noupshift
> add * from fixedlso
> add * from diro
> add * from zsnmpsdk.peerlibo
> select search $system.system.cwide
> select list * off
> set heap 4000 bytes
> build fixedls !
> exit
checkstep BIND