| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I'm working in Cache and I want to know if there is a way to interrogate and store a list of globals in an array which can later be $O'd through? For instance, all globals beginning with a certain letter? Is there a function that will walk me through any globals that may exist starting with a specificed letter? Thanks, Dan Eaton |
|
#2
| |||
| |||
| rodd@panix.com (Rod Dorman) wrote in message > SET X="" > FOR SET X=$O(^$GLOBAL(X)) QUIT:X="" WRITE X,! > > Adjust starting and ending conditions as desired. I just tried this. It seems to get stuck: NDOC>S X="IZ" F S X=$O(^$GLOBAL) Q X="")!($E(X)="K") W !,X^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL ^%qCacheObjectCDL [crtl c] Am I missing something or will this not work in Cache? |
|
#3
| |||
| |||
| small typo: NDOC>S X="IZ" F S X=$O(^$GLOBAL) Q X="")!($E(X)="K") W !,Xshould be: NDOC>S X="IZ" F S X=$O(^$GLOBAL(X)) Q X="")!($E(X)="K") W !,XJeff "D.K.Eaton" <daniel_eaton@hotmail.com> wrote in message news:90228dee.0307180459.618fa795@posting.google.c om... > rodd@panix.com (Rod Dorman) wrote in message > > SET X="" > > FOR SET X=$O(^$GLOBAL(X)) QUIT:X="" WRITE X,! > > > > Adjust starting and ending conditions as desired. > > I just tried this. It seems to get stuck: > > NDOC>S X="IZ" F S X=$O(^$GLOBAL) Q X="")!($E(X)="K") W !,X> > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > ^%qCacheObjectCDL > [crtl c] > > Am I missing something or will this not work in Cache? |
|
#4
| |||
| |||
| hi, it does work in GTM GTM>s g="^%" GTM>f s g=$o(@g) Q:g="" w g,! -- borisse Posted via http://dbforums.com |
|
#5
| |||
| |||
| In article <90228dee.0307180459.618fa795@posting.google.com >, D.K.Eaton <daniel_eaton@hotmail.com> wrote: >rodd@panix.com (Rod Dorman) wrote in message >> SET X="" >> FOR SET X=$O(^$GLOBAL(X)) QUIT:X="" WRITE X,! >> >> Adjust starting and ending conditions as desired. > >I just tried this. It seems to get stuck: > >NDOC>S X="IZ" F S X=$O(^$GLOBAL) Q X="")!($E(X)="K") W !,X> >^%qCacheObjectCDL > ... >^%qCacheObjectCDL >[crtl c] > >Am I missing something or will this not work in Cache? You're missing the fact that the returned global name includes "^". -- -- Rod -- rodd(at)polylogics(dot)com |
|
#6
| |||
| |||
| D.K.Eaton wrote: > rodd@panix.com (Rod Dorman) wrote in message > >> SET X="" >> FOR SET X=$O(^$GLOBAL(X)) QUIT:X="" WRITE X,! >> >>Adjust starting and ending conditions as desired. > > > I just tried this. It seems to get stuck: > > NDOC>S X="IZ" F S X=$O(^$GLOBAL) Q X="")!($E(X)="K") W !,X> I think it should have been: S X="IZ" F S X=$O(^$GLOBAL(X)) Q X="")!($E(X)="K") W !,X---------------------------^^^ Hope this helps, Ed |
|
#7
| |||
| |||
| > More significantly, where's the subscript to ^$GLOBAL in the $ORDER in > Daniel's code? I guess he's running in that ugly mode that treats > undefined variables as null, so instead of getting an <UNDEFINED> from > $O(^$GLOBAL) he gets the same as $O(^$GLOBAL("")) > > John Murray > George James Software Oh heavens no. You're confusing undefined variables with missing subscripts! Charlie Volkstorf |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.