1

I have tables called; quotes, trades and sym saved as splayed tables in a directory called splay in my q directory. I cannot figure out how to load these tables using the methods identified on the code.kx.com website. When I check the file properties, it says file type is File, so I do not know what type of file to open after the filename. Once I have managed to load these files, I need to select all records that contain the symbol IBM (in the column sym of the tables). I have tried so far:

q)\cd splay
q)\l quotes
'quotes. OS reports: The system cannot find the file specified.
  [0]  (.Q.l)
q)\l trades
'trades. OS reports: The system cannot find the file specified.
  [0]  (.Q.l)

 .Q )\l trades.q
'trades.q. OS reports: The system cannot find the file specified.
  [2]  (<load>)

  ))\l trades.dat
'trades.dat. OS reports: The system cannot find the file specified.
  [4]  (.Q.l)

to no avail. the same approach but for the directory itself.

q)\l splay

I have tried to just run the files without loading by being in the directory but this has also not been successful.

q)\cd splay
q)\cd
"C:\\Users\\Lewis\\splay"
q)t:get`:trades
'trades. OS reports: The system cannot find the file specified.
  [0]  t:get`:trades
         ^
q)q:get `:quotes
'quotes. OS reports: The system cannot find the file specified.
  [0]  q:get `:quotes
         ^
q)load`quotes
'quotes. OS reports: The system cannot find the file specified.
  [0]  load`quotes
       ^

One of the ways the code.kx.com website says to do this, and one of my first approaches:

C:\Users\Lewis\q>q/q.exe splay
KDB+ 3.5 2017.10.11 Copyright (C) 1993-2017 Kx Systems
w32/ 4()core . . .  

Welcome to kdb+ 32bit edition
For support please see http://groups.google.com/d/forum/personal-kdbplus
Tutorials can be found at http://code.kx.com/q
To exit, type \\
To remove this startup msg, edit q.q
'/q.exe. OS reports: The system cannot find the file specified.
  [0]  (.Q.l)

 .Q )

and the final approach I have had to load these files or directory is:

q)))load `splay
'splay. OS reports: Access is denied.
  [6]  load `splay
       ^
q))))\cd splay
q))))load `splay
'splay. OS reports: Access is denied.
  [9]  load `splay
       ^

Please, help me!

Thomas Smyth - Treliant
  • 4,993
  • 6
  • 25
  • 36
L. Mackem
  • 41
  • 4

1 Answers1

1

If you are in the directory /Users/Lewis you should be able to pass the splay as a command line parameter, like this: q splay. There may be an issue with the path you are using to your q application q\q.exe which is causing an error to flag up.

Alternatively you should be able to open it from inside an active q session like: \l splay provided you are in the directory /Users/Lewis OR like \l . if you are in the directory /Users/Lewis/splay, where . is a shortcut for the current directory.

Additionally you stated that you have the tables trade, quote and sym. It all depends how you saved the data to disk but the sym file should not be a table like the other two, which you should see when you load the data in.

The error OS reports: Access is denied. is probably due to the q process not having appropriate permissions to access the file. If you start the process with admin privileges you should be able to get around this error.

Thomas Smyth - Treliant
  • 4,993
  • 6
  • 25
  • 36