English

Error: DLGARC: DLG file does not exist and/or EOF encountered

Solution or Workaround

DLGARC states that the DLG file does not exist. Why does it not recognize the file?

Answer:

The file is not in the proper format after being downloaded from the USGS FTP site or restored from a tape. The optional format for DLG data has a record length of 80 bytes, while the standard format has 144 bytes per record. In order for the DLGARC command to recognize the DLG file, the file must be in the proper format.

In order to correct the format use the following commands on the original DLG file:

Determine if the file is optional or standard, optional files usually have a .opt extension if downloaded from the USGS FTP site, standard has .std. Then use the appropriate procedure.

For optional files type the following at the UNIX prompt:

fold -80 file > newfile ---> MAKE SURE newfile IS IN lower CASE
cat > cr ---
press carriage return once |
press control-d | This appends an EOF marker to the file.
cat cr >> newfile ---
arc
Arc: dlgarc optional newfile

For standard files type the following at the UNIX prompt:

fold -144 file > newfile ---> MAKE SURE newfile IS IN lower CASE
cat > cr
press carriage return once
press control-d
cat cr >> newfile
arc
Arc: dlgarc standard newfile

The fold command places the file in the correct record length, while the first cat command creates a file, CR, with a carriage return, which is then appended to the end of the new file, with the second cat command. Refer to the fold and cat UNIX commands.

Notes:

If the above methods did not work, the problem may lie in the header, which may contain corrupted data, therefore the DLGARC command does not recognize the file.

DLG files are usually GZIPPED and/or stored using tar. The uncompression of the files may have corrupted the files. Make sure that GUNZIP was used if the file had a GZ extension on the file, and that tar with the -xvf options, was used if the file was tarred.