What do 1@ and 2@ do?

q)x:"3B"q)e:(-1#x)[0]q)e"B"q)0@e'B [0] 0@e ^q)1@eB1q)2@eB2q)3@e'Cannot write to handle 3. OS reports: Invalid argument [0] 3@e ^

is 1@e calling binary save? http://code.kx.com/wiki/Reference/OneColon

is 2@e calling dynamic load? http://code.kx.com/wiki/Reference/TwoColon

There were no B1 or B2 files written… what happened?

1 pints a msg to stdout, 2 to stderr. 1 and 2 after B is the return value printed by q) cmd line.

???, 21 ??? 2017 ?., 10:29:21 UTC+3 ??? ag ???:

q)x:"3B"q)e:(-1#x)[0]q)e"B"q)0@e'B [0] 0@e ^q)1@eB1q)2@eB2q)3@e'Cannot write to handle 3. OS reports: Invalid argument [0] 3@e ^

is 1@e calling binary save? http://code.kx.com/wiki/Reference/OneColon

is 2@e calling dynamic load? http://code.kx.com/wiki/Reference/TwoColon

There were no B1 or B2 files written… what happened?

1 is the file-handle for stdout, 2 is the file-handle for stderr. @ is applying the functions 1 and 2 using the argument you provided, e. See here for more info: http://code.kx.com/wiki/Reference/AtSymbol 
“A monadic function g with argument d can be evaluated by g@d or g . enlist d.”


So you are simply printing the value of the variable e to stdout and stderr. 3@e fails because you don’t have an file open with fd=3.