| « November 2009 » | ||||||
|---|---|---|---|---|---|---|
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | |||||
Recently by einsteinwallah
- 2009-04-03 Picks
- 2009-04-02 Picks (and No Its Not Working)
- 2009-04-01 Picks
- 2009-03-31 Buy Prices etc
- Picks for 2009-03-31 For My Paper Trading Account
- 2009-03-30 EOD
- 2009-03-30 Today's Buy Prices
- 30/03/2009
- Friday 2009-03-27 EOD revised
- 27/03/2009 Positions taken
- March 27, 2009, 6:06:38 AM
- 3:01 PM 26/03/2009
- 8:30 AM 26/03/2009
- 20090326
- Processing HTML Data File Using QBasic
- It is 5:16 AM 25/03/2009
If you go to http://ukmarkets.rbs.com//EN/Showpage.aspx?pageID=5 and restrict list of RBS products to Stock and change "Number of results" to 200 the webpage shows all Stock based warrants issued by RBS. When you save this list to DATA.HTM you get a file which has lines which are huge. What webpage has saved is html in which there are no "end-of-line" at one spot and processing this file to extract data for our number crunching is going to be tough if we can not read lines. At the troublsome spot QBasic runs out of memory for string space when you try to execute QBasic command: LINE INPUT on file. This is a work around to break up long lines into bite sized lines.
First you need to download olddos.exe file from microsoft website from link given below. Be aware that older MS-DOS files may not work with newer operating systems.
http://download.microsoft.com/download/win95upg/tool_s/1.0/w95/en-us/olddos. exe
Following QBasic SUB subroutine program takes DATA.HTM as input file and creates another file called LEXICAL.TXT. In this second file an "end-of-line" is inserted after each > character.
SUB Lexical
DIM InChar AS STRING
DataFile = FREEFILE
OPEN "DATA.HTM" FOR BINARY ACCESS READ WRITE AS #DataFile
LexicalFile = FREEFILE
OPEN "LEXICAL.TXT" FOR OUTPUT AS #LexicalFile
FileLength = LOF(DataFile)
InChar = " "
FOR i = 1 TO FileLength
GET #DataFile, i, InChar
PRINT #LexicalFile, InChar;
IF InChar = ">" THEN PRINT #LexicalFile,
NEXT i
CLOSE #DataFile, #LexicalFile
END SUB
add to my favorite ilogs
flag objectionable content
einsteinwallah
- Interacts: 373
- iLogs: 57
- Gallery: 3
- Page views: 10763
- Last visitor: guest
- Member since: Sep 16 2002
- Last signin: Nov 20 2009
- Send a message
- Add as friend
- Add to ignore list
- Add to block list


