Loading .dat files

Hi,

Anyone knows how I can load a .dat file?

I have some BATS data in a file called test.dat but am unable to load it.

I have been following tips from http://code.kx.com/wiki/JB:QforMortals2/i\_o

q)get `:test.dat

'test.dat

read0 works a bit:

q)read0 `:test.dat

“\230\000”

"\001\001\000\000\000\006 \3677\000\000\006\227HC*\035\006 \0208\000\000\0221..

"\001\013\000\000\000\0221H\317\022+AAT     T0  \0221\3508u-AAU     T0  \0221..

"\001\025\000\000\000\0221\330\210\357\004ABEV    T0  \0221`\366Q\007ABG     ..

"\001\037\000\000\000\0221\370\327\307\034ACC     T0  \0221\300d*\037ACCO    ..

"\001)\000\000\000\0221\340e\2364ACRE    T0  \0221@\260\0007ACT     T0  \0221..

"\0013\000\000\000\0221\350\240w\016ADGE    T0  \0221\250\333\331\020ADK     ..

What do you think the problem might be?

Thanks for your help!

Is the .dat file in fixed width format? If so, have a look at http://code.kx.com/wiki/Reference/OneColon

Thanks,

Connor