How To: Load ASCII data into INFO
Instructions provided describe how to load ASCII data into INFO. There are several ways to load ASCII data into INFO, depending on the format of the ASCII file.
- ADD FROM in INFO The ADD FROM command in INFO loads comma-delimited ASCII data into the currently selected INFO file. The width limit for each record is 200 characters (including commas). If the ASCII file has a delimiter other than a comma, use the DELIMITER command in INFO to change the delimiter to something else.
- ADD FROM in TABLES The ADD FROM command in TABLES works the same way as the ADD FROM in INFO, except that character data containing imbedded blanks must be surrounded by single or double quotes. Date items must also be enclosed in single or double quotes. This is because TABLES interprets blanks as delimiters (so the ASCII file can be either comma-delimited or blank delimited). The width limit for each record is 1000 characters.
- GET in INFO The GET command in INFO loads the fixed format system file into the currently selected INFO file. If the file is an ASCII file, use the ASCII option:
ENTER COMMAND> GET MYFILE COPY ASCII.
If the ASCII option is left off when using GET with an ASCII file, the data will be skewed in INFO. This is because the carriage returns at the end of each line take up a byte, thus offsetting the values by one column for each record.
- GET in TABLES The GET command in TABLES reads records from a binary disk file into the currently selected file.
This option should only be used with files created by the TABLES SAVE command.
- IMPORT in INFO The IMPORT command in INFO copies the contents of an operating system file into the currently selected data file. Two options are available: ASCII and SDF.
For the ASCII option, the ASCII file should be formatted with each item value on a separate line. A blank line should be inserted between records.
For the SDF option, the ASCII file should be comma-delimited, with character data surrounded by double quotes.
- Note that INFO and TABLES need different pathnames to access a text file residing in the ARC/INFO workspace. INFO assumes the text file resides in the INFO directory, not its parent ARC/INFO workspace. TABLES assumes the text file resides in the ARC/INFO workspace. In INFO, use a relative pathname to move the text file records into the INFO file PLANS.DAT. The ".." tells the operating system to look one level up from the current INFO directory. For example:
ENTER COMMAND > SELECT PLANS.DAT
ENTER COMMAND > ADD FROM ../PLANS.TXT.
In TABLES, use just the name of the text file.
If the text file is not stored in the ARC/INFO workspace, use a full pathname or an appropriate relative pathname. No uppercase letters can be included in the text file operating system file name, relative pathname or full pathname because both TABLES and INFO convert pathnames to lower case before passing them to the operating system.
- See the INFO command references for ADD, GET, and IMPORT, and the TABLES command references for ADD and GET for more information.