Products & Services Solutions Academia Support User Community Company

Learn more about Datafeed Toolbox   

kx.exec - Run Kx Systems, Inc. kdb+ commands

Syntax

exec(k,command)
exec(k,command,P1,P2,P3)
exec(k,command,p1)
exec(k,command,p1,p2)
exec(k,command,p1,p2,p3)
exec(k,command,p1,p2,p3,sync)

Arguments

K

Kx Systems, Inc. kdb+ connection object created with the kx function.

Command

Kx Systems, Inc. kdb+ command issued using the Kx Systems, Inc. kdb+ connection object created with the kx function.

P1,P2,P3

Input parameters for Command.

Description

exec(k,command) executes the specified command in Kx Systems, Inc. kdb+ without waiting for a response.

exec(k,command,P1,P2,P3) executes the specified command with one or more input parameters without waiting for a response.

exec(k,command,p1) executes the given command with one input parameter without waiting for a response.

exec(k,command,p1,p2) executes the given command with two input parameters without waiting for a response.

exec(k,command,p1,p2,p3) executes the given command with three input parameters without waiting for a response.

exec(k,command,p1,p2,p3,sync) executes the given command with three input parameters synchronously and waits for a response from the database. Enter unused parameters as empty. You can enter sync as 0 (default) for asynchronous commands and as 1 for synchronous commands.

Examples

Example 1

Retrieve the data in the table trade using the connection to the Kx Systems, Inc. kdb+ database, K:

K = kx('localhost',5001);

Use the exec command to sort the data in the table trade in ascending order.

exec(K,'`date xasc`trade'); 

Subsequent data requests also sort returned data in ascending order.

Example 2

After running

q tradedata.q -p 5001

at the DOS prompt, the commands

K = KX('localhost',5001);
EXEC(K,'`DATE XASC `TRADE');

sort the data in the table trade in ascending order. Data later fetched from the table will be ordered in this manner.

See Also

kx.fetch, kx.insert, kx

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS