PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: #import - Delimited Records[Next]: #import - Multi Line Records
\ -> Commands -> #import -> #import - Fixed Field Records

#import - Fixed Field Records

This type of #Import has clearly defined fields. You would frequently wish to display these in a table (say in a HTML page) however nothing says that you need to do so. If you wish to create macros and then #include a template file then that is also possible.

The fields have a fixed starting and ending column. The last record does not need to have a fixed ending column and can span to the end of the line. Leading and trailing whitespace is removed.

Field Information Parameters

On these types of imports "FieldInfo" follows the "DefineName" parameter on the #import command line.

For each field that you are interested in you need to define information in the format:


In place of the '*' you could specify the column number you wish to place the field but its usually easier to simply reorder the fields.

The "StartingColumn" specifies the column where the field starts. The optional "EndingColumn" specifies where it ends, if not supplied it ends at the end of the line. The first column in a line is column 1.

The "title text" specifies the value for the field in the header record. If this "title" is blank the field will be dropped.


If you can't understand how these options work then I suggest you try using /debug or #debug to watch what variables the import uses etc.

You should also check out an example of importing a file into multiple HTML pages based on the contents of one of the fields.


Assume we have a file as follows (IMPORTME.FIX):

First Name         Last Name           Job
Dennis             Bareis              Programmer
Wendy              Buxton              Librarian
Fred               Nerk                Idiot

We note that it has the following fields:

  1. First Name, starting in column 1 ending at 18
  2. Last Name, starting in column 20 ending at 38
  3. Job, starting in column 40 ending at end of line.

The following line would import the fields in order (into a completely default table layout):

#import IMPORTME.FIX FIX- '' "{1,1-18}First Name" "{2,20-38}Last Name" "{3,40-}Job"

email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: #import - Delimited Records[Next]: #import - Multi Line Records

My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am