Link to USGS home
Surface Water Information--Data Scripts

Decode DD

Name:
Decode DD - A utility to take the dd_id shown in Ingres error messages and display the agency code, station, DD, and parm code for that DD.

Information:

There are many places in ADAPS where an error message refers to a dd_id. However, the number shown for the dd_id is not intelligible to the user. This utility will take a dd_id as an argument and provide the agency code, station, and DD that the error refers to.

The dd_id that is shown in these error messages is an internal database field (a surrogate key) that is used to cleanly tie the database together. In plain English, this "dd_id" number is what the database uses to link together the Agency Code, Station Number, and DD into something it can use to keep track of the data and other items associated with a DD.. The number itself is meaningless, but through a database query such as the one in this script, a user can convert it back into the original components (Agency, Station, DD number).

Script Language:
sh

Requirements:
The user must be in the nwis_select access group (see your DBA).

Original Author(s): Jim Cornwall, NWIS

Note the original author is noted on this page for the purposes of giving credit only. Please address questions/comments to OSW (GS-W OSW Scripts@usgs.gov).

Known Problems/Limitations/Need Improvements:

  1. Currently hard coded to database 01. You can modify the query in the script to access other databases

Scripts:

Version 1.1: (posted 7/17/07)
Updated for NWIS 4.7 (not compatible with NWIS 4.6)
Decode DD download (Zip file = 1.0K)

Back to Scripts
[an error occurred while processing this directive]