I'm opening a data file and reading it "old school" - and it's plenty fast.
OPEN dpath$+dfile$ FOR INPUT AS #1
i=0: irecs&=0:irecoff&=0
WHILE ISFALSE EOF(1)
Line Input #1, a$
GoSub parser1
WEND
...
However... it's seems like I read somewhere that the whole file could be read at once.
(If so, what's a good technique for parsing the data?)
Though they are rather large, they look like this...
(and thanks for any ideas)
File:$SPX.txt
"Date","Time","Open","High","Low","Close","Volume","Open Interest"
06/11/2009,1600,949.65,949.98,943.75,944.89,0,-999999
06/12/2009,1030,943.44,943.44,935.66,939.03,0,-999999
06/12/2009,1130,938.76,943.24,938.46,940.33,0,-999999
06/12/2009,1230,940.3,941.06,938.98,939.99,0,-999999
06/12/2009,1330,940.0,941.42,938.88,940.41,0,-999999
06/12/2009,1430,940.42,942.15,940.01,940.53,0,-999999
06/12/2009,1530,940.93,946.3,940.93,945.33,0,-999999
06/12/2009,1600,945.77,946.21,941.58,946.21,0,-999999
06/15/2009,1030,942.45,942.45,927.9,929.51,0,-999999
06/15/2009,1130,929.25,929.25,921.31,922.03,0,-999999
06/15/2009,1230,922.11,924.34,921.2,921.39,0,-999999
06/15/2009,1330,921.38,923.7,920.84,921.02,0,-999999
06/15/2009,1430,920.97,923.28,919.65,922.97,0,-999999
06/15/2009,1530,922.72,923.46,919.77,922.67,0,-999999
06/15/2009,1600,922.91,925.28,922.47,923.72,0,-999999
06/16/2009,1030,925.6,927.98,923.64,925.32,0,-999999
06/16/2009,1130,925.13,928.0,924.59,925.85,0,-999999
06/16/2009,1230,925.84,925.99,921.33,922.16,0,-999999
06/16/2009,1330,922.1,922.1,913.26,914.95,0,-999999
06/16/2009,1430,915.02,916.3,911.8,912.65,0,-999999
06/16/2009,1530,912.13,916.89,911.6,915.11,0,-999999
06/16/2009,1600,915.31,917.88,911.74,911.97,0,-999999
06/17/2009,1030,911.89,913.35,907.02,908.18,0,-999999
06/17/2009,1130,908.06,911.11,903.78,910.2,0,-999999
06/17/2009,1230,909.96,915.49,908.37,914.15,0,-999999
06/17/2009,1330,914.15,914.53,911.54,914.53,0,-999999
06/17/2009,1430,914.73,918.34,914.23,918.34,0,-999999
06/17/2009,1530,918.44,918.44,911.41,911.41,0,-999999
06/17/2009,1600,911.16,913.63,909.64,910.71,0,-999999
OPEN dpath$+dfile$ FOR INPUT AS #1
i=0: irecs&=0:irecoff&=0
WHILE ISFALSE EOF(1)
Line Input #1, a$
GoSub parser1
WEND
...
However... it's seems like I read somewhere that the whole file could be read at once.
(If so, what's a good technique for parsing the data?)
Though they are rather large, they look like this...
(and thanks for any ideas)
File:$SPX.txt
"Date","Time","Open","High","Low","Close","Volume","Open Interest"
06/11/2009,1600,949.65,949.98,943.75,944.89,0,-999999
06/12/2009,1030,943.44,943.44,935.66,939.03,0,-999999
06/12/2009,1130,938.76,943.24,938.46,940.33,0,-999999
06/12/2009,1230,940.3,941.06,938.98,939.99,0,-999999
06/12/2009,1330,940.0,941.42,938.88,940.41,0,-999999
06/12/2009,1430,940.42,942.15,940.01,940.53,0,-999999
06/12/2009,1530,940.93,946.3,940.93,945.33,0,-999999
06/12/2009,1600,945.77,946.21,941.58,946.21,0,-999999
06/15/2009,1030,942.45,942.45,927.9,929.51,0,-999999
06/15/2009,1130,929.25,929.25,921.31,922.03,0,-999999
06/15/2009,1230,922.11,924.34,921.2,921.39,0,-999999
06/15/2009,1330,921.38,923.7,920.84,921.02,0,-999999
06/15/2009,1430,920.97,923.28,919.65,922.97,0,-999999
06/15/2009,1530,922.72,923.46,919.77,922.67,0,-999999
06/15/2009,1600,922.91,925.28,922.47,923.72,0,-999999
06/16/2009,1030,925.6,927.98,923.64,925.32,0,-999999
06/16/2009,1130,925.13,928.0,924.59,925.85,0,-999999
06/16/2009,1230,925.84,925.99,921.33,922.16,0,-999999
06/16/2009,1330,922.1,922.1,913.26,914.95,0,-999999
06/16/2009,1430,915.02,916.3,911.8,912.65,0,-999999
06/16/2009,1530,912.13,916.89,911.6,915.11,0,-999999
06/16/2009,1600,915.31,917.88,911.74,911.97,0,-999999
06/17/2009,1030,911.89,913.35,907.02,908.18,0,-999999
06/17/2009,1130,908.06,911.11,903.78,910.2,0,-999999
06/17/2009,1230,909.96,915.49,908.37,914.15,0,-999999
06/17/2009,1330,914.15,914.53,911.54,914.53,0,-999999
06/17/2009,1430,914.73,918.34,914.23,918.34,0,-999999
06/17/2009,1530,918.44,918.44,911.41,911.41,0,-999999
06/17/2009,1600,911.16,913.63,909.64,910.71,0,-999999
Comment