Björn,

The mapped database sounds interesting. I'm using J6.2.

I think I would first like to get a mapped array of all my log files.
I can get an array of all the logs, with each one boxed, in this way

zipth =: '"c:\Gzip\gzip.exe -d -c "'
NB. This is the path to the zip/unzip utility.

mainpth =: 'c:\testasr\log.gz'
NB. This is the path to the log files.

]/; ww =: ([: shell zipth&,) each {."1  dirtree mainpth
NB. This gets all the log files, and puts them in a boxed array ww

The boxed array is really big, as it takes several minutes to run the shell
command.

  $ww
9248

So there are 9248 boxes in ww, each holding the text of one log file.

   $ ; ww
|out of memory      NB. ww is big
|   $    ;ww

   $ > 0 } ww
3605
   $ > 1 } ww
2216
   $ > 2 } ww
3605
   $ > 3 } ww
2176

I would like to make ww a mapped array.

  JCHAR map_jmf_ (;ww); 'c:\testasr\ww.txt'
|out of memory
|   JCHAR map_jmf_(    ;ww);'c:\testasr\ww.txt'

No luck. I probably need to map ww in the first place. How would I do that?

Skip


2011/11/27 Björn Helgason <[email protected]>

> You may want to look at the mapped file database lab.
>
> It has a very advanced database demo doing similar things.
>
> If you use the J7 lab you need to put in this fix
>
> NB. open '~system\extras\labs\system\mappeddb.ijs'
> NB. load '~system\extras\labs\system\mappeddb.ijs'
>  open '~addons\labs\labs\system\mappeddb.ijs'
>  load '~addons\labs\labs\system\mappeddb.ijs'
>
> You can do it when arriving at that step and then go on
>
> The verb jcreate is also missing in J7 but for now you can just step past
> it
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to