Navigation bar
  Start Previous page  29 of 97  Next page End Home  

29
If the data item being stored does not consist of a sufficient number of characters
to utilize all of the area allotted for the length of a given packet, the leftover area
is “padded” or filled with null characters, typically empty spaces.  An empty space
may look like nothing is there, but there is indeed a mathematical value that the
computer associates with an empty space, thereby satisfying the requirement for
all packets being of a fixed length.  
Using dashes to represent blank spaces, if we were to look at the result of this
process, the previous example would appear something like this:
P U B L I C - - - - - - - - - - - - - - - - - 
J O H N - Q - - - - - - - - - - - - - - - - -
1 2 3 - - - - - - - - - - - - - - - - - - - - - - 
M A I N - S T - - - - - - - - - - - - - - - - 
A N Y T O W N - - -  - - - - - - - - - - - 
P A - - - - - - - - - - - - - - - - - - - - - - - 
1 2 3 4 5 – 6 7 8 9 -  - - - - - - - - - - - 
Some obvious disadvantages to this scheme are that the computer wastes a lot
of storage capacity recording empty spaces, and should you be operating over a
network, it wastes valuable processing time transmitting them.  Fixed – length
files are primarily employed when you are unsure of a safe delimiting character,
or if you already know that all of the available options for a delimiting character
are present somewhere within the block of data that you have need to export.
Although the cost of high-capacity storage devices is constantly decreasing,
there is a more efficient way to use the existing data storage capacity, and that is
to employ a “DELIMITED FILE” scheme.  With this method, each individual packet
of data is separated from the next by a predetermined character, such as a
comma, resulting in a much more compact file for a given amount of data. If we
were to look at the result of this process, the previous example exported in a
comma-delimited format would look something like this:
PUBLIC,JOHN Q,123,MAIN ST,ANYTOWN,PA,12345-6789
The choice of character to use as a “delimiter” must be carefully considered, and
although the most commonly employed character is the comma, some programs
allow you to define the delimiting character as anything you would like it to be. 
Obviously, the data contained within the individual packets MUST NOT contain
any instances of the delimiting character.  
While the problem that this creates would not necessarily be noticed during the
export process itself, should any attempt be made to subsequently import the
exported data into another program for manipulation, the computer will
Previous page Top Next page