Subject: Database extension enhancements
Name: Nick Crookston
Date: 09/01/2004
Variants affected: All

Description:

1. The database extension was enhanced to allow for processing 6 char
species codes (NRCS Plant Symbols). Now, FVS will process the traditional
species codes, 3-char FIA species codes, and the 6 char NRCS codes).

2. A new column, called CN, was added to the FVS_Cases table. CN (control
number) is used in FSVeg as a primary key in the database. CN uniquely
relates the stand and tree information. Using CN, an FVS user will be able
to relate an FVS run to the inventory data that was used to create it. CN
is a character string that is 34 chars long. FVS left justifies this data.

3. CN is now a defined part of the FVS_StandInit table. When it is present
in the database, the value of CN from the database is used to initialize
the value of CN in FVS.

4. CN can now be used in SQL preprocessing. For example, in addition to
%StandID% and other automatic variables, you can use %CN% in any SQL
statement in the database extension. The current value of CN will be inserted
in the SQL statement prior to processing.

5. A new keyword, "CN", was added that can be used to set the value of CN.

6. CN is supported with the PPE.

7. Some error messages generated by the database extension were improved.

Impact on users: User's will need to start fresh output databases because
of the addition of the CN in the FVS_Cases table. Otherwise there are no
impacts.

Files:
common/PLOT.F77 -- added DBCN variable

common/KEYCOM.F77 -- added CN keyword
base/src/keywds.f -- added CN keyword
base/src/initre.f -- added CN keyword

base/src/intree.f -- changed species processing to hold 6 chars

dbs/src/DBSCOM.F77 -- removed unused variable
dbs/src/dbscase.f -- added support for CN
dbs/src/dbscmpu.f -- modified error msg
dbs/src/dbscuts.f -- improved error msg
dbs/src/dbsexecsql.f -- improved error msg
dbs/src/dbsfmpf.f -- improved error msg
dbs/src/dbsfuels.f -- improved error msg
dbs/src/dbsgetid.f -- improved error msg
dbs/src/dbsin.f -- improved error msg
dbs/src/dbsmis.f -- improved error msg
dbs/src/dbsdiags.f -- improved error msg format, set the
                      FVS return code when there is a DBS error.
dbs/src/dbsprssql.f -- added support for CN replacement and improved NULL
                       fields for MgmtID
dbs/src/dbsstandin.f -- improved error msg, added CN, and slightly modified
                        how char(0) in strings is processe
dbs/src/dbstreesin.f -- improved error msg, added prcessing 6 char species
                        codes, and slightly modified how char(0) in strings
                        is processed.
dbs/src/dbstrls.f -- improved error msg

cr/src/grinit.f -- initialize DBCN to blank
cs/src/grinit.f -- initialize DBCN to blank
ak/src/grinit.f -- initialize DBCN to blank
bm/src/grinit.f -- initialize DBCN to blank
ca/src/grinit.f -- initialize DBCN to blank
ci/src/grinit.f -- initialize DBCN to blank
ec/src/grinit.f -- initialize DBCN to blank
em/src/grinit.f -- initialize DBCN to blank
ie/src/grinit.f -- initialize DBCN to blank
kt/src/grinit.f -- initialize DBCN to blank
ls/src/grinit.f -- initialize DBCN to blank
nc/src/grinit.f -- initialize DBCN to blank
ne/src/grinit.f -- initialize DBCN to blank
ni/src/grinit.f -- initialize DBCN to blank
pn/src/grinit.f -- initialize DBCN to blank
se/src/grinit.f -- initialize DBCN to blank
sn/src/grinit.f -- initialize DBCN to blank
so/src/grinit.f -- initialize DBCN to blank
tt/src/grinit.f -- initialize DBCN to blank
ut/src/grinit.f -- initialize DBCN to blank
wc/src/grinit.f -- initialize DBCN to blank
ws/src/grinit.f -- initialize DBCN to blank

ppbase/src/chget.f -- put/get variable DBCN
ppbase/src/chput.f -- put/get variable DBCN

