====== System Editor Exec Line (Functions/Subroutines/Programs) ====== ====== ====== ==== Created at 17 JUN 1998 04:27PM ==== **This note describes some of the most useful System Edictor Exec Line function (and why)** ** ** There are several functions and subroutines that can be executed form the System Editor Exec line. Often it is very useful to use this functionality to troubleshoot problems, since these are the very functions called by OpenInsight s toolset.    The following is a list and description of some of the more useful functions and why. Most of them have to do with things that might be done in the Database Manager.  To see a complete list, look at the Online help, under Programmer s Reference Manual, Chapter 3: Basic Command Reference. CommandLine functions and subroutines (those that can be executed from the Exec line) are marked with either a square or a C.   |**FUNCTION OR SUBROUTINE**|**DESCRIPTION** |**AS RUN FROM EXEC LINE** | |**Attach Table** |used for attaching volumes or tables |//attaches the volume  c:\moredata  and all its tables://\\ \\ RUN Attach_Table  c:\moredata    \\ \\  \\ \\ //attaches a specific table://\\ \\ RUN Attach_Table  c:\moredata ,  TABLE1 \\ \\  \\ \\ //attaches//// the REVMEDIA table. VERY useful for seeing what the system thinks are the contents of a data volume.  DO NOT modify the REVMEDIA table unless you really know what you re doing://\\ \\ RUN Attach_Table  c:\moredata ,  REVMEDIA | |**Detach_Volume****** |detaches a volume |RUN Detach_Volume  c:\data_volume  | |**Detach_Table****** |detaches a table |RUN Detach_Table  TBL_NAME  | |**Define_Database****** |rewrites the DBT file so that all attached/detached tables are permanently attached/detached|RUN Define_Database  APPNAME ,  1  | |**List_Index****** |lists all indexes |RUN List_Index | |**Copy_Table****** |copies one table at a time to any application, table name or volume |//minimum paramters (no locking, overwrite, etc)://\\ \\ RUN Copy_Table  SRC_TBL_NAME ,  c:\dest_datavol ,  DESTAPP ,  NEW_TBL_NAME  | |**Copy_Row****** |copies one or more rows from one table to another table, or to the same table |//to copy one row (minimum parameters   no overwrite, etc)://\\ \\ RUN Copy_Row  SRC_TBL ,  SRC_KEYVAL ,  DEST_TBL ,  DEST_KEYVAL \\ \\  \\ \\ //to copy all rows (minimum parameters)://\\ \\ RUN Copy_Row  SRC_TBL ,  * ,  DEST_TBL ,    | |**Clear_Table****** |empties the contents of a data file |RUN Clear_Table  TBL_NAME  | |**Delete_Table****** |** ** |RUN Delete_Table  TBL_NAME  | |**Delete_Row****** |deletes one or more rows from a table |//to delete one row (no locking)://\\ \\ RUN Delete_Row  TBL_NAME ,  KEYVAL \\ \\  \\ \\ //to delete 2 rows (with locking)://\\ \\ RUN Delete_Row  TBL_NAME ,  KEY1 :@FM: KEY2 , 1\\ \\  \\ \\ //to delete all rows (no locking)://\\ \\ RUN Delete_Row  TBL_NAME ,  *  | |**Delete_Index****** |** ** |//to delete all indexes from all columns://\\ \\ RUN Delete_Index  TBL_NAME \\ \\  \\ \\ //to delete a BTREE index from specified column://\\ \\ RUN Delete_Index  TBL_NAME ,  COL_NAME ,  1  | |**List_Tables** |lists all attached tables in the current application |RUN List_Tables | |**List_Volumes****** |lists all attached volumes in the current application |RUN List_Volumes | |**List_Volume****** |lists all tables in the specified volume |//to see tables in a specific volume://\\ \\ RUN List_Volume  c:\moredata \\ \\  \\ \\ //to see all tables attached, along with volumes they are located in://\\ \\ RUN List_Volume | |**Verify_LH****** |check for GFEs |//to verify all tables in a volume (minimum parameters)://\\ \\ RUN Verify_LH  c:\data_volume \\ \\  \\ \\ //to verify a specific table://\\ \\ RUN Verify_LH  c:\data_volume ,  TABLE  | |**Fix_LH****** |to correct GFE s in attached data files (see help file for other uses of this function) |RUN Fix_LH  TBL_NAME ,   2  | |**Rlist****** |to query tables; especially useful for debugging Selection criteria |RUN Rlist  LIST MY_TABLE , 1 |