#!/bin/csh



############################################################################
# Pro/INTRALINK Data Extractor 3.3 
#
# Use this version with Pro/INTRALINK Release 3.3 , 3.4
############################################################################


############################################################################
# Configuration variables
############################################################################

# Set reportsDir to the path of the directory
# that will hold all of the reports that are 
# generated by this script.
# Note:  Use a slash for the path separator.
#        Use a trailing path separator.

set reportDir="reports/"

# The user and password that SQL*Plus uses to
# connect to the Pro/INTRALINK database will not 
# need to be changed unless their default values
# were changed in Pro/INTRALINK.

 
set ORA_SYS_USER="system"
set ORA_SYS_PWD="manager"

############################################################################
# To add $ORACLE/bin to your path, uncomment the following line. (May be
# required for Pro/INTRALINK 3.4.)
# setenv PATH $ORACLE_HOME/bin:$PATH

# If this script gives errors, uncomment the next line and try again.
#if ( -f ~/.ilink_cshrc ) source ~/.ilink_cshrc


# Create the reports directory if it doesn't already exist.
if !(-e $reportDir) mkdir $reportDir



# Run SQL*Plus and execute I2W_Extractor33.sql
sqlplus -S $ORA_SYS_USER/$ORA_SYS_PWD@INTRALINK @I2W_Extractor33.sql $reportDir

