| Hi Andrew,
This is not a direct answer becasue I believe you would like to simply pass
parameters into a MCC process. I don't think this can be done but the
engineeers can most likely better answer.
But a solution tactic I can provide. I do this kind of stuff all the time for
building the entire system (alarms, records, set speeds, etc...). Example, I
record attributes for 100 circuits. This equates to typing 600 lines of
RECORD commands. No-can-do. If I had to actually do this I'd be in another
business. What I do is have a command procedure WRITE ANOTHER PROCEDURE.
Here's an example. We have a configuration file which lists (line by line)
all the necessary info for creating a command. The procedure will read the
config file, extract the "parameters", then create mcc commands into another
procedure to be run.
Example:
- open config file
loop:
- read a line
- pull out all the elements needed to build command
- open mcc_procedure file
- write mcc command into mcc_procedure file
- goto loop
$ open/write procedure mcc_rpt:start_records.com
$ write procedure "$ set noon"
$ write procedure "$ manage/enter"
$ write procedure "!"
$ close procedure
$!
$ open entities mcc_rpt:mcc_config.dat
$ next_line:
$ read/end_of_file=end_build entities config_line
$ config = f$edit(config_line,"trim")
$ config :='config
$!
$!
$! GET the node name
$!
$ node = f$element(0," ",config)
$!
$!......Get the rest of the elements (circuit, domain, etc..)
$ BUILD_FILES_DNA4:
$!
$!
$!
$ open/append build mcc_rpt:start_records.com
$ write build "record node4 ''node' circ ''circuit' part=counters,-"
$ write build "keep age=14 00:00:00, poll period=1:00, in domain ''domain'"
$ write build "!"
$ write build "spawn wait 0:0:10"
$ write build "record node4 ''node' circ ''circuit' part=characteristics,-"
$ write build "keep age=14 00:00:00, in domain ''domain'"
$ write build "!"
$ write build "spawn wait 0:0:10"
$ write build "record node4 ''node' line ''circuit' part=characteristics,-"
$ write build "keep age=14 00:00:00, in domain ''domain'"
$ write build "!"
$ write build "spawn wait 0:0:10"
$ close build
$!
$ goto next_line
$!
$! etc, etc...
After running this procedure the new file mcc_rpt:start_records.com is created.
This file will enter mcc and execute all the RECORD commands. You might be able
to use this same idea with your customer.
best regards,
brad...
|
|
Here's the method we used when we did testing for DECmcc. It
went something like this if I recall. It might not be 100%
correct but you should get the idea anyways.
We made use of MCC's initialization feature via the MCC
INIT file and MCC command template files. We had command
templates of each of MCC's functions ( ie. export, record, etc. ).
When we wanted to execute a MCC command we invoked a generic
EXECUTE command procedure passing it the template to be executed and
the necessary variable information as parameters. This
procedure would create a MCC initialization file defining the
variable parameters as MCC symbols in this file and then
invoke the command template.
Your particular case might look something like this.
* SAMPLE EXECUTE COMMAND PROCEDURE *
$!
$! EXECUTE.COM
$!
$! P1 = COMMAND TEMPLATE
$! P2 = ENTITY
$! P3 = EXPORT TARGET
$! P4 = BEGIN TIME
$! P5 = END TIME
$! P6 = EXPORT PERIOD
$!
$!
$! Create MCC initialization file
$!
$ Open/Write mccinit mcc.init
$ Write mccinit "Define ENTITY ''P2'"
$ Write mccinit "Define DATABASE ''P3'"
$ Write mccinit "Define BTIME ''P4'"
$ Write mccinit "Define ETIME ''P5'"
$ Write mccinit "Define PTIME ''P6'"
$ Close mccinit
$!
$! Copy the template file to a set filename
$!
$ Copy/nolog 'P1 template.mcc
$!
$! Define MCC init file
$!
$ Define/User MCC_INIT mcc.init
$!
$! Execute command template
$!
$ mcc do template.mcc
$!
$! Cleanup & Exit
$!
$ Delete/nolog mcc.init;
$ Delete/nolog template.mcc;
$ Exit
* SAMPLE EXPORT TEMPLATE *
!
! Contents of EXPORT template file ( EXPORT.TEMPLATE )
!
export translan ENTITY export target DATABASE -
begin time = BTIME, -
end time = ETIME, -
export period = PTIME
Then to export data you simply have to invoke the EXECUTE command
procedure passing it the necessary information.
|