Subject: doc on howto make it

From: Barbara Mihalas <[email-masked]>
Date: Sun, 31 Mar 1996 18:24:42 -0500

To populate an Oracle database table with all fields and records from the 
Filemaker Pro database

1.  Dump all records from filemaker pro sorted by sccs number, with all fields.
    Use tab-separated export.
    Fetch the recordexport to kayak directory:
    /export/project/kyk28/webdb/rdbms/oracle/kayak/httpd/httpd/sccsnew1

2.  Do export in merge mode with all fields in same order as 1.   Dump no
    records or select only a small number.  Only the comma-separated field
    list will be used by the perl script that processes.
    Fetch the fieldexport to kayak directory:
    /export/project/kyk28/webdb/rdbms/oracle/kayak/httpd/httpd/sccsnew1

3.  Go to directory 
    /export/project/kyk28/webdb/rdbms/oracle/kayak/httpd/httpd/sccsnew1
    on kayak.

4.  Edit sccsparams.dat.   
    SCCSFIELDS:    must be followed by the filename of the fieldexport.
    SCCSDAT:       must be followed by the filename of the recordexport.

    Give the output files new names if desired.  
    These follow  DBTABLES:    NEWDAT:        and CTLFILE:

    Change the delimiters only if different export options are chosen.

5.  Run fnmerge.pl    best to redirect debug output to debug file.
    (eg   fnmerge.pl > fn.debug )  
    If necessary, rename database table (currently sccsq).  This can be done
    by editing this name in fnmerge.pl or by editing the sccstbl.sql file
    after running fnmerge.pl.
    (I'll probably change sccsparams.dat to include the name of the output
     database file, too.  be simpler)
    fnmerge.pl creates scripts and control files, sql to make the database
    table and a file of processed data ready to load into the table.

    Then type
    run1a

    to run all the scripts fnmerge.pl writes that will create the database 
    table and load the processed data into the table.

6.  Or, after database name is OK, just type
    run1

    This  will run fnmerge.pl and then run all the scripts that fnmerge.pl
    produces to create and load the processed data into the database table.

To locate and get the pathnames for all the online sccs documents and abstracts:
TeX version, Postscript version, HTML version and HTML abstract.  Then add these
locations to the database table.

1.  Go to directory on nova
    /home/R6F/bwm/rdbms/httpd/sccs  

2.  Edit furls1.pl  to change the output filename $ffile if desired,
     (currently set to url_update1.dat at line 42)
    and to update the value of $sccsmax to the current maximum SCCS number.
     (currently set to 755 at line 40) 

3.  Run furls1.pl

4.  Copy output file (eg url_update1.dat) to kayak directory
    /export/project/kyk28/webdb/rdbms/oracle/kayak/httpd/httpd/oraperl

5.  Edit lines 38-41 of parsurl.pl if necessary to change the names of input and
    output files and the name of the database table where the file locations
    will be updated.

7.  Run parsurl.pl to produce a .sql file (currently updateurls1.sql) that has a 
    set of update commands, one for each SCCS number.

8.  Get into sql*plus as bwm and run the .sql file (eg updateurls1.sql) produced 
    by parsurl.pl.
    at the sql*plus prompt >, type
    > @updateurls1

    and then wait a long time while it runs through update and commit on every
    file in the database.

To create the real SCCS Oracle Database tables from the filemaker pro dump,

1.  Run .sql files that set up the tables with primary keys, foreign keys
    and constraints.
    These are currently the following files in the following directories:

    /export/project/kyk28/webdb/rdbms/oracle/kayak/httpd/httpd/plsql_bwm/sccsresnv/sccs_tables
    history_tables.sql
    shared_tables.sql
    and

    /export/project/kyk28/webdb/rdbms/oracle/kayak/httpd/httpd/plsql_bwm/sccsresnv/sccsa_tables
    sccsa_tables.sql
    sccsb_tables.sql
    puba_tables.sql
    pubb_tables.sql
    sccsx_seq.sql

DATA INPUT TABLES AND SEQUENCES FOR ONLINE ENTRY OF NEW RECORDS
    sccsb_tables.sql
    pubb_tables.sql
    The sccsb_tables and pubb_tables are the basic record, contract record
    and publication record data input tables for online input from a web
    browser.  They are for new records only.   New records can be input,
    viewed and revised.   They will then be reviewed by one of the database
    oversight group (see next paragraph) and transferred to the permanant
    Oracle SCCS database environment (sccsa and puba tables).

ORACLE SCCS DATABASE TABLES AND SEQUENCES FOR LOCATING AND VIEWING INFORMATION
ABOUT SCCS DOCUMENTS.
ALSO FOR ONLINE UPDATE OF PUBLICATION INFORMATION
    sccsa_tables.sql
    puba_tables.sql
    The sccsa_tables and puba_tables are populated only by the original 
    procedural transfer from the Oracle filemaker pro table OR from a
    transfer from the sccsb online input environment.  The transfer is
    allowed only by a select group of database overseers, which currently
    will include Terri Canzian, Nancy McCracken, Barbara Mihalas and
    Paul Coddington.   

TABLES AND SEQUENCES FOR CHECKING PASSWORDS, AND FOR TRACKING USE, NEW RECORD 
CREATION, AND RECORD UPDATES
    history_tables.sql
    shared_tables.sql
    sccsx_seq.sql
    These are all populated only from private procedures in the database
    code.  They are invisible to users, except for some report links made
    available through the web browser interface.

2.  To populate from the Oracle table of the filemaker pro export, see BWM.

    This requires running a procedure called RESQ2A_CLEANUP.cleanup.
    It will populate the basic SCCS document table, the contract report table
    and a table for each of the basic publication types: journal submission, 
    conference proceedings, book, book chapter, and phd thesis.  In the process,
    it will produce a consistent designation of document type, and store the
    value in the field document_type.
    It also populates two tables with obsolete filemaker pro data in its original
    form in case needed for future reference.