Each external routine uses an argument list to pass information to the database function and to receive results, if the function returns a value. Each GT.M database function requires a specific call format. The external routine language statement invoking the GT.M database function must conform to the call format. The call format indicates the order of arguments for the function and which arguments are required.
Each GT.M database function requires a specific call format, to which the external routine language statement invoking the GT.M database function must conform. The call format indicates the structure of arguments for the function and which arguments are required. The format for each of the functions is provided in a set of tables in the section "Call Formats". Each external routine uses an argument to pass information to the database function and, if the function returns a value, an argument to receive results.
The following sections describe the format of the call arguments.
Call Formats for Database Functions with Keys |
||||
Type |
Function |
Required Args |
Optional Args |
Multiple Keys |
Read |
GTM$DATA |
mode,dest.,key1 |
[,key2[,...]] |
|
GTM$GET |
mode,dest.,key1 |
[,key2[,...]] |
||
GTM$ORDER |
mode,dest.,direc.,key1 |
[,key2[,...]] |
||
GTM$PREVIOUS |
mode,dest.,key1 |
[,key2[,...]] |
||
GTM$QUERY |
mode,dest.,key1 |
[,key2[,...]] |
||
GTM$WITHDRAW |
mode,key1 |
[,key2[,...]] |
||
Write |
GTM$KILL |
mode,key1,(none) |
[,key2[,...]] |
|
GTM$PUT |
mode,source,key1 |
[,key2[,...]] |
||
GTM$WITHDRAW |
mode,key1 |
[,key2[,...]] |
||
Lock |
GTM$DECLOCK |
mode,keya1 |
[,keya2[,...] [0,mode,keyb1[,...]] |
Yes |
GTM$INCLOCK |
timeout,mode,keya1 |
[,keya2[,...] [0,mode,keyb1[,...]] |
Yes |
|
GTM$LOCK |
timeout,mode,keya1 |
[,keya2[,...] [0,mode,keyb1[,...]] |
Yes |
|
GTM$ZALLOC |
timeout,mode,keya1 |
[,keya2[,...] [0,mode,keyb1[,...]] |
Yes |
|
GTM$ZDEALLOC |
mode,keya1,(none) |
[,keya2[,...] [0,mode,keyb1[,...]] |
Yes |
|
Misc. |
GTM$INIT |
(none) |
||
GTM$INTERRUPT |
out-of-band |
|||
GTM$RUNDOWN |
(none) |
|||
GTM$SETGBLDIR |
file |
|||
GTM$XECUTE |
command |
|||
GTM$ZSTATUS |
dest |
|||
GTM$ZTCOMMIT |
close-count |
|||
GTM$ZTSTART |
(none) |