I agree, that an argumentless-For is confusing in the given code. Therefore we prefer the following construction:
s Sub1="" f s Sub1=$o(^Trans(Sub1)) q:Sub1="" d
.w !,Sub1
The advantages:
- One line less
- There is only one $o
- Initialization, iteration code and break condition are in one line what helps with readability.
Thank you for your replies in response to my post. Unfortunately using the %Installer is not really an option: although our scenario has a running Cache-Instance, the customer don’t want to access the Cache-Server.
I fear the only way at this point is to provide a sort of Windows-Client to put this code into the database. A think about a .NET client, using classes of the Intersystem.* namespaces but I am just missing the right idea. On the other hand, there could be a solution based on Cache-direct.
Do you have any idea for a .NET or do you know anything better than Cache-direct.
Thanks Pete,
this is exactly what we need in our project.
Cheers
mark