3

Using only the Cache terminal, what utility function, or Global do I use or look in to find a list of all the Globals which exist in a Cache database?

Again usin only the Cache terminal, what utility function or Global do I use or look in to find a list of all of the nodes for these Globals as well.

This site does not use any of the advanced Cache features such as CSP, SQL, VB or object scripting.

Thanks

Intrinsic
  • 59
  • 4

2 Answers2

2

You can use

Do ^%G

to examine globals and you may also find

Do ^%GSIZE to get a quick size of the globals

Stephen Canzano
  • 296
  • 1
  • 3
  • Thank You, Is there an way to recuse through all of the globals to display the global's node structure? – Intrinsic Dec 09 '16 at 16:01
  • A couple of thoughts. 1. Typically you can use $Query or $Order to work through the nodes in a globals. 2. As for all of the globals you could utilize [%SYS.GlobalQuery][1] [1]: http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25SYS.GlobalQuery so long as you are also familiar with creating ResultSets/SQL Statements. – Stephen Canzano Dec 09 '16 at 19:55
1

As Stephen mentioned - use ^GSIZE or ^%GD to get the list of all globals in the namespace. Then ^%G or ZW ^GloablName to examine global structure.

If you are looking for a meaning behind every global node (sort of data dictionary/schema), then it depends on if and what approach was used while creating the application.

If it was build using InterSystems native Object or SQL approach - you'll find globals matching the pattern like ^TableNameD(id)=$lb("",field1,field2...) for data and ^TableNameI for indices. If so - look at you schema/table/class definition for details. Storage area is what matches field to particular node position.

However if the application was created using direct access to globals (NoSQL model if you will) then interpretation of the global structure is purely application business specific and you need to consult with that application's documentation/source code/experts. It is frequently the case for some applications originally developed while ago.

Anton
  • 3,587
  • 2
  • 12
  • 27