# # # This script loads a set of initial values into the # database. It also serves as a test for the functions # defined in the other scripts. # # Connection # set MD(connection) [ mi_server_connect default ] mi_login $MD(connection) Prima mi_exec $MD(connection) "set schema BigSur;" # source /usr/local/devel/montage/contrib/BigSur/GCM/Tcl/source.tcl source /usr/local/devel/montage/contrib/BigSur/GCM/Tcl/Loader.tcl # set SklowerOID [ Add_Contact "Mr Keith Sklower" "Electronics Research Lab, UC Berkeley" "Staff Programmer" \ 0 "\[\]" "" "" "" "510-642-9587" "510-642-5153" "sklower@cs.Berkeley.EDU" "" ] # set UCBOID [ Add_Citation "Electronics Research Lab, UC Berkeley" "" "Random data for test pruposes" \ "1" "binary" "" "" "Berkeley, CA" "University of California, Berkeley" "" ""] # # Create the Test Process . . . # set TESTOID [ Add_Process "Keith_Test_01" 1 $SklowerOID "" "" ] set TEST_P1_OID [ Add_Parameter $TESTOID 1 "Initial Condition 1" "integer" "" ] set TEST_P2_OID [ Add_Parameter $TESTOID 2 "Initial Condition 2" "integer" "" ] set TEST_P3_OID [ Add_Parameter $TESTOID 3 "Condition to Halt" "integer" "" ] # # # Now, I have the Citation, Contact, Grid/Axis, and Variable/Compound *and* a running Process. # # Now add the Data_Set which is at the top level for the UCLA stuff, and a # tester. For this, I need to run an instance of the Process which adds top # level data too. # set SklowerOID [ Add_Contact "Mr Keith Sklower" "Electronics Research Lab, UC Berkeley" \ "Staff Programmer" 0 "\[\]" "" "" "" "510-642-9587" "510-642-5153" \ "sklower@cs.Berkeley.EDU" "" ] # set PGBOID [ Add_Contact "Mr Paul Brown" "Electronics Research Lab, UC Berkeley" "Staff Programmer" \ 2 "\[ UC Berkeley, Soda Hall \[Mail Drop 1776\], Room 380 \]" "Berkeley" "CA" "94703" \ "510-642-7379" "310-642-5153" "pbrown@postgres.Berkeley.EDU" "" ] # set AddDataSetOID [ Add_Process "Add Data Set" 1 $PGBOID "" "" ] set AddDataSet1OID [ Add_Parameter $AddDataSetOID 1 "Lengthy File Name" "file_name" "" ] # set UCBOID [ Add_Citation "Electronics Research Lab, UC Berkeley" "" "Random data for test pruposes" \ "1" "binary" "" "" "Berkeley, CA" "University of California, Berkeley" "" ""] # set Qry " INSERT INTO Identification_Information ( Data_Set_Id, Citation, Beginning, Status_Progress, Status_Update_Frequency, Spatial_Domain, Access_Constraints, Use_Constraints, Contact_Information, Data_Set_Credit, Security_Code, Native_Data_Set_Environment, Process, Process_Contact, Process_Date) SELECT 'UCLA_GCM', ref(C), '1991-01-01 00:00:00'::timestamp, 'TOP_LEVEL', '', '(-180,-90,180,90)'::Box::Poly, 'PUBLIC', 'PERMISSION_REQUEST', ref(Ct), 'The Atmospheric Modelling Team at UCLA', 'READ_ONLY', 'Data generated from a GCM run on a CRAY SP-1', ref(P), ref(Ct2), current_date FROM Citation C, Contact_Information Ct, Process P, Contact_Information Ct2 WHERE Ct.oid = '$SklowerOID'::oid AND C.oid = '$UCBOID'::oid AND P.oid = '$AddDataSetOID'::oid AND Ct2.oid = '$PGBOID'::oid;" mi_exec $MD(connection) $Qry set IIOID [ mi_result_object_id $MD(connection) ] ## ## Tcl_Starts_Loader -logfile /dev/tty -datain 7000 -visin 7005 ## Tcl_Starts_Loader -datain 7000 -visin 7005 ## puts "Bleagh! " source RealLoad.tcl # source ~sklower/Loader.newer/xx # source /tmp/suspect.tcl