DBEDIT
Name
DBEDIT
Purpose
Interactively edit specified fields in an IDL database.
Explanation
The value of each field is displayed, and the user has the option
of changing or keeping the value. Widgets will be used if they
are available.
Calling Sequence
dbedit, list, [ items ]
Inputs
list - scalar or vector of database entry numbers. Set list = 0 to
interactively add a new entry to a database. Set list = -1 to edit
all entries.
Optional Inputs
items - list of items to be edited. If omitted, all fields can be
edited.
Keywords
BYTENUM = If set, treat byte variables as numbers instead of
characters.
Common Blocks
DB_COM -- contains information about the opened database.
DBW_C -- contains information intrinsic to this program.
Side Effects
Will update the database files.
RESTRICTIIONS:
Database must be opened for update prior to running
this program. User must be running DBEDIT from an
account that has write privileges to the databases.
If one is editing an indexed item, then after all edits are complete,
DBINDEX will be called to reindex the entire item. This may
be time consuming.
Cannot be used to edit items with multiple values
Example
Suppose one had new parallaxes for all stars fainter than 5th magnitude
in the Yale Bright Star Catalog and wanted to update the PRLAX and
PRLAX_CODE fields with these new numbers
IDL> !priv=2
IDL> dbopen, 'yale_bs', 1 ;Open catalog for update
IDL> list = dbfind( 'v>5') ;Find fainter than 5th magnitude
IDL> dbedit, list, 'prlax, prlax_code' ;Manual entry of new values
Procedure
(1) Use the cursor and point to the value you want to edit.
(2) Type the new field value over the old field value.
(3) When you are done changing all of the field values for each entry
save the entry to the databases by pressing 'SAVE ENTRY TO DATABASES'.
Here all of the values will be checked to see if they are the correct
data type. If a field value is not of the correct data type, it will
not be saved.
Use the buttons "PREV ENTRY" and "NEXT ENTRY" to move between entry
numbers. You must save each entry before going on to another entry in
order for your changes to be saved.
Pressing "RESET THIS ENTRY" will remove any unsaved changes to the
current entry.
Revision History
Adapted from Landsman's DBEDIT
added widgets, Melissa Marsh, HSTX, August 1993
do not need to press return after entering each entry,
fixed layout problem on SUN,
Melissa Marsh, HSTX, January 1994
Only updates the fields which are changed. Joel Offenberg, HSTX, Mar 94
Corrected test for changed fields Wayne Landsman HSTX, Mar 94
Removed a couple of redundant statements W. Landsman HSTX Jan 96
Converted to IDL V5.0 W. Landsman September 1997
Replace DATAYPE() with size(/TNAME) W. Landsman November 2001
Work for entry numbers > 32767 W. Landsman December 2001
Added /BYTENUM William Thompson 13-Mar-2006
Use DIALOG_MESSAGE for error messages W. Landsman April 2006
Assume since V5.5, remove VMS support W. Landsman Sep 2006