>  Docs Center  >  Libraries  >  ASTROLIB  >  DBEDIT_BASIC






      Subroutine of DBEDIT_BASIC to edit a database on a dumb terminal.


      Interactively edit specified fields in a database. The
      value of each field is displayed, and the user has the option
      of changing or keeping the value.

Calling Sequence

      dbedit_basic, list, [ items ]


      list - scalar or vector of database entry numbers. Set LIST=0
              to interactively add a new entry to a database.

Optional Inputs

      items - list of items to be edited. If not supplied, then the
              value of every field will be displayed.


      (1) Database must be opened for update (dbopen,<dbname>,1) before
      calling DBEDIT_BASIC. User must have write privileges on the database
      (2) User gets a second chance to look at edited values, before
      they are actually written to the database


      The item values for each entry to be edited are first displayed
      User is the asked "EDIT VALUES IN THIS ENTRY (Y(es), N(o), or Q(uit))?
      If user answers 'Y' or hits RETURN, then each item is displayed
      with its current value, which the user can update. If user answered
      'N' then DBEDIT_BASIC skips to the next entry. If user answers 'Q'
      then DBEDIT will exit, saving all previous changes.


      Suppose V magnitudes (V_MAG) in a database STARS with unknown values
      were assigned a value of 99.9. Once the true values become known, the
      database can be edited
      IDL> !PRIV=2 & dbopen,'STARS',1 ;Open database for update
      IDL> list = dbfind('V_MAG=99.9') ;Get list of bad V_MAG values
      IDL> dbedit,list,'V_MAG' ;Interactively insert good V_MAG values

Revision History

      Written W. Landsman STX April, 1989
      Rename DBEDIT_BASIC from DBEDIT July, 1993
      Converted to IDL V5.0 W. Landsman September 1997
      Change DATATYPE() to size(/TNAME) W. Landsman November 2001

© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us