OAfurf
Experienced Member
START with opening an htm[l] file in OA
START with opening an htm[l] file in OA
Good senior or is it Senor Cool! Start with the basics. Open any HTML file as if it's an Enable database just to have a look at what an ASCII/HTML file looks like when configured as an Enable database; but for brevity sake, one with 100-200 lines is better than a thousand lines. Use File, Open, then if you have an htm[l] file on disk, you could type *.htm~ to find it.
Enable will know it's an ASCII file and will consider each line a separate record. For our purposes we need not parse the lines into multiple fields. We'll consider each line as ONE field with length of 240 columns. So if the name of the file is xx.htm[l], the field will be xx.C1L240 in later code, e.g. when searching through the file using @match to find something. As soon as you try to open the html file Enable will ask for a field definition. Just Tab over to column 240 and enter C for character field, then optionally change the name of the field to C1L240 or accept Enable's naming defaults.
Now in DISPLAY mode look through the file to pick a word or phrase visible more than once in the file to have OA show it can find it. At the field prompt enter @MATCH(C1L240,"yourword") -- note the numbers in C1L240 can be changed to match or show different parts of the line, e.g. C16L12 will show the line segment beginning at column 16 and continuing for 12 columns. And so on. @match(c1l240,"but"){2},C1L75 would have a zero in most of the lines for the first field and would show 75 columns of the second field. If there were a "but" in the line, it would register in the @match formula. In DISPLAY mode we needn't use more than 75 columns since the field is protected from update preventing you from scrolling to the right via {F4}
Okay, this is just for starters to show how EnableOA can make a table out of an html file and how you can find embedded text via @match.
Hang in hereha:. This is just the opening of the tutorial. More in due season.... /Oafurf
START with opening an htm[l] file in OA
sure, I'm up for it, I know nothing about it so if you start with senior citizen
level I may be able to keep up!
Good senior or is it Senor Cool! Start with the basics. Open any HTML file as if it's an Enable database just to have a look at what an ASCII/HTML file looks like when configured as an Enable database; but for brevity sake, one with 100-200 lines is better than a thousand lines. Use File, Open, then if you have an htm[l] file on disk, you could type *.htm~ to find it.
Enable will know it's an ASCII file and will consider each line a separate record. For our purposes we need not parse the lines into multiple fields. We'll consider each line as ONE field with length of 240 columns. So if the name of the file is xx.htm[l], the field will be xx.C1L240 in later code, e.g. when searching through the file using @match to find something. As soon as you try to open the html file Enable will ask for a field definition. Just Tab over to column 240 and enter C for character field, then optionally change the name of the field to C1L240 or accept Enable's naming defaults.
Now in DISPLAY mode look through the file to pick a word or phrase visible more than once in the file to have OA show it can find it. At the field prompt enter @MATCH(C1L240,"yourword") -- note the numbers in C1L240 can be changed to match or show different parts of the line, e.g. C16L12 will show the line segment beginning at column 16 and continuing for 12 columns. And so on. @match(c1l240,"but"){2},C1L75 would have a zero in most of the lines for the first field and would show 75 columns of the second field. If there were a "but" in the line, it would register in the @match formula. In DISPLAY mode we needn't use more than 75 columns since the field is protected from update preventing you from scrolling to the right via {F4}
Okay, this is just for starters to show how EnableOA can make a table out of an html file and how you can find embedded text via @match.
Hang in hereha:. This is just the opening of the tutorial. More in due season.... /Oafurf