Mike,
Like Jim Cobane, I like to use Keyed Lists for NetConfig Arguments.
However you could just put the list in the NetConfig Arguments as you suggest.
Another way to do something like this is to build a lookup table with each valid location on one side and something like Y on the other side with a default of N.
Inside your proc do a table lookup using the field from the message you would compare to the list and check to see if the value returned is a ‘Y’. If it is then it is a valid location.
The benefits associated with this method are:
No need to update the NetConfig to modify the list (and perhaps mess up the curly braces).
A simple purge caches will refresh the table into memory effectively changing the list without stopping any threads or processes.
You can leave old locations in place and simply make their right side an ‘N’ or the date deactivated so that they can indicate once valid locations but not be valid now.
If you have multiple place the list needs to be referenced (multiple threads in one site or multiple sites) the table is referencable by all.
The drawbacks are it is not obvious this table is in use unless one looks at the code (unless the table name is an argument in the NetConfig – this is a usable option and doesn not obviate the benefits) and the table has to be moved when migrating from devl/test to production.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 61 years IT – old fart.