Link to USGS home
Surface Water Information--Data Scripts

Prlist

Name:
prlist - Admin utility to list all the processors associated with a specified DD and all the other DDs involved in those processors.

Information:

Many times when working with ADAPS, a user needs to know what DDs are linked together by processors. Because a given input DD can now be associated with several different processors, this is sometimes difficult to figure out. An example of this is when you get an error from setstatus saying that you have an un-approved rating. Because the rating could be on any input or output DD associated via a processor with the DD you were using in setstatus, you will need to review all the processors at the given station to find the linkages. If your DD is used for slope computations, you may also need to look at processors at other stations.

This script is a simple database query to help you find these processor linkages and report the DDs associated with them.

Usage: prlist [-a agency_cd] [-z db_no] -n site_no -d dd_nu

if agency code (agency_cd) is missing will default to USGS
if database number (db_no) is missing will default to db01

Here is the output for a DD that was involved in 2 processors. From it, you can see that DD1 is used in stage-only and an index-velocity computation (OUTPUT DDs 1 and 2).

The fields in the output are as follows:

procstation/procdd: the site and DD that has the given processor
station/dd_nu/parm: the site, DD, and parameter code associated with the rest of the line (for output DDs this will always be a repeat of procstation/procdd because the processor is always stored on the output DD. But for input DDs it will be a different DD, and in the case of slope stations can be a different station as well.)
type: the processor type
inout: whether the DD is used as input or output to the processor shown
start_dt/end_dt the starting and ending dates of the processor shown
s_* A listing of stored stat codes for that DD

nwisvatest1{walker}40: ./prlist -n 01055220 -d1
procstation           procdd  station                dd_nu  parm   type  inout  start_dt              end_dt                s_00003  s_
--------------------  ------  --------------------  ------  -----  ----  -----  --------------------  --------------------  -------  -------
USGS 01055220              1  USGS 01055220              1  00065  STGO  I      1800-01-02 04:00:00   2382-12-31 05:00:01   00003           
USGS 01055220              1  USGS 01055220              1  00065  STGO  O      1800-01-02 04:00:00   2382-12-31 05:00:01   00003           
USGS 01055220              2  USGS 01055220              1  00065  VELQ  I      2000-10-01 04:00:00   2003-10-01 04:59:59                   
USGS 01055220              2  USGS 01055220              3  00055  VELQ  I      2000-10-01 04:00:00   2003-10-01 04:59:59                   
USGS 01055220              2  USGS 01055220              2  00060  VELQ  O      2000-10-01 04:00:00   2003-10-01 04:59:59   00003
 

Script Language:
ksh, accessing the database through tsql statements

Original Author(s): Scott Bartholoma, 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:

Installation:
This script is part of the OSW Scripts Installation package and should be installed as part of that package. Users needing the script outside of the package should send email to GS-W OSW Scripts@usgs.gov.

NWIS 5.00 OSW Scripts package installation instructions:
http://water.usgs.gov/usgs/osw/adaps/OSW_scripts_pkg.5.00.html

Latest Version Release Notes:

Version 5.00: Included as part of OSW Scripts package for NWIS 5.00+
—updated for NWIS 5.00+ releases (not compatible with NWIS 4.11 or prior)

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