Just wondering if anyone has any thoughts.
Happy Thanksgiving! :-)
I believe there is a problem with the $q() function when globals are mapped in the global directory at the subscript level. Here's why.for all nodes in ^WEB except for ^WEB(3309,*) and ^WEB(3315,*). For these two, DB-B needed to have its own local copy, which resulted in the following [partial] global directory layout for DB-B.
I have two databases, which I'll call database A (DB-A) and database B (DB-B). They each contain a set of VistA FileMan files stored in a global named ^WEB, and the structure of these files is the same in both databases. We needed DB-B to look to DB-A
WEB WEB(3309) REG = DBA
SEG = DBA
FILE = /yottadb/dba/mumps.dat
WEB(3309) WEB(3309)++ REG = DEFAULT
SEG = DEFAULT
FILE = /yottadb/dbb/mumps.dat
WEB(3309)++ WEB(3315) REG = DBA
SEG = DBA
FILE = /yottadb/dba/mumps.dat
WEB(3315) WEB(3315)++ REG = DEFAULT
SEG = DEFAULT
FILE = /yottadb/dbb/mumps.dat
WEB(3315)++ WEBERROR REG = DBA
SEG = DBA
FILE = /yottadb/dba/mumps.dat
Here is a partial listing of ^WEB(3315,*) from DB-A:
DB-A>zwrite ^WEB(3315,*)
^WEB(3315,0)="Web System Profile^3315^19^18"
...snip...
^WEB(3315,"IP","pdd17.mycompany.edu",15)="" ^WEB(3315,"IP","wam.mycompany.edu",19)=""
Here is a partial listing of ^WEB(3315,*) in DB-B:
DB-B>zwrite ^WEB(3315,*)
^WEB(3315,0)="Web System Profile^3315^1^1"
...snip...
^WEB(3315,"IP","wam.mycompany.edu",1)=""
Using $q() on this final node in DB-B should return null (or a node in ^WEB that has a first subscript that is greater than 3315). Instead, it is returning the next node in ^WEB(3315,*) from DB-A.
DB-B>w $q(^WEB(3315,"IP","wam.mycompany.edu",1)) ^WEB(3315,"IP","wam.mycompany.edu",19)
But that node does not exist in DB-B.
DB-B>w ^WEB(3315,"IP","wam.mycompany.edu",19)
%GTM-E-GVUNDEF, Global variable undefined: ^WEB(3315,"IP","wam.mycompany.edu",19)
Put another way, I would never expect the following line of MUMPS code to fail under any circumstance, yet as you'll see, it does.
DB-B>s g=$na(^WEB(3315)) f s g=$q(@g) q:g="" s x=@g
%GTM-E-GVUNDEF, Global variable undefined: ^WEB(3315,"IP","wam.mycompany.edu",19)
On Monday, November 14, 2022 at 2:19:09 PM UTC-5, aonei...@gmail.com wrote:A for all nodes in ^WEB except for ^WEB(3309,*) and ^WEB(3315,*). For these two, DB-B needed to have its own local copy, which resulted in the following [partial] global directory layout for DB-B.
I believe there is a problem with the $q() function when globals are mapped in the global directory at the subscript level. Here's why.
I have two databases, which I'll call database A (DB-A) and database B (DB-B). They each contain a set of VistA FileMan files stored in a global named ^WEB, and the structure of these files is the same in both databases. We needed DB-B to look to DB-
or if you want to explore free support, then post a standalone test case as Sam suggested.WEB WEB(3309) REG = DBA
SEG = DBA
FILE = /yottadb/dba/mumps.dat
WEB(3309) WEB(3309)++ REG = DEFAULT
SEG = DEFAULT
FILE = /yottadb/dbb/mumps.dat
WEB(3309)++ WEB(3315) REG = DBA
SEG = DBA
FILE = /yottadb/dba/mumps.dat
WEB(3315) WEB(3315)++ REG = DEFAULT
SEG = DEFAULT
FILE = /yottadb/dbb/mumps.dat
WEB(3315)++ WEBERROR REG = DBA
SEG = DBA
FILE = /yottadb/dba/mumps.dat
Here is a partial listing of ^WEB(3315,*) from DB-A:
DB-A>zwrite ^WEB(3315,*)
^WEB(3315,0)="Web System Profile^3315^19^18"
...snip...
^WEB(3315,"IP","pdd17.mycompany.edu",15)="" ^WEB(3315,"IP","wam.mycompany.edu",19)=""
Here is a partial listing of ^WEB(3315,*) in DB-B:
DB-B>zwrite ^WEB(3315,*)
^WEB(3315,0)="Web System Profile^3315^1^1"
...snip...
^WEB(3315,"IP","wam.mycompany.edu",1)=""
Using $q() on this final node in DB-B should return null (or a node in ^WEB that has a first subscript that is greater than 3315). Instead, it is returning the next node in ^WEB(3315,*) from DB-A.
DB-B>w $q(^WEB(3315,"IP","wam.mycompany.edu",1)) ^WEB(3315,"IP","wam.mycompany.edu",19)
But that node does not exist in DB-B.
DB-B>w ^WEB(3315,"IP","wam.mycompany.edu",19)
%GTM-E-GVUNDEF, Global variable undefined: ^WEB(3315,"IP","wam.mycompany.edu",19)
Put another way, I would never expect the following line of MUMPS code to fail under any circumstance, yet as you'll see, it does.
DB-B>s g=$na(^WEB(3315)) f s g=$q(@g) q:g="" s x=@gYou are using some advanced functionality in YottaDB, and likely using it in production. Contact your YottaDB support channel, if you have purchased support. If you have not purchased support, contact me (bhaskar at yottadb dot com) to purchase support,
%GTM-E-GVUNDEF, Global variable undefined: ^WEB(3315,"IP","wam.mycompany.edu",19)
Regards
– Bhaskar
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (3 / 13) |
Uptime: | 21:42:59 |
Calls: | 9,725 |
Calls today: | 15 |
Files: | 13,741 |
Messages: | 6,182,239 |