|
Hi Steve, fancy meeting you here. (Steve's on our media library/media robot
team).
The DCL procedures work well for reproducibly executing a fixed set of
directives when the results are evaluated externally. In the case you
reference, we use DECTest Manager (DTM) to DIFF the results of each directive
with what we expected, so that works okay. Note also that the command
procedures issue only one MCC (Manage/Enterprise) command at the $ prompt, then
all directives are issued to the MCC> prompt, so it is more an MCC script
than a DCL command procedure.
What is much harder is writing a DCL procedure that intelligently senses
the result of a directive and does the right thing. On the one hand, if
each directive is issued as a separate invocation of MCC, the procedure could
sense the exit status:
$ MCC directive target_class instance, argument=value
$ IF $STATUS .NES "<something expected>" THEN GOTO <somewhere else>
Trouble is, the exit status currently doesn't reflect the status of the
directive, maybe some future version will.
On the other hand, the DCL procedure can capture the output of each directive
and parse it to determine whether it worked.
$ MCC directive target_class instance, argument=value, TO FILE = result.txt
$ SEARCH/NOOUTPUT result.txt "success"
$ IF $STATUS .EQS. "%X00000001" THEN GOTO IT_WORKED
Hope this helps.
Richard
|
| Hi Steve,
NETops uses procedures for almost all tasks. This includes starting alarms
and gathering statisical info on entities. As far as setting multiple
attributes we don't use MCC at all because our routers are server based and
therefore non-volitile changes are made on load files at the load hosts. MCC
has yet to tackle this (and don't appear to have intentions to in the near
future).
As far as error handling goes we took an approach similar to what -.1 suggests.
A procedure is built to capture stats on multiple entities, it is run and
outputs are written to .tmp files. From here the .tmp files are reformatted
to a more usable state. But if what is in the .tmp isn't what we want then
I send the .tmp via mail for us to investigate. This approach seems to work ok
but I haven't run it for very long as yet.
best regards,
brad...
|
| Rich,
MCC FCL does return the status of the last command it ran. So if you run
$mange/enter <mcc command> the return status will be the status of the
last command run. Now note that this means you wil most likely get a
status of mcc_s_response (52854857) or mcc_s_specialized_exception
(52854873) or mcc_s_common_exception (52854881). Response means the
command worked, exception as you know means an unexpected or error condition
was detected. These returns should be working in the V1.1 kit, and should
allow you to do more intelligent DCL procedures.
jill
|