Just a thought, not sure if this will work or not...
But each variable contains 16 digits at most. So let each digit position in a variable represent a location open for business. So effectively, you can have 26 * 16 = 416 locations.
For example, let's say you have 16 locations. So you only need a single variable to represent all 16 locations. A '1' can represent the location is open and a '0' can represent the location is closed. So if a variable, say 'X' contains:
X="0101010101010101", then every odd location (15,13,11,9,7,5,3,1) is open,
or
X="0000000011111111", then the first 8 locations (8,7,6,5,4,3,2,1) are open.
(note the least significant digit in variable X represents the first location, and the most significant digit represents the sixteenth location)
To check if a location is set use the wild cards '?' and/or '+' to check if a location is open to decide where to route. Like:
"goto .. if X = +1???????" - this checks if location 8 is open,
or
"goto .. if X = ?1?1?1?1?1?1?1?1" - this checks odd location numbers.
As far as setting the variable 'X', that will take some programming effort. I don't think the "collect" step alone will work. I believe you'd need to use CM3.x release. CM3.x has the capability to "set" variables. Based on the VDN or ANI, you can set the variable 'X' digit position accordingly.
VECTOR <TURN ON BRANCH>
collect .. <Enter your location number> for none
goto vector 1 .. if digits = 1
goto vector 2 .. if digits = 2
:
goto vector 16 .. if digits = 16
stop
VECTOR <1>
01 goto step 3 if X = +0 (means position 1 is not set so set it)
02 stop (otherwise stop)
03 set X = X ADD 1 (set the least sig digit to 1 - note using the arithmetic ADD operator will work for the least significant digits 1-10, but setting the 11th(?) or higher digit may require more sophisticated string manipulations with another variable, SEL, CATR and/or CATL. I'd need to think about this a bit more, but it should be possible.)
04 stop (quit)
VECTOR <2>
01 goto step 3 if X = +0?
02 stop
03 set X = X ADD 10
04 stop
:
VECTOR <16>
01 goto step 3 if X = 0+
02 stop
03 set digits = X SEL 15 (grab the lowest 15 digits of X and store in the "digits" buffer)
04 set X = digits CATL 1 (set the 16 digit to a 1)
05 stop
(note the digit positions 15-11 will be a little more challenging to set, but again I think it's possible)
Hopefully you get the idea?
If you want even more locations, I think you can squeeze 3 more locations out of each digit in a variable by converting a decimal representation to binary representation. That is,
-a decimal 7 represents 111 in binary, or 3 locations are turned on.
-a decimal 6 represents 110 in binary, or locations 3 and 2 are turned on, but location 1 is off
:
-a decimal 0 represents 000 in binary, or 3 locations are turned off
So now a single 16 digit variable can represent 16*3=48 locations. Or you can now get 26*16*3=1248 locations total.
Here's an example, let the variable X represent 48 locations open or closed
X = 0765432101234567
The binary representation of X is
X = 000 111 110 101 100 011 010 001 000 001 010 011 100 101 110 111
The 0's would represent the closed branches, and the 1's would represent the open branches. To check if a particular branch is open will require good binary skills. For example, to check if the 23rd location is open I would use the following conditional check..
goto .. if X = +2???????
I have a feeling I went through this whole exercise for nothing, but if it doesn't help you, it may help someone else.
-y