Desktop Agent

The desktop agent reads and writes plain text files. Binary files are supported with hex escape codes such as [09][0A]. http:// and ftp:// protocols are supported.


Figure Desktop-1: Data Link properties.

When File/Open Data, File/Write Data or File/Reload commands are chosen, Data Link properties are used to determine how data is exchanged. If properties are not yet assigned, the file is scanned in an attempt to determine defaults.

File Name can be a local filename, or a url such as

http://tycho.usno.navy.mil/cgi-bin/timer.pl
ftp://username:password@upload.kablecast.net

Http:// is read only.

Binary Support

Checking [x] Binary in the Data Link dialog enables bracketed hexadecimal codes. Brackets and Ascii control sequences are entered as square bracketed ('[]') hex codes. For example:

[5B] [
[5D] ]
[20] Space
[09] Tab
[0D][0A] Carrige return plus linefeed
[2028] Line Separator (UTF16)
[2029] Paragraph Separator (UTF16)
[000A] Linefeed (UTF16)
[0000000A] Linefeed (UTF32)

16 bit sequences have four hex digits, 32 bit sequences have eight.

Unicode

Unicode support is enabled by checking [x] Unicode in the Data Link dialog. Little endian, and 32 bit is supported. Checking [x] Byte Order Mark enables the Bom prefix.

The Desktop agent will use the Bom prefix to select the default unicode format.

When both [x] Binary and [x] Unicode are chosen, four (4) or (8) hex codes will appear in brackets, representing 2 or 4 bytes respectively. When entered into the Grid manually, 1, 2 or 4 byte sequences may be intermixed. The unicode setting affects the length of binary values when reading, but is not a requirement for writing..

End of Line

When reading text files, the end of line character determines when the next row starts. If the End of Line checkbox is turned off, a fixed number of bytes is read for each grid row. [ ] 32 - Fixed Width (32 characters) is the default, but the 32 can be changed, to a 64 for example. In [ ] 32 the [ ] is a placeholder for an Eol character that would be ignored. Length follows the first space. Anything after that is considered a comment and ignored.

In most cases where the End of Line checkbox is off, [x] Binary would be checked on.

Columns

If [ ] Fields is checked off, the column with the data name Text will be read or written with File/Write Data or File/Reload.

If [x] Fields is checked, Delimited, Aligned, of Tagged fields are supported. Delimited fields will use a reserved character, such as comma, tab or space to separate columns in the text file. Aligned fields are fixed width in the text file, and will require that each column provide a length (figure Desktop-1). Tagged fields write out the column name with each record.

When writing with File/Write Data , column widths (Delimiters: in figure Desktop-1) are always taken from column size (Size: in figure 3-4). When initializing the grid from an aligned file, column widths (Delimiters: in figure Desktop-1) are scanned, although it is not always possible to discover the column breaks. Manual entry of the column widths may be required.

Line Control and Offset control (described below) are not compatible with multiple Fields. Column names are not restricted when using fields. Line and Offset control requires columns to be assigned reserved data names (Text, Line and Offset). It is ok to use those names in non-control situations.

Line Control

When using line control, File/Write Data will write the Text data column to the indicated value in the Line column. There is no requirement that all lines exist in the grid, nor that they are in order.

File/Reload/Reload Update is special in that only existing line values will be imported. This is especially useful to monitor specific lines, such as line number when monitoring a web page.

A line number is zero or blank when written will append to the bottom of the file when using the File/Write Data command.

When creating a new grid using File/Open with Properties, the Line Number column will be created and populated automatically. If you wish to add Line Number control to an existing grid, Add a data column and with a data name of Line, and assign an ordinal of <None> to the new Line column. Control columns are always data columns, but since they do not represent actual data, an ordinal of <None> is expected to be assigned.

Offset Control

When using Offset control, File/Write Data will write the values in Text column starting at the the indicated offset.

A blank offset will cause the Text column to be appended to the bottom of the file when using the File/Write Data command.

The File/Open Data command when selecting a Binary (*.bin) file would present a likely situation to activate Offset control.


SQL Offline © 2014 Interscape Corporation