User's Guide

ASC2GEN

Reads an ASCII file and writes an Arc Generate acceptable format.

Function:

Reads an ASCII file containing line information and converts it into a format acceptable for the Arc Generate-line function.

Parameters:

INFILE
Input file. File containing data to be converted. Use host file name syntax. This file is generated by an export from a storage database. See User Note 1.

OUTFILE
Output file. File to receive the converted data. Use host file name syntax. This file will be used as a data file for the Arc Generate -line function.

Example:

  1. LAS> asc2gen infile=kmg outfile=kmg.gen

    The ASCII file KMG will be read and a formatted Arc Generate-line data file named KMG.GEN will be created.

Description/Algorithm

The specified ASCII file must contain data in three columns, ID, X, and Y, with N rows, depending upon the number of arcs to be generated. The Generate-line program requires the input file to have the arc ID and each of its nodal x,y locations on separate lines. Each arc in the output file must end with "END", and the end of file marked by a second "END". An example input file is of the following format:

       1  23 45
       1  24 45
       2  32 90
       2  43 87

This file will be opened and read, the output file will be written in the new format, and the files will be closed. The output file generated by the above input file is:

       1
       23 45
       24 45
       END
       2
       32 90
       43 87
       END
       END

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [asc2gen-fatal] Fatal error encounterd

    A fatal error was encountered during processing. Processing is terminated. The error message that is displayed immediately preceding this message is the specific error encountered.

    2. [asc2gen-open] Error opening <xxx> file

    An error occured while trying to open the specified file. Check file protections. If the problem persists, contact the system administrator.

User note:

  1. The input file will generally be created with a database export containing only the ID, X, and Y values. This can be done with the SPOOL command from an Oracle database table.