Hallo at all,
at this time I'm working with "glueing" a lot of textfiles together to a big one and I've use the TCC-%@FILE-Functions OPEN/READ/CLOSE) with a little bit recordselection.
1) Open Target
2) Loop:Open Source
3) Read line from source
4) skip if condition or write line to target
6) close source
7) open next source til loop end
8) close target
Now I've tested it with ARRAY-Variables, - that means read the source first into an Array and than write it to the target - and I've get a big performance improvement !
The next improvement was the useage of SETARRAY /R filespec, varname so I have not to determine the dimensions of the array.
The question is: Is there a Function or a method like GETARRAY[] which will do the opposite function of SETARRAY /R and write the complete array into a file ?
Now I must do it with
Set Firstrec=%@IF[%@INDEX[%arDatenliste[0],TICKER] EQ -1,0,1]
Set LastRecord=%@EVAL[%@ARRAYINFO[arDatenliste,1]-1]
For /L %zz in (%firstrec%,1,%LastRecord) Do Echo %@FILEWRITE[%fhzieldatei,%arDatenliste[%zz]]
I think, that the FOR-Loop is not the fastest ....
Mit freundlichsten Grüßen
Peter Murschall
at this time I'm working with "glueing" a lot of textfiles together to a big one and I've use the TCC-%@FILE-Functions OPEN/READ/CLOSE) with a little bit recordselection.
1) Open Target
2) Loop:Open Source
3) Read line from source
4) skip if condition or write line to target
6) close source
7) open next source til loop end
8) close target
Now I've tested it with ARRAY-Variables, - that means read the source first into an Array and than write it to the target - and I've get a big performance improvement !
The next improvement was the useage of SETARRAY /R filespec, varname so I have not to determine the dimensions of the array.
The question is: Is there a Function or a method like GETARRAY[] which will do the opposite function of SETARRAY /R and write the complete array into a file ?
Now I must do it with
Set Firstrec=%@IF[%@INDEX[%arDatenliste[0],TICKER] EQ -1,0,1]
Set LastRecord=%@EVAL[%@ARRAYINFO[arDatenliste,1]-1]
For /L %zz in (%firstrec%,1,%LastRecord) Do Echo %@FILEWRITE[%fhzieldatei,%arDatenliste[%zz]]
I think, that the FOR-Loop is not the fastest ....
Mit freundlichsten Grüßen
Peter Murschall