Options for Argument 1

Call Formats for GT.M Database Functions with Keys A

Function

Arg1

Arg2

OTHER

MODE

KEY

MULT KEYS

ALLOWED

gtm_data

X

key11[,key12

[,...]]

dest.

gtm_declock

X

key11[,key12

[,...]]

X

gtm_get

X

key11[,key12

[,...]]

dest.

gtm_inclock

timeout

X

key11[,key12

[,...]]

X

gtm_kill

X

key11[,key12

[,...]]

gtm_lock*

timeout

X

key11[,key12

[,...]]

X

gtm_order

direc.

X

key11[,key12

[,...]]

dest.

gtm_previous

X

key11[,key12

[,...]]

dest.

gtm_put

source

X

key11[,key12

[,...]]

gtm_query

X

key11[,key12

[,...]]

dest.

gtm_withdraw

X

key11[,key12

[,...]]

gtm_zalloc

timeout

X

key11[,key12

[,...]]

X

gtm_zdealloc

X

key11[,key12

[,...]]

X

*If the only argument is DESC_ZERO, which is the terminator, it is equivalent to an argumentless lock.

The first argument is an array where the array is gtm_descriptor. Each element of the array contains a descriptor. The last element of the array must be type 0 and length 0. gtm_descriptor is described in the "include file," gtm_descript.h provided by GT.M. The content of this file follows:

	int mumps_call();
	typedef struct {
	shortlen;shorttype;void* val;}gtm_descriptor;
	/* legal types */
	#defineDSC_K_DTYPE_T1#defineGTM_ARRAY_OF_CHARSDSC_K_DTYPE_T
	#defineDSC_K_DTYPE_D2#defineGTM_DOUBLEDSC_K_DTYPE_D	
	#defineDSC_K_DTYPE_B3#defineGTM_CHARDSC_K_DTYPE_B
	#defineDSC_K_DTYPE_BU4#defineGTM_UNSIGNED_CHARDSC_K_DTYPE_BU
	#defineDSC_K_DTYPE_W5#defineGTM_SHORTDSC_K_DTYPE_W
	#defineDSC_K_DTYPE_WU6#defineGTM_UNSIGNED_SHORTDSC_K_DTYPE_WU
	#defineDSC_K_DTYPE_L7#defineGTM_LONGDSC_K_DTYPE_L
	#defineDSC_K_DTYPE_LU8#defineGTM_UNSIGNED_LONGDSC_K_DTYPE_LU
	#defineDSC_K_DTYPE_F9#defineGTM_FLOATDSC_K_DTYPE_F
	#defineGTM_MODE10#defineGTM_DELIMITER10
	#defineDESCRIPTOR(x,y){x.type = GTM_ARRAY_OF_CHARS;x.len = sizeof(y) - 1; x.val = y;}#define DESC_MODE(x,y) {x.type=GTM_MODE;  x.len=sizeof(y); x.val=(void*)&y;}#define DESC_CHAR(x,y) {x.type=GTM_ARRAY_OF_CHARS;  x.len=sizeof(y)-1; x.val=y;}#define DESC_ZERO(x) {x.type=0; x.len=0;}#define DESC_LONG(x,y) {x.type=GTM_LONG;  x.len=sizeof(y); x.val=&y;}#define DESC_DELIM(x,y) {x.type=GTM_DELIMITER; x.len=sizeof(y);x.val=(void *)&y;}
	

Because the GT.M database routines provide considerable flexibility in formatting the database request, the calling routine must specify how GT.M should represent and interpret data. To do this, the calling routine specifies a subset of data types and parameter-passing mechanisms permitted by the VMS calling standard. The following sections describe the data type, access method (read-only or write-only), and implementation mechanism for each argument type outlined in the above table.