Command: GET

Purpose: Returns the value of a persistent array record on the GT.M or Caché system, if it exists.


Argument No Description
1 The array node whose value is to be returned. This takes the format:
You may specify no subscripts at all, in which case the top-level node is accessed,eg:
Getting a value at the first level of subscripting would look like:
Getting a value at the second level of subscripting would look like:

Note that subscripts can be numeric or text. Text subscripts must be wrapped in double quote (") characters. Quoting of numeric subscripts is optional.


Two-line response

If the specified array node exists and has a data value:

Server Line 1: $[no of bytes in next record]
Server Line 2: Data


Client: GET test1["a","b"]
Server: $5
Server: Hello
Client: GET test1
Server: $22
Server: This is the top level!

If the specified node does not exist:

Client: GET test1["xxx"]
Server: $-1

If the specified node holds a null value (""):

Client: GET test1["yyy"]
Server: $0

For those familiar with the native language of GT.M and Caché systems, the first two examples above are the equivalent of:

write ^test1("a","b")
write ^test1