This page was created by the IDL library routine
mk_html_help. For more information on
this routine, refer to the IDL Online Help Navigator
or type:
? mk_html_help
at the IDL command line prompt.
Last modified: Wed Mar 31 06:40:11 1999.
NAME: db_insert
PURPOSE: writes SQL statements to insert a record
into a dbms table
CATEGORY: DBMS
CALLING SEQUENCE: db_insert,a
INPUTS: a = a dbms table structure where the first
element of the structure is the data base
name, the second element is the table name
and other structure elements are the
column names of the table.
OPTIONAL INPUT PARAMETERS: None
KEYWORD PARAMETERS: None
OUTPUTS: None
OPTIONAL OUTPUT PARAMETERS: None
COMMON BLOCKS: dbms,ludb
ludb = unit number of the file to write to
SIDE EFFECTS:
RESTRICTIONS:
PROCEDURE:
MODIFICATION HISTORY: RAHoward NRL 10/27/95
V2 RAH 02/05/96 Corrected handling of first/last elements of array
V3 RAH 02/06/96 Corrections for sybase debugging
AEE 02/08/96 use writetext for browse_img
NBR 03/11/99 Handle NULL value
SCCS variables for IDL use
@(#)%w%h NRL Solar Physics
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/db_insert.pro)
Project : SOHO - LASCO/EIT
Name : DEF2C_FILL
Purpose : To convert DB table definition ASCII format to C routine.
Explanation : This routine reads in an ASCII Database table definition file
and generates a C routine which produces SQL to do inserts.
Use : IDL> DEF2C_FILL, input_file_name
Inputs : input_file_name ;file containing DB table definitions
;TABLE_NAME, TABLE_DESC, TABLE_DEFN
Outputs : None.
Calls : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR
Common : None.
Restrictions: Must have write permission for the current directory.
Side effects: Creates two files in the current directory named:
input_file_name_fill.c
(the extension is dropped from the input file name)
Category : Database Administration
Prev. Hist. : None.
Written : Dennis Wang, NRL, November 1995.
Modified :
Version :
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2c_fill.pro)
Project : SOHO - LASCO/EIT
Name : DEF2C_FORMAT
Purpose : To convert DB table definition ASCII format to C format routine.
Explanation : This routine reads in an ASCII Database table definition file
and creates a C routine that returns format strings
for the tables
Use : IDL> DEF2C_FORMAT, input_file_name
Inputs : input_file_name ;file containing DB table definitions
;TABLE_NAME, TABLE_DESC, TABLE_DEFN, etc...
Outputs : None.
Calls : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR
Common : None.
Restrictions: Must have write permission for the current directory.
Side effects: Creates a file in the current directory named:
input_file_name_format.c
Category : Database Administration
Prev. Hist. : None.
Written : Dennis Wang, NRL, November 2 1995.
Modified :
Version :
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2c_format.pro)
Project : SOHO - LASCO/EIT
Name : DEF2C_INSERT
Purpose : To convert DB table definition ASCII format to C routine.
Explanation : This routine reads in an ASCII Database table definition file
and generates a C routine which produces SQL to do inserts.
Use : IDL> DEF2C_INSERT, input_file_name
Inputs : input_file_name ;file containing DB table definitions
;TABLE_NAME, TABLE_DESC, TABLE_DEFN, etc...
Outputs : None.
Calls : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR
Common : None.
Restrictions: Must have write permission for the current directory.
Side effects: Creates two files in the current directory named:
input_file_name__ins.c
(the extension is dropped from the input file name)
Category : Database Administration
Prev. Hist. : None.
Written : Dennis Wang, NRL, November 1995.
Modified :
Version :
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2c_insert.pro)
Project : SOHO - LASCO/EIT
Name : DEF2STRUCT
Purpose : To convert DB table definition ASCII format to C and IDL include files.
Explanation : This routine reads in an ASCII Database table definition file
and creates two output files. One containing C structure
defintions for the tables and the other containing IDL structure
definitions.
Use : IDL> DEF2STRUCT, input_file_name, database_name
Inputs : input_file_name ;file containing DB table definitions
;TABLE_NAME, TABLE_DESC, TABLE_DEFN, etc...
database_name ;specify the database name that the tables are in
;this becomes the first element of each struct
Outputs : None.
Calls : STR_SEP2, STR2ARR, ARR2STR, BREAK_FILE, SPEC_DIR
Common : None.
Restrictions: Must have write permission for the current directory.
Side effects: Creates two files in the current directory named:
input_file_name_struct.inc ;IDL include file
input_file_name_struct.h ;C include file
(the extension is dropped from the input file name)
Category : Database Administration
Prev. Hist. : None.
Written : Scott Paswaters, NRL, October 1995.
Modified :
Version :
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/def2struct.pro)
Project : SOHO - LASCO/EIT
Name : GET_DB_STRUCT
Purpose : To retrieve a structure appropriate for a given database and table.
Explanation : This routine searches through all structures of database table
definitions and returns the one matching the input parameters.
Use : IDL> s = GET_DB_STRUCT('db_name', 'table_name')
ex. IDL> img_hdr = GET_DB_STRUCT('lasco', 'img_leb_hdr')
Inputs : db_name ;** Name of Sybase database containing table.
tab_name ;** Name of DB table you wish to get the struct of.
Outputs : A structure containing tags of the appropriate type for all fields
in the table or -1 if none found.
Calls : INIT_DB_STRUCT, DATATYPE
Common : COMMON DB_STRUCT_COMMON, all_db_struct ;* Defined in INIT_DB_STRUCT
Restrictions: None.
Side effects: None.
Category : Database Administration
Prev. Hist. : None.
Written : Scott Paswaters, NRL, November 1995.
Modified :
Version :
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/get_db_struct.pro)
Project : SOHO - LASCO/EIT
Name : INIT_DB_STRUCT
Purpose : To initialize DB table structures from include files.
Explanation : This routine initializes DB table structures from all include
files and creates a master structure containing them all.
Use : IDL> INIT_DB_STRUCT
Inputs : None.
Outputs : None.
Calls : GETHELP
Common : COMMON DB_STRUCT_COMMON, all_db_struct
Restrictions: None.
Side effects: None.
Category : Database Administration
Prev. Hist. : None.
Written : Scott Paswaters, NRL, November 1995.
Modified : 13 Jun 1996 SEP Moved include files to ./include subdirectory
Version : 1.01
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/init_db_struct.pro)
fixed for year 2000 - 2020 AD
@(#)reformat_date.pro 1.2 01/21/99 : NRL IDL Library
+
NAME:
reformat_date
PURPOSE:
change dates like m/d/yy to mm/dd/yyyy format.
CATEGORY:
Time Utility
CALLING SEQUENCE:
RESULT = reformat_date ( date )
INPUTS:
date: string with date in m/d/yy format
OPTIONAL INPUTS:
KEYWORD PARAMETERS:
OUTPUTS:
returns string in mm/dd/yyyy format
OPTIONAL OUTPUTS:
COMMON BLOCKS:
SIDE EFFECTS:
RESTRICTIONS:
For years 1951 - 2050 only
PROCEDURE:
EXAMPLE:
datestring='12/1/99'
result = reformat_date(datestring)
Produces datestring equal to '12/1/1999'
MODIFICATION HISTORY:
Written by: Ed Esfandiari - April 1997
21 Jan 99 - Y2k Fix for years 2000-2050 - DW
@(#)reformat_date.pro 1.2 01/21/99 LASCO IDL LIBRARY
(See /net/cronus/opt/local/idl_nrl_lib/lasco/database/reformat_date.pro)