[Prev] [Next] [Top] [Bottom] [Contents] (7 out of 9)

Output from FILE and EXEC Data Objects

When data is returned by a FILE or EXEC Data Object, it can be in three different forms:

  1. Delimited Data
  2. Fixed Width Data
  3. Newline Delimited Data

Delimited Data

This type of data relies on three things:

  1. A row is delineated by a newline (\n) character.
  2. A column is delimited by the FileCharSep character this character can be any ascii character. Tabs should be specified by <tab> and space should be specified by <spc>. Control characters use ^character. For example, ^A.
  3. A column whose data contains the FileCharSep character, is wrapped with the FileTextSep character. FileTextSep can be any ascii character. Tabs should be specified by <tab> and space should be specified by <spc>. Control characters use ^character. For example, ^A.

Example 1:

IsDelimitted = True

FileCharSep = , (comma)

FileTextSep = " (double-quote)

Data:

	10,Beethoven,"Ludwig, V.",1795
Results:

	10
	Beethoven
	Ludwig V.
	1795

Example 2:

IsDelimitted = True

FileCharSep = , (comma)

FileTextSep = " (double-quote)

Data:

	10,Beethoven,Ludwig, V.,1795

Results:

	10
	Beethoven
	Ludwig
	V.
	1795

Fixed Width Data

Fixed Width Data means that each column in a row has a fixed number of characters in them. Each column is padded with spaces so they are all the same width. If column data is longer than the fixed width, it is truncated to the width. Each row is delineated by a newline (\n) character.

Example:

IsDelimitted = False

FileFixedWidthColumns = 15,10,2,5

ColumnNames = address,city,state,zip

	_________1_________2_________3_________4_________5
	12345678901234567890123456789012345678901234567890
	X--------------X---------X-X----
Data:

	1000 Briggs Rd.Mt.Laurel NJ08054
Results:

	1000 Briggs Rd.
	Mt. Laurel
	NJ
	08054

Newline Delimited Data

This type of data is rarely needed. To specify Newline Delimited Data, there are three considerations:

  1. That each column is delimited by a newline (\n) character.
  2. That the FileOneRow option is set to True.
  3. That the FileNumCols option has been set to the number of columns that make up a row of data.

Example:

FileOneRow = True

FileNumCols = 3

ColumnNames = fname,lname,category

Data:

	Salvador
	Dali
	Surrealist
	Paul
	Cezanne
	Impressionist
	Leonardo
	Da Vinci
	High Renaissance
Results:


[Prev] [Next] [Top] [Bottom] [Contents] (7 out of 9)