More info.
You can use a table or code it into an array. You would store the field starting column and the length for each field in the "extract file layout". For example the first field is skipped (unused). So the first entry would be 2 for the column, 2 for the length. Then 4 for the column, 9 for the length.... then the code would be something like:
Code:
DO UNTIL EOF
Read a line from the text file into a variable
For i = 1 to 18 ' there are 4 unused fields
'read the starting column and length into variables.
'use the MID() function to get the sub-string from the input string
'update the table
Next
LOOP
After looking at the layout, why does the Key, Block, Block-N all start at column 4? Hmmmmm....Very strange.....
So you can see that it is fairly simple. Make sure to add error checking.