#
# $Header: rdbms.vrf.pp 1.8 95/04/28 14:50:38 jpau Osd<unix> $ Copyr (c) 1992 Oracle
#

/* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */

/*****************************************************************************
NAME
    rdbms.vrf.pp

FUNCTION
    Performs the following for the product RDBMS:
    - Product depenency analysis to determine whether
      to load the product files.
    - Acquires product executables relink options (if applicable).
    - Collect configuration information from the user for the <Product Name>
      database objects creation (if applicable).

NOTES
    This script is dependent on the following variable(s) from unix.zoo.pp:
        rel_version - Contains first three numbers of rdbms version number 

    References and/or modifies the following variables in the product
    name space:

    do_load	
        TRUE if product files are to be copied or moved from stage 
        home to Oracle home.  FALSE otherwise.
    do_relink
        TRUE if the product executables are to be relinked.
        FALSE otherwise.
    do_db_actions
        TRUE if the product's database objects are to be created
        in the database (For RDBMS, it also means creating
        the database).  FALSE means no database actions.
    load_or_relink_only
        TRUE if we are loading files or relinking executables, but FALSE
        if we are going to perform database actions.
    relink_only
        TRUE if we are only relinking executables.  FALSE if loading files
        or performing database actions.

CREATED
    PKu		07/29/92

MODIFIED 
    Tjose   07/11/95  Added upgrade code to 7.2.3
    Wyim    19/01/95  Modified default install.
    Wyim    04/01/95  Added code for OSOPER group.
    Wyim    29/12/94  Added upgrade code for 7.1.6.  
    CPatel  23/05/94  Added upgrade code for 7.1.3. Rely on SS_71RDBMS.
    Jfischer11/09/93  Added upgrade code for 7.0.16. Shouldn't break 7.1.
    ERuben  08/24/93  Add code for 7.1.1.  Rely on SS_71RDBMS.
    ERuben  05/22/93  Bug 162167:  Add code so config.c file will only be
                        regenerated when the user chooses a different group
                        to be the dba group than the one in config.c, or 
                        it isn't set in config.c.
    ERuben  05/11/93  Add code for OFA_Compliant installs where the user
                        is upgrading, there already exists an Oracle Home
                        under Oracle_Base/product, and they are creating
                        another Oracle Home.
    ERuben  05/05/93  Increase default and minimum size of rollback segment
                        tablespace, due to errors encountered while running
                        PL/SQL initialization scripts.
    ERuben  08/11/92

*****************************************************************************/
{mark{mark{
/* Define USE_ULIMIT for ports which have file size restrictions imposed  */
/* by ulimit.  These are usually System V ports. */
/* Define NO_DEVSYS for ports which don't require Software Development System */
/* for installing Oracle */
/* Define OFF_SERVER_ONLY for Office Server only systems. */
/* Define GEN_AS to generate assembly code instead of c code in gen scripts */
/*  The SYSTEM_CHECK macro causes install/system.check, the pre-installation */
/*  configuration test, to be included in INSTALL.DIST.  The intent is that */
/*  this macro will be defined for all platforms (eventually). */
/*  The INCLUDE_CORE macro causes install/CORE.DIST to be included in  */
/*  install/INSTALL.DIST.  CORE.DIST contains a list of files which are  */
/*  required by all products.  They are especially important in the case */
/*  of sites which do not have an RDBMS license but link and use network */
/*  user tools (like SQL*Forms) from a "client" platform.  At some point */
/*  base development will "define" a CORE product and it can replace this */
/*  psydo-product.  */
/*  In 6.0.27.6, USE_BIGORALIB and USE_LIBKNL have been obsoleted.   */
/*  Both libora.a and libknl.a are now used for all ports.  This is  */
/*  done to clean up the suffix makefiles and to separate user and   */
/*  kernel libraries. */
/*  USE_BIGFRMLIB causes the the big forms library libforms.a to be made, */
/*  which is composed of libtm.a, libomm.a and libram.a */
/* Define USE_ROFIX if you want to rofix certain modules for your port.  */
/* Modules to be rofixed are designated in the make suffix files in the  */
/* source directories.  Rofixing (read-only fix) a module means compiling */
/* it in such a way as to move all data in the module from data space into */
/* text space.  Modules to be rofixed should be chosen with care since */
/* rofixing read/write data causes segmentation violations at run time. */
/*  Define LIBMEM if the make command on your port understands library    */
/*  dependency on object files, i.e. the rule: lib.a(obj1.o obj2.o).      */
/*  Define LIBSEP as well if each object file has to be listed separately,*/
/*  i.e. the rule: lib.a(obj1.o) lib.a(obj2.o).  For LIBSEP to be         */
/*  effective, LIBMEM has to be defined first.                            */
/* Define USE_RANLIB if "ranlib" is required after re-archiving the   */
/* library.  This affects the makefiles we ship out to the customers, */
/* not the makefiles in the development system.                       */
/* If you are using GNU make. */
/* Pro*Cobol Macros : Define the appropriate BUILD_* macros for your port. */
/* The code for the macro included below may require some port specific    */
/* modification.                                                           */
/* IDC */
/*
 * $Header: macros.vrf.pp 3090000.1 95/09/05 15:17:19 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */

/*
 * $Header: misc.ins.pp 3090000.1 95/09/05 15:17:24 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */








problem_error_info=nls( "problem_error_info","A problem occured trying to process the last error." );
problem_error_info_help=nls( "problem_error_info_help","?html problem_error_info_help" );
problem_error_info_content=nls( "problem_error_info_content","Error Processing Problem" );

problem_dlg_help=nls( "problem_dlg_help","?html problem_dlg_help" );

problem_header_dflt=nls( "problem_header_dflt", "
Platform:	%%operating_system%%
Release:	%%rel_version%%
Product: 	%%pname%%
Version:	%%current_version%%

Area:		(Installation)	

Install information:

	Installer Version:  %%installer_version%%
	Installer Script:   %%_line%% 
	Install Action:     %%Inst_Action%%

	Stage Home	    %%Stage_Home%%
	Oracle_Base	    %%Oracle_Base%%	(%%OFA_Compliant%%)
	Oracle Home	    %%Oracle_Home%%
	Owner		    %%Owner%%
	Log		    %%Install_Log%%

	During installation of the above product the error below is
	encountered:
");




Sys_Macro_Holdfile="%%Oracle_Home%%/orainst/holdfile.log";
Sys_Macro_Help=nls("Sys_Macro_Help", "?html Sys_Macro_Help" );
Sys_Macro_Content=nls( "Sys_Macro_Content", "O/S Error" );
Sys_Macro_Prompt=nls("Sys_Macro_Prompt", "
Error during action '%%_com%%'.

Command:  %%_cmd%%

");
Sys_Macro_Cancel_Prompt=nls("Sys_Macro_Cancel_Prompt", "Installation terminated at user request." );








/* Galina  
	{ 
	  if (exists(User_Dflt_File)) 
	  { 
	    { _tmp_var=translate(dflt_idx, User_Dflt_File, "="); 
	      _dflt_str="%_tmp_var%"; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE: _dflt_str=list_dflt; ] 
	  } 
	  else 
	    _dflt_str=list_dflt; 
	  if (Default_Install) 
	    output = _dflt_str; 
   else \ 

	    output=MULTIPLE_TEXT_DIALOG(prompt, _dflt_str, content, help); 
   if (exists(User_Dflt_File)) modify(dflt_idx, output, User_Dflt_File, "=");\ 
	  LOG_HDR("MULTIPLE_TEXT") 
	  _prompt=prompt; _answer=output; 
	  first_log=first(_answer); _answer1=rest(_answer); 
	  second_log=first(answer1); _answer=rest(answer1); 
	  third_log=first(answer); answer1=rest(answer); forth_log=first(answer1); 
	  _dummy="       Q> %_prompt%"; modify("", _dummy, Install_Log); 
	  _dummy="       A> %first_log%"; modify("", _dummy, Install_Log); 
	  _dummy="       A> %second_log%"; modify("", _dummy, Install_Log); 
	  _dummy="       A> %third_log%"; modify("", _dummy, Install_Log); 
	  _dummy="       A> %forth_log%"; modify("", _dummy, Install_Log); 
	}
  Galina */

















     
	{ /*_LOG_MSG ( "Entering rdbms.vrf" , "" ) */ 
	  _msg = "Entering rdbms.vrf" ; 
	  _logfile = "" ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}

    /*
     * Value initialization.
     */
    shutdown_db=false;
    dbname_max_length=8;
    dbs_dir = "%Oracle_Home%/dbs";
    rdbms_dir = "%Oracle_Home%/rdbms";
    sgadef_file = "%dbs_dir%/sgadef%Oracle_Sid%.dbf";
    control_file = "%dbs_dir%/cntrl%Oracle_Sid%.dbf";
    default_dba_group = "dba";
    default_oper_group = "dba";
    dbname_default = "%Oracle_Sid%";
    desired_ulimit=211367;
    config_c="%Oracle_Home%/rdbms/lib/config.c";
    get_dba_group_script="%Stage_Home%/rdbms/install/rdbms/getdbagp.sh";
    dba_group_tmp_file="%Tmp_Dir%/dbagrp.log";
    dba_group_idx="DBA_GROUP";
    create_new_config_file=false; /* Assume dba group in config.c is correct */
    create_dba_group_file="echo %dba_group_idx%=`%get_dba_group_script%` > %dba_group_tmp_file%";
    load_or_relink_only = false; /* Initialization */
    relink_only = false; /* Initialization */
    database_exists = false; /* Initialize to prevent errors. */
    startup_after_load_relink = false; /* Initialize to pervent errors. */

    /*
    ** Product name initialization.
    */
    server_name="ORACLE7";

    /*
     * String initialization.
     */

/* **Mon Jan 29 18:35:31 1996** -- egilchri new HTML help variables */

   type_of_files_help = nls ("type_of_files_help", "?html type_of_files_help");

/* **Mon Jan 29 18:35:31 1996** -- egilchri end of new HTML help variables */

    no_of_mt_points_prompt =nls("no_of_mt_points_prompt", "Distribute control files over three mount points?");
    no_of_mt_points_content =nls("no_of_mt_points_content", "Create DB Objects (F/S): Control File Distribution");
    no_of_mt_points_help = "Indicate if you will follow the OFA recommendation to spread database objects across three mount points.  While it is possible to specify a single mount point, or three mount points on the same drive, Oracle Corporation strongly recommends you spread your database across at least three independent devices.  See also OFA-Compliant Directory Structure Diagram";
    mt_point1_prompt =nls("mt_point1_prompt", "Enter first mount point");
    mt_point2_prompt =nls("mt_point2_prompt", "Enter second mount point");
    mt_point3_prompt =nls("mt_point3_prompt", "Enter third mount point");
    mt_point_prompt =nls("mt_point_prompt", "Enter mount point");
    mt_point1_content =nls("mt_point1_content", "Create DB Objects (F/S): Mount Point Locator");
    mt_point2_content =nls("mt_point2_content", "Create DB Objects (F/S): Mount Point Locator");
    mt_point3_content =nls("mt_point3_content", "Create DB Objects (F/S): Mount Point Locator");
    mt_point_help="Indicate if you will follow the OFA recommendation to spread database objects across three mount points.  While it is possible to specify a single mount point, or three mount points on the same drive, Oracle Corporation strongly recommends you spread your database across at least three independent devices. 
Oracle Corporation recommends that the database mount points you specify at this prompt be different from the mount point you specified for the product tree during the initial Installer prompts. ";
    mt_empty_info =nls("mt_empty_info", "Mount points cannot be empty strings");
    create_dir_failed =nls("create_dir_failed", "Unable to create directory.");
    create_dir_failed_content = nls ("create_dir_failed_content", "Directory Not Created");
    create_dir_failed_help = nls ("create_dir_failed_help", "?html create_dir_failed_help");
    migrate_run_prompt =nls("migrate_run_prompt", "The migration utility is not registered.  Have you run the migrate executable against the %Oracle_Sid% database?");
    migrate_run_content =nls("migrate_run_content", "Migration Unregistered");
    migrate_run_help = nls ("migrate_run_help", "?html migrate_run_help");

	migrate_not_run_prompt =nls("migrate_not_run_prompt", "Exiting the Installer because the migration executable has not been run against the %Oracle_Sid% database.");
	rdbms_not_installed_msg =nls("rdbms_not_installed_msg", "Exiting the Installer because the %server_name% software has not been installed. Before attempting to migrate the database, you must perform the following steps under '%Inst_V6_To_V7%': %Migrate_Util_Inst%, %Migrate_Util_Run%, and %Migrate_SW_Inst%");

	migrate_okay_prompt =nls("migrate_okay_prompt", "Have you successfully run the migrate executable against the %Oracle_Sid% database?");
	migrate_okay_content =nls("migrate_okay_content", "Migrate Run?");
        migrate_okay_help = nls ("migrate_okay_help", "?html migrate_okay_help");

	v6_deinstalled_prompt =nls("v6_deinstalled_prompt", "Have you de-installed the V6 products from %Oracle_Home%?");
	v6_deinstalled_content =nls("v6_deinstalled_content", "V6 De-Installed");
	v6_deinstalled_help =nls("v6_deinstalled_help", "You must de-install the V6 products from %Oracle_Home% before migrating.  If you have not done so, you can use another terminal to de-install the V6 products and select (Yes), or select (No) to exit the Installer session, de-install the V6 products, and run the Server installation again.");
	v6_not_deinstalled_info =nls("v6_not_deinstalled_info", "Exiting the migration because the V6 products have not been de-installed from %Oracle_Home%");
	added_to_init_ora_prompt =nls("added_to_init_ora_prompt", "Have you added the following parameter to the init%Oracle_Sid%.ora file:

shared_pool_size = 6000000");
	added_to_init_ora_content =nls("added_to_init_ora_content", "%server_name% Parameter");
        added_to_init_ora_help = nls ("added_to_init_ora_help", "?html added_to_init_ora_help");

	no_v7_in_init_ora_info =nls("no_v7_in_init_ora_info", "Exiting the migration process because the shared_pool_size parameter (recommended value: 6000000) has not been added to the init%Oracle_Sid%.ora file");

	cont_file_renamed_prompt =nls("cont_file_renamed_prompt", "Have you renamed or removed the control files affiliated with the %Oracle_Sid% database?  If this step failed previously, remove the generated control file to retry.");
	cont_file_renamed_content =nls("cont_file_renamed_content", "Control File");
        cont_file_renamed_help = nls ("cont_file_renamed_help", "?html cont_file_renamed_help");

	renamed_control_file_info =nls("renamed_control_file_info", "Exiting because the %Oracle_Sid% control files were not renamed after the migrate executable was run.");

    new_init_ora_prompt =nls("new_init_ora_prompt", "Enter the pathname of the initialization parameter file associated with the database %%Oracle_Sid%%.  The Installer needs to verify that all obsolete V6 parameters have been removed.");
    new_init_ora_content =nls("new_init_ora_content", "Fix init.ora");
    new_init_ora_help = nls ("new_init_ora_help", "?html new_init_ora_help");

    no_new_init_ora_msg =nls("no_new_init_ora_msg", "%%new_init_ora%% does not exist.  Enter the correct pathname.");
    obs_param_mesg =nls("obs_param_mesg", "Scanning %%new_init_ora%% for obsolete V6 init.ora parameters...");
    obs_param_found_mesg =nls("obs_param_found_mesg", "There are still obsolete V6 init.ora parameters in %%new_init_ora%%.  Please see installation log %Install_Log% for the listing of obsoleted parameters found.");

    check_obs_param_prompt=nls("check_obs_param_prompt", "Checking for obsolete V6 initialization parameters..");

	inst_down_mesg =nls("inst_down_mesg", "Make sure that no instances are running.");

	shutdown_for_migrate_info =nls("shutdown_for_migrate_info", "The %Oracle_Sid% database should not be running during a migration.");

	inst_exist_echo =nls("inst_exist_echo","There are still running instances associated w/ %Oracle_Sid%.");
	inst_exist_prompt =nls("inst_exist_prompt","There are still sgadef<SID>.dbf file(s) in $ORACLE_HOME/dbs/ (%Oracle_Home%/dbs/).  This indicates that there may still be running instances.  You must shut down all database instances associated with this ORACLE_HOME before upgrading the Server.  Select (Yes) if you have shut down the instances from another terminal/window.  Select (No) to abort the installation.");

	user_chooses_to_stop =nls("user_chooses_to_stop","The user has chosen to quit the installation");
	shutdown_db_prompt =nls("shutdown_db_prompt", "The database instance %Oracle_Sid% is currently up.  To continue, the database must be shut down.  Is it okay to shut down the database now?");
	dbshut_msg =nls("dbshut_msg", "Shutting down the %Oracle_Sid% database");
	vrf_shutdown_error =nls("vrf_shutdown_error", "Error while attempting to shut down the %Oracle_Sid% database.  Shut down the %Oracle_Sid% database and then try to install the Server again.");

	inst_not_running_msg=nls("inst_not_running_msg", "The instance %Oracle_Sid% is not running.  Make sure you have created the database and start the %Oracle_Sid% instance when creating new database objects.  Select (Help) for more information.");
	inst_not_running_content=nls("inst_not_running_content", "No Instance");
	inst_not_running_help=nls("inst_not_running_help", "You need to create a database and start up %Oracle_Sid% instance before creating new database objects.

To create a new database and start up the instance, select '%server_name% Server' from the Available Products, or exit the Installer, create the database manually, and reinvoke the Installer to create new database objects for the tools.");

	dba_group_prompt =nls("dba_group_prompt","Select group to act as DBA of the database:");
	dba_group_content =nls("dba_group_content", "DBA Group");
        dba_group_help = nls ("dba_group_help", "?html dba_group_help");
	oper_group_prompt =nls("oper_group_prompt","Select the OSOPER group:");
	oper_group_content =nls("oper_group_content", "OSOPER Group");
        oper_group_help = nls ("oper_group_help", "?html oper_group_help");
	non_default_group_info =nls("non_default_group_info","You have chosen a group that is different from the default group ('%%default_dba_group%%') already linked to ORACLE.  Therefore, the ORACLE executables will be relinked."); 
	check_grp_mesg = nls("check_grp_mesg","Determine if the %oper_group% currently exists.");
	non_exist_grp_prompt=nls("non_exist_grp_prompt","%oper_group% does not currently exist in this system. Choose (No) to specify a new %oper_group%.  Choose (Yes) to continue.");

        non_exist_grp_help = nls ("non_exist_grp_help", "?html non_exist_grp_help");
	non_exist_grp_content=nls("non_exist_grp_content", "%oper_group% Group Does Not Exist.");

	grp_non_exist_mesg=nls("grp_non_exist_mesg","The %oper_group% you specified does not exist, but will continue to be used as the OSOPER group.");
	grp_exist_mesg=nls("grp_exist_mesg","%oper_group% exists");
	ok_grp_mesg=nls("ok_grp_mesg","%oper_group% does not exist, but it is still used for OSOPER group");

	checking_ulimit_echo =nls("checking_ulimit_echo", "Checking the value of ULIMIT enviroment variable.");
	ulimit_not_found_info =nls("ulimit_not_found_info", "The environment variable ULIMIT is not set.  The installation will continue with the assumption that the ULIMIT of this account, or on this machine is at least %desired_ulimit%.  If it is not, then you should increase the ULIMIT of your system, or use the osh program supplied by Oracle.");
	ulimit_error_message =nls("ulimit_error_message", "Your ULIMIT is not as high as %desired_ulimit%.  In order to install ORACLE, you must either increase the ULIMIT of your system to %desired_ulimit% or use the osh program supplied by Oracle.");

    last_chance_prompt =nls("last_chance_prompt", "Is there any reason to stop the migration process?  This is your last chance.");
	last_chance_content =nls("last_chance_content", "Last Chance");
        last_chance_help = nls ("last_chance_help", "?html last_chance_help");
	last_chance_quit =nls("last_chance_quit", "The user has chosen to stop the migration process.");

	do_inst_pa_prompt =nls("do_inst_pa_prompt", "Select adapters to install:");
	do_inst_pa_content =nls("do_inst_pa_content", "Adapters");
        inst_pa_prompt =nls("inst_pa_prompt", "Select adapters to install:");
        inst_pa_content =nls("inst_pa_content", "Adapters");
	do_inst_pa_help =nls("do_inst_pa_help", "Currently, the only adapter linked in with ORACLE is the UDS (i.e. local) adapter.  Select the adapters in this list that you want to install.  If you plan to use remote connections, you must install at least one network protocol adapter.  Do not select any adapters if you are in the process of migrating and you have already installed and relinked the products.  If you select any adapters, you must relink again.");

        /* 
         * initialization of strings used in DB creation
         */
	dflt_ctrlf_prompt =nls("dflt_ctrlf_prompt", "Do you want to use the following files as control files?
%%control1_file_dflt%%
%%control2_file_dflt%%
%%control3_file_dflt%%");
	dflt_ctrlf_content =nls("dflt_ctrlf_content", "Control Files");
        dflt_ctrlf_help = nls ("dflt_ctrlf_help", "?html dflt_ctrlf_help");

        ctrlf_content_fs =nls("ctrlf_content_fs", "Create DB Objects(F/S): Control File Locator");
        ctrlf_content_rd =nls("ctrlf_content_rd", "Create DB Objects(RAW): Control File Locator");

        ctrlf_exist_note = nls("ctrlf_exist_note", "NOTE:  One or more of the default control files already exists.  You decided to perform a default installation. Therefore, these files will be deleted and replaced by the new control files.");

	ctrlf_exist_prompt =nls("ctrlf_exist_prompt", "One or more of the default control files exist.  You will be prompted to enter new names for the control files.");

	get_ctrlf1_prompt =nls("get_ctrlf1_prompt", "Enter the complete pathname of the first control file:");
	get_ctrlf2_prompt =nls("get_ctrlf2_prompt", "Enter the complete pathname of the second control file:");
	get_ctrlf3_prompt =nls("get_ctrlf3_prompt", "Enter the complete pathname of the third control file:");


        files_exist_echo =nls("files_exist_echo", "One of the default files exists.");

        files_exist_note = nls("files_exist_note", "NOTE:  One or more of the default files already exists.  You decided to perform a default installation. Therefore, these files will be deleted and replaced by the new files.");
        files_exist_msg =nls("files_exist_msg","One of the filenames you have chosen already exists.  You will be prompted for all file names and sizes individually.");

/* Ask whether this is a filesystem based approach or raw device based one */
        type_of_files_prompt =nls("type_of_files_prompt", "Choose storage type for database:");
        type_of_files_content =nls("type_of_files_content", "Create DB Objects: Storage Type");
        File_Based =nls("File_Based", "Filesystem-Based Database");
        RD_Based =nls("RD_Based", "Raw Device-Based Database");


        /* Ask whether to use the default control files */
	dbname_prompt =nls("dbname_prompt","Enter the database name associated with the %Oracle_Sid% instance:"); 
	dbname_content =nls("dbname_content","Database Name");
        dbname_help = nls ("dbname_help", "?html dbname_help");
	dbname_too_long_info =nls("dbname_too_long_info","The database name you entered is too long.  The length of database name must be less than or equal to %dbname_max_length% characters.");
	db_exists_prompt =nls("db_exists_prompt", "ORACLE %%Oracle_Sid%% is stilling running. Terminating installation.  Please shut down the database.");
        db_exists_content =nls("db_exists_content","ORACLE Instance Exists");
        db_exists_help =nls("db_exists_help","Before recreating the database, you must first shut down the database instance '%%Oracle_Sid%%'.");

        db_char_set_prompt =nls("db_char_set_prompt","Enter the character set for creating this database:");
        db_char_set_default = "US7ASCII";
        db_char_set_content =nls("db_char_set_content","Character Set");
        db_char_set_help = nls ("db_char_set_help", "?html db_char_set_help");

	db_char_select_prompt=nls("db_char_select_prompt", "Select the character set for creating this database.  If your desired character set is not listed, select (Others..) and enter the character set manually.");
        db_char_set_null_msg =nls("db_char_set_null_msg","You have entered NULL for the character set.  You must enter a value for this parameter to create a database.");
	db_char_set_invalid_msg =nls("db_char_set_invalid_msg", "%%db_char_set%% is not a valid character set.  Try again.");

        lgfile_content =nls("lgfile_content","Redo Log Files");
        lgfile_help = nls ("lgfile_help", "?html lgfile_help");

        lgsize_content =nls("lgsize_content","Redo Log File Size");
        lgsize_help = nls ("lgsize_help", "?html lgsize_help");

	lgfileN1_prompt =nls("lgfileN1_prompt","Enter the first redo log file name for thread %%Current_Node%%:");
        lgfileN2_prompt =nls("lgfileN2_prompt","Enter the second redo log file name for thread %%Current_Node%%:");
        lgfileN3_prompt =nls("lgfileN3_prompt","Enter the third redo log file name for thread %%Current_Node%%:");
        lgsizeN_prompt =nls("lgsizeN_prompt","Enter the size of the redo log file:");
        lgsizeN_default = "500K";
        lgsizeN_min = "100K";


        RnodeN_prompt =nls("RnodeN_prompt", "Enter the number of other nodes expected in this cluster (other than the current node):");
        RnodeN_default =nls("RnodeN_default", "%Num_RNodes%");
        RnodeN_content =nls("RnodeN_content", "Number of Other Nodes in Cluster");
        RnodeN_help = nls ("RnodeN_help", "?html RnodeN_help");

  MInstance_prompt =nls("MInstance_prompt", "Enter the number of instances associated with the database:");
        MInstance_content =nls("MIntance_content", "Instance Count");
        MInstance_help = nls ("MInstance_help", "?html MInstance_help");
        orasidM_prompt =nls("orasidM_prompt", "Enter the ORACLE_SID for instance number %%Current_Node%%:");
        orasidN_prompt =nls("orasidN_prompt", "Enter the ORACLE_SID for node %%Current_Node%%:");
        orasidN_default =nls("orasidN_default", "%Oracle_Sid%%%Current_Node%%");

    ora_sid_prompt =nls("ora_sid_prompt", "Enter your ORACLE_SID:");
    ora_sid_content =nls("ora_sid_content", "ORACLE_SID");
    ora_sid_help =nls("ora_sid_help", "?html ora_sid_help");


    ora_sid_info1 =nls("ora_sid_info1", "You must specify an ORACLE_SID.");

	db_dflt_prompt1_71 =nls("db_dflt_prompt1_71", "The following are the default file names and sizes that will be used to create the new database.  Select (OK) to continue to the next screen of defaults files:
PASSWORD(%%orapwd_size_dflt%% entry): %%OH%%/dbs/orapw%%Oracle_Sid%%
SYSTEM(%%system_size_dflt%%): %%system_file_dflt%%
LOG1(%%log1_size_dflt%%): %%log1_file_dflt%%
LOG2(%%log2_size_dflt%%): %%log2_file_dflt%%
LOG3(%%log3_size_dflt%%): %%log3_file_dflt%%  (more..)");
        db_dflt_prompt1 = db_dflt_prompt1_71;
	db_dflt_content1=nls("db_dflt_content1", "DB Defaults");
        db_dflt_help1   = nls ("db_dflt_help1", "?html db_dflt_help1");

	db_dflt_prompt2 =nls("db_dflt_prompt2", "Default file names and sizes continued.  Select (Back) to see the previous screen of defaults.  Select (OK) to continue:
ROLLBACK(%%rbs_size_dflt%%): %%rbs_file_dflt%%
TEMP(%%temp_size_dflt%%): %%temp_file_dflt%%
USERS(%%users_size_dflt%%): %%users_file_dflt%%
TOOLS(%%tools_size_dflt%%): %%tools_file_dflt%%");

	db_dflt_content2=nls("db_dflt_content2", "DB Defaults");
        db_dflt_help2   = nls ("db_dflt_help2", "?html db_dflt_help2");

	all_db_defaults_prompt =nls("all_db_defaults_prompt", "Select (Yes) to accept the default file names and sizes shown on the previous screens.  Select (No) to specify new values.  Select (Back) to view the previous screens.");
        all_db_defaults_content =nls("all_db_defaults_content", "Default Database");
        all_db_defaults_help = nls ("all_db_defaults_help", "?html all_db_defaults_help");


        system_file_prompt =nls("system_file_prompt","Enter the complete pathname for the SYSTEM tablespace data file:");
        system_file_content_fs =nls("system_file_content_fs","Create DB Objects(F/S) : System File Locator");
        system_file_content_rd =nls("system_file_content_fs","Create DB Objects(RAW) : System File Locator");

        system_file_content =nls("system_file_content","SYSTEM Data File");
        system_file_help = nls ("system_file_help", "?html system_file_help");
        system_size_prompt =nls("system_size_prompt","Enter the size of the SYSTEM tablespace data file:");
        system_size_content =nls("system_size_content","SYSTEM Data File Size");
        file_size_help = nls ("file_size_help", "?html file_size_help");

        log1_file_prompt =nls("log1_file_prompt","Enter the complete pathname for the first redo log file:");
        log_file_content_fs =nls("log_file_content_fs","Create DB Objects(F/S):Redo Log Locator");
        log_file_content_rd =nls("log_file_content_rd","Create DB Objects(RAW):Redo Log Locator");

        log_file_content =nls("log_file_content","Redo Log Files");
        log_file_help = nls ("log_file_help", "?html log_file_help");
        log1_size_prompt =nls("log1_size_prompt","Enter the size of the first redo log file:");
        log_size_content =nls("log_size_content","Redo Log File Size");

        log2_file_prompt =nls("log2_file_prompt","Enter the complete pathname for the second redo log file:");
        log2_size_prompt =nls("log2_size_prompt","Enter the size of the second redo log file:");

        log3_file_prompt =nls("log3_file_prompt","Enter the complete pathname for the third redo log file name:");
        log3_size_prompt =nls("log3_size_prompt","Enter the size of the third redo log file:");

        rbs_file_prompt =nls("rbs_file_prompt","Enter the complete pathname of the rollback segment file:");
        rbs_file_content_fs =nls("rbs_file_content_fs","Create DB Objects(F/S):Rollback Segment File Locator");
        rbs_file_content_rd =nls("rbs_file_content_rd","Create DB Objects(RAW):Rollback Segment File Locator");

        rbs_file_content =nls("rbs_file_content","Rollback Segment File");
        rbs_file_help = nls ("rbs_file_help", "?html rbs_file_help");

        rbs_size_prompt =nls("rbs_size_prompt","Enter the size of the rollback segment file:");
        rbs_size_content =nls("rbs_size_content","Rollback Segment File Size");

        temp_file_prompt =nls("temp_file_prompt","Enter the complete pathname of the temporary segment file:");
        temp_file_content =nls("temp_file_content","Temporary Segment File");
        temp_file_content_fs =nls("temp_file_content_fs","Create DB Objects(F/S):Temporary Segment File Locator");
        temp_file_content_rd =nls("temp_file_content_rd","Create DB Objects(RAW):Temporary Segment File Locator");

        temp_file_help = nls ("temp_file_help", "?html temp_file_help");
        temp_size_prompt =nls("temp_size_prompt","Enter the size of the temporary segment file:");
        temp_size_content =nls("temp_size_content","Temporary Segment File Size");

        users_file_prompt =nls("users_file_prompt","Enter the complete pathname of the USER tablespace data file:");
        users_file_content_fs =nls("users_file_content_fs","Create DB Objects(F/S): USER Data File Locator");
        users_file_content_rd =nls("users_file_content_rd","Create DB Objects(RAW): USER Data File Locator");

        users_file_content =nls("users_file_content","USER Data File");
        users_file_help = nls ("users_file_help", "?html users_file_help"); 
        users_size_prompt =nls("users_size_prompt","Enter the size of the USER tablespace data file:");
        users_size_content =nls("users_size_content","USER Data File Size");

        tools_file_prompt =nls("tools_file_prompt","Enter the complete pathname of the TOOLS tablespace data file:");
        tools_file_content_fs =nls("tools_file_content_fs","Create DB Objects(F/S): TOOLS Data File Locator");
        tools_file_content_rd =nls("tools_file_content_fs","Create DB Objects(RAW): TOOLS Data File Locator");

        tools_file_content =nls("tools_file_content","TOOLS Data File");
        tools_file_help = nls ("tools_file_help", "?html tools_file_help");
        tools_size_prompt =nls("tools_size_prompt","Enter the size of the TOOLS tablespace data file:");
        tools_size_content =nls("tools_size_content","TOOLS Data File Size");

	rdbms_opts_chosen_msg=nls("rdbms_opts_chosen_msg", "One or more RDBMS options have been selected.  ORACLE will be relinked.");

        dbaop_pw_prompt=nls("dbaop_pw_prompt", "Do you want to set the passwords for the internal users (dba and operator)?");
	dbaop_pw_content=nls("dbaop_pw_content", "DBA/Operator Passwords");
	dbaop_pw_help=nls("dbaop_pw_help", "?html dbaop_pw_help");

	dba_pw_prompt=nls("dba_pw_prompt", "Enter the password for the internal DBA user: (For security reasons, your input will not be echoed.  After you type in the password, you will be prompted to re-enter the password for confirmation.)");
	dba_pw_content=nls("dba_pw_content", "DBA Password");
        dba_pw_help = nls ("dba_pw_help", "?html dba_pw_help");

/* ------------------------------------------------------------ */

        orapwd_prompt=nls("orapwd_prompt", "Do you want to set the passwords for the internal users (dba and operator)?");
        orapwd_content=nls("orapwd_content", "dba password");
        orapwd_help = nls ("orapwd_help", "?html orapwd_help");
        orapwd_file_select_prompt=nls("orapwd_file_select_prompt", "Select the name of the password file:");

        orapwd_pw_prompt=nls("orapwd_pw_prompt", "Enter the password for the internal DBA user: (For security reasons, your input will not be echoed.  After you type in the password, you will be prompted to re-enter the password for confirmation.)");
        orapwd_pw_content=nls("orapwd_pw_content", "dba password");
        orapwd_pw_help = nls ("orapwd_pw_help", "?html orapwd_pw_help");

        orapwd_entries_prompt=nls("orapwd_entries_prompt", "Enter the number of concurrent dba users expected : ");
        orapwd_size_content=nls("orapwd_size_content","orapwd entries value");
        orapwd_size_help = nls ("orapwd_size_help", "?html orapwd_size_help");

/* ------------------------------------------------------------ */

	lsnr_pw_prompt=nls("lsnr_pw_prompt", "Enter the password for the TNS listener: (For security reasons, your input will not be echoed.  After you type in the password, you will be prompted to re-enter the password for confirmation.)");
	lsnr_pw_content=nls("lsnr_pw_content", "TNS Listener Password");
        lsnr_pw_help = nls ("lsnr_pw_help", "?html lsnr_pw_help");

	op_pw_prompt=nls("op_pw_prompt", "Enter the password for the internal operator user: (For security reasons, your input will not be echoed.  After you type in the password, you will be prompted to re-enter the password for confirmation.)");
	op_pw_content=nls("op_pw_content", "Operator Password");
        op_pw_help = nls ("op_pw_help", "?html op_pw_help");

	remote_cnct_prompt=nls("remote_cnct_prompt", "Do you want to allow remote connections as 'internal'?");
	remote_cnct_content=nls("remote_cnct_content", "Remote Connect");
        remote_cnct_help = nls ("remote_cnct_help", "?html remote_cnct_help");

	pw_file_select_prompt=nls("pw_file_select_prompt", "Select the name of the password file:");
	pw_file_select_content=nls("pw_file_select_content", "Password File");
        pw_file_select_help = nls ("pw_file_select_help", "?html pw_file_select_help");

	pw_cmt_prompt=nls("pw_cmt_prompt", "Enter comments to be stored in the password file along with the passwords.  Clear the field if you do not want to store any comments.");
	pw_cmt_content=nls("pw_cmt_content", "Password Comments");
        pw_cmt_help = nls ("pw_cmt_help", "?html pw_cmt_help");

	insert_pw_err_prompt=nls("insert_pw_err_prompt", "Insert password error: %%stat_str%%.

Select (Yes) to retry.  Select (No) to abort setting DBA and Operator passwords and continue.");
	insert_pw_err_content=nls("insert_pw_err_content", "Password Error");
	insert_pw_err_help=nls("insert_pw_err_help", "See the error message for details on the nature of the error.");

    relink_load_only = nls("relink_load_only", "The user is relinking or reloading, but not performing any database actions.");

    database_exists_prompt = nls("database_exists_prompt", "Does the %%Oracle_Sid%% database exist and is it functional?");
    database_exists_content = nls("database_exists_content", "Database Exists?");
    database_exists_help = nls("database_exists_help", "Since the Oracle SID is set to %%Oracle_Sid%% and a file by the name of %%pfile_dbs_dir_file%% exists, it is assumed that there is a database with the SID of %%Oracle_Sid%% that is a working database.  Select (Yes) if this is true. Select (No) it this is not true.");

    ofa_database_exists_prompt = nls("ofa_database_exists_prompt", "Does a working database exist with the SID of %%Oracle_Sid%%, but with an ORACLE_HOME different from the one in which you are presently installing or relinking software?");
    ofa_database_exists_content = nls("ofa_database_exists_content", "OFA Database Exists");
    ofa_database_exists_help = nls("ofa_database_exists_help", "Since ORACLE_BASE is defined, it is assumed that you have an OFA compliant installation.  Because you have stated that the SID is %%Oracle_Sid%%, there may be a working database with this name that already exists, that has an ORACLE_HOME different from %%Oracle_Home%%.  Select (Yes) if a working database with this SID exists. Select (No) if a working database with this SID does not exist.");

	upg_from_prompt=nls("upg_from_prompt", "The database you are about to upgrade is based on %server_name% Server, Version:");
	upg_from_content=nls("upg_from_content", "DB Upgrade");
        upg_from_help = nls ("upg_from_help", "?html upg_from_help");
        upg_from_early_info=nls("upg_from_early_info", "Since you are installing from a version earlier than %%earliest_easily_upgradable%%, you must contact Worldwide Customer Support for instructions on upgrading your database.");
        upg_from_early_content=nls("upg_from_early_content", "<7.0.11");
        upg_from_early_help=nls("upg_from_early_help", "The %%Oracle_Home%%/rdbms/doc/README.doc file contains instructions for upgrading to 7.0.13 from versions %%earliest_easily_upgradable%% and later, but you must contact Worldwide Customer Support for instructions on upgrading from a version of the database earlier than %%earliest_easily_upgradable%%.");

 upg_oldoraclehome_prompt=nls("upg_oldoraclehome_prompt", "If you are upgrading to a new ORACLE_HOME, enter the directory of the old ORACLE_HOME.");
    upg_oldoraclehome_content=nls("upg_oldoraclehome_content", "Old ORACLE_HOME");
     upg_oldoraclehome_help=nls("upg_oldoraclehome_help", "?html upg_oldoraclehome_help");
        upg_oldoraclehome_info=nls("upg_oldoraclehome_info", "The old Oracle Home you have specified does not exist or is not a valid Oracle Home.  Please try again."); 

    old_dbname_prompt=dbname_prompt;
    old_dbname_content=nls("old_dbname_content", "SID Database Name");
    old_dbname_help=nls("old_dbname_help", "Since you are upgrading your database and you are in an OFA-compliant environment, it is important to determine the location of the current init.ora file associated with the %Oracle_Sid% database.  This file should be located in the %Oracle_Base%/admin/dbname/pfile directory.");
    dbname_nonex_info=nls("dbname_nonex_info", "The %%dbname_admin_dir%% directory does not exist.  Enter the database name again.");
    pfile_not_exists_info=nls("pfile_not_exists_info", "The %%pfile_spec%% file does not exist.  Enter the database name again.");

    startup_load_link_prompt = nls("startup_load_link_prompt", "Do you want to shut down the %%Oracle_Sid%% database before loading files and/or relinking executables, and start it up after you are finished loading or relinking?");
    startup_load_link_content = nls("startup_load_link_content", "Stop and Start the Database");
    startup_load_link_help = nls ("startup_load_link_help", "?html startup_load_link_help");

    old_oracle_home_prompt=nls("old_oracle_home_prompt", "Enter your old ORACLE_HOME directory.");
    old_oracle_home_content=nls("old_oracle_home_content", "Old ORACLE_HOME");
    old_oracle_home_help = nls ("old_oracle_home_help", "?html old_oracle_home_help");
    old_oracle_home_info=nls("old_oracle_home_info", "The old ORACLE_HOME you have specified does not exist.  Please try again.");

/* 
 * For OPS sites, Allow user to choose the kind of installation 
 */
	dup_value=nls("dup_value","You have already entered '%%ent_val%%'. Please choose a different name for %%ent_type%%");
	multi_inst_prompt =nls("multi_inst_prompt","Do you want to create a parallel database that supports more than one instance of ORACLE?");
	multi_inst_content =nls("multi_inst_content","Allow maxinstances > 1?");
        multi_inst_help = nls ("multi_inst_help", "?html multi_inst_help");

/*
 * Ask user about automatically configuring MTS and starting up the listener
 */
	   start_lsnr_prompt = nls("start_lsnr_prompt","Would you like MTS (Multi-Threaded Server) configured and the SQL*Net listener automatically started?");
	   start_lsnr_content = nls("start_lsnr_content","Configure MTS and start SQL*Net listener?");
           start_lsnr_help = nls ("start_lsnr_help", "?html start_lsnr_help");

    /* ************************************************************
     * Begin processing.
     ************************************************************ */
    product = rdbms;
    src = "%Stage_Home%/rdbms";
    Def_Inst_sav = Default_Install;

/*
 * $Header: pinit.vrf.pp 3090000.1 95/09/05 15:17:26 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */
/***************************************************************************
NAME
    pinit.vrf

FUNCTION
    Contains common initialization code for *.vrf scripts.

NOTES

CREATED
    PKu		07/26/92

MODIFIED 
***************************************************************************/
   { /* pinit.vrf */
    product_label = product_interface_label(product);
    pname = product_name(product);

    ui_product(product_label);
    ui_action(instantiate(Analyze_Depend_Prompt));

    ui_product(product_label);
    ui_action("");

    has_db_objects=false;
	   } /*end of pinit.vrf*/

    /* 
     * Before we even call another product's verify script.  Let's check
     * if the person is doing a migration.  If so, make sure that they have
     * run migration (check that migration is registered) and ask if they
     * have deinstalled the V6 products?
     */
    if (Migrate_Action==Migrate_DB) 
    {
        if (not(registered("migrate")))
        {
             
	{ /*_YESNO_DLG ( migrate_run_prompt , false , migrate_run_content , migrate_run_help , "%pname%.migrate_run_output" , migrate_run_output ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.migrate_run_output" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = false ; ] 
	  } 
	  else 
	    _dflt_bool = false ; 
	  if ( Default_Install ) 
	    migrate_run_output = _dflt_bool ; 
	  else 
	    migrate_run_output = YESNO_DIALOG ( migrate_run_prompt , _dflt_bool , migrate_run_content , migrate_run_help ) ; 
	  if ( migrate_run_output ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.migrate_run_output" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = migrate_run_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
            if (not(migrate_run_output))
            {
                 
	{ /*_SYS_ERR ( migrate_not_run_prompt ) */ 
	      _com = migrate_not_run_prompt ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
                signal('CANCEL, migrate_not_run_prompt);
            }
        }

        if (not(registered("rdbms")))
        {
             
	{ /*_SYS_ERR ( rdbms_not_installed_msg ) */ 
	      _com = rdbms_not_installed_msg ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
            signal('CANCEL, rdbms_not_installed_msg);
        }

         
	{ /*_YESNO_DLG ( migrate_okay_prompt , false , migrate_okay_content , migrate_okay_help , "%pname%.migrate_okay_output" , migrate_okay_output ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.migrate_okay_output" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = false ; ] 
	  } 
	  else 
	    _dflt_bool = false ; 
	  if ( Default_Install ) 
	    migrate_okay_output = _dflt_bool ; 
	  else 
	    migrate_okay_output = YESNO_DIALOG ( migrate_okay_prompt , _dflt_bool , migrate_okay_content , migrate_okay_help ) ; 
	  if ( migrate_okay_output ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.migrate_okay_output" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = migrate_okay_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        if (not(migrate_okay_output))
        {
             
	{ /*_SYS_ERR ( "The person says that they didn't run the migrate utility" ) */ 
	      _com = "The person says that they didn't run the migrate utility" ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
            signal('CANCEL, migrate_not_run_prompt);
        }

         
	{ /*_YESNO_DLG ( v6_deinstalled_prompt , false , v6_deinstalled_content , v6_deinstalled_help , "%pname%.v6_deinstalled_output" , v6_deinstalled_output ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.v6_deinstalled_output" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = false ; ] 
	  } 
	  else 
	    _dflt_bool = false ; 
	  if ( Default_Install ) 
	    v6_deinstalled_output = _dflt_bool ; 
	  else 
	    v6_deinstalled_output = YESNO_DIALOG ( v6_deinstalled_prompt , _dflt_bool , v6_deinstalled_content , v6_deinstalled_help ) ; 
	  if ( v6_deinstalled_output ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.v6_deinstalled_output" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = v6_deinstalled_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        if (not(v6_deinstalled_output))
        {
             
	{ /*_SYS_ERR ( v6_not_deinstalled_info ) */ 
	      _com = v6_not_deinstalled_info ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
            signal('CANCEL, v6_not_deinstalled_info);
        }

         
	{ /*_YESNO_DLG ( added_to_init_ora_prompt , false , added_to_init_ora_content , added_to_init_ora_help , "%pname%.added_to_init_ora_output" , added_to_init_ora_output ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.added_to_init_ora_output" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = false ; ] 
	  } 
	  else 
	    _dflt_bool = false ; 
	  if ( Default_Install ) 
	    added_to_init_ora_output = _dflt_bool ; 
	  else 
	    added_to_init_ora_output = YESNO_DIALOG ( added_to_init_ora_prompt , _dflt_bool , added_to_init_ora_content , added_to_init_ora_help ) ; 
	  if ( added_to_init_ora_output ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.added_to_init_ora_output" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = added_to_init_ora_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        if (not(added_to_init_ora_output))
        {
             
	{ /*_SYS_ERR ( no_v7_in_init_ora_info ) */ 
	      _com = no_v7_in_init_ora_info ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
            signal('CANCEL, no_v7_in_init_ora_info);
        }

         
	{ /*_YESNO_DLG ( cont_file_renamed_prompt , false , cont_file_renamed_content , cont_file_renamed_help , "%pname%.cont_file_renamed_output" , cont_file_renamed_output ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.cont_file_renamed_output" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = false ; ] 
	  } 
	  else 
	    _dflt_bool = false ; 
	  if ( Default_Install ) 
	    cont_file_renamed_output = _dflt_bool ; 
	  else 
	    cont_file_renamed_output = YESNO_DIALOG ( cont_file_renamed_prompt , _dflt_bool , cont_file_renamed_content , cont_file_renamed_help ) ; 
	  if ( cont_file_renamed_output ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.cont_file_renamed_output" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = cont_file_renamed_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        if (not(cont_file_renamed_output))
        {
             
	{ /*_SYS_ERR ( renamed_control_file_info ) */ 
	      _com = renamed_control_file_info ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
            signal('CANCEL, renamed_control_file_info);
        }

        /*
         * Make sure the user has editted the initsid.ora file and removed any
         * parameters that are obsolete with V7.
         */
        poss_v6_init_ora="%Oracle_Home%/dbs/init%Oracle_Sid%.ora";
        new_init_ora="";
        while (new_init_ora=="")
        {
             
	{ /*_TEXT_DLG ( instantiate ( new_init_ora_prompt ) , poss_v6_init_ora , new_init_ora_content , new_init_ora_help , "%pname%.new_init_ora_prompt" , new_init_ora ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.new_init_ora_prompt" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = poss_v6_init_ora ; ] 
	  } 
	  else 
	    _dflt_str = poss_v6_init_ora ; 
	  if ( Default_Install ) 
	    new_init_ora = _dflt_str ; 
	  else 
	    new_init_ora = TEXT_DIALOG ( instantiate ( new_init_ora_prompt ) , _dflt_str , new_init_ora_content , new_init_ora_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.new_init_ora_prompt" , new_init_ora , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( new_init_ora_prompt ) ; _answer = new_init_ora ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
            if (not(exists(new_init_ora)))
            {
                information_dialog(instantiate(no_new_init_ora_msg));
                new_init_ora="";
            }
	    Default_Install=FALSE;
        }
	Default_Install=Def_Inst_sav;

         
	{ /*_ACTION ( instantiate ( obs_param_mesg ) ) */ 
	  _com = instantiate ( obs_param_mesg ) ; 
	  ui_action ( "%_com%" ) ; 
	  
	{ /*_LOG_MSG ( "%_com%" ,  Install_Log ) */ 
	  _msg = "%_com%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	} 
	}
         
	{ /*_SYSTEM ( "%Oracle_Home%/rdbms/install/rdbms/obsprm.sh %new_init_ora%" , check_obs_param_prompt , status ) */ 
	  _cmd = "%Oracle_Home%/rdbms/install/rdbms/obsprm.sh %new_init_ora%" ; _com = check_obs_param_prompt ; 
	   
	{ /*_LOG_SEL ( _cmd ,  outfile ) */ 
	    outfile = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      outfile = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      outfile = Make_Log ; 
	} 
	  _out = outfile ; _err = outfile ; 
	  modify ( "" , log_divider ( ) , outfile ) ; 
	  modify ( "" , "Action:  %_com%" , _out ) ; 
	  modify ( "" , "Command: (%_cmd%), Out=%_out%, Err=%_err%" , _out ) ; 
	  modify ( "" , "{" , _out ) ; 
	  _stat = spawn ( _cmd , _out , _err ) ; 
	  modify ( "" , "}" , _out ) ; 
	  modify ( "" , "Status:  %_stat%" , _out ) ; 
	  if ( _stat != 0 ) { 
	  modify ( "" , "(( OIERR-SYSTEM: %_cmd% ))" , _out ) ; 
	  } 
	  status = _stat ; 
	  modify ( "" , log_divider ( ) , _out ) ; 
	} /*End SYSTEM*/
        If (status != 0)
            signal('CANCEL, instantiate(obs_param_found_mesg));

    } /* if do_migrate */

    /*
     * Product dependency analysis.
     */
    depend_size = 0;
     
	{ /*_VERIFY_PRODUCT ( ocommon , "ocommon" , tmp_size ) */ 
	  { 
	     _prod_bound = TRUE ; 
	     tmp_size = 0 ; 
	     _tmp_var = product_interface_label ( ocommon ) ; 
	  } 
	  [ 
	    'UNBOUND_VARIABLE : 
	     { 
	       _prod_bound = FALSE ; 
	       _pname = "ocommon" ; 
	       if ( not ( Build_Stage_Only ) ) 
	         if ( not ( registered ( _pname ) ) ) 
	           signal ( 'CANCEL , instantiate ( Depend_Not_Installed_Mesg ) ) ; 
	     } 
	  ] 
	  { 
	    if ( _prod_bound ) 
	      tmp_size = verify ( ocommon ) ; 
	  } 
	}
    depend_size=depend_size + tmp_size;
     
	{ /*_VERIFY_PRODUCT ( ows , "ows" , tmp_size ) */ 
	  { 
	     _prod_bound = TRUE ; 
	     tmp_size = 0 ; 
	     _tmp_var = product_interface_label ( ows ) ; 
	  } 
	  [ 
	    'UNBOUND_VARIABLE : 
	     { 
	       _prod_bound = FALSE ; 
	       _pname = "ows" ; 
	       if ( not ( Build_Stage_Only ) ) 
	         if ( not ( registered ( _pname ) ) ) 
	           signal ( 'CANCEL , instantiate ( Depend_Not_Installed_Mesg ) ) ; 
	     } 
	  ] 
	  { 
	    if ( _prod_bound ) 
	      tmp_size = verify ( ows ) ; 
	  } 
	}
    depend_size=depend_size + tmp_size;
     
	{ /*_VERIFY_PRODUCT ( otrace , "otrace" , tmp_size ) */ 
	  { 
	     _prod_bound = TRUE ; 
	     tmp_size = 0 ; 
	     _tmp_var = product_interface_label ( otrace ) ; 
	  } 
	  [ 
	    'UNBOUND_VARIABLE : 
	     { 
	       _prod_bound = FALSE ; 
	       _pname = "otrace" ; 
	       if ( not ( Build_Stage_Only ) ) 
	         if ( not ( registered ( _pname ) ) ) 
	           signal ( 'CANCEL , instantiate ( Depend_Not_Installed_Mesg ) ) ; 
	     } 
	  ] 
	  { 
	    if ( _prod_bound ) 
	      tmp_size = verify ( otrace ) ; 
	  } 
	}
    depend_size=depend_size + tmp_size;
     
	{ /*_VERIFY_PRODUCT ( network , "network" , tmp_size ) */ 
	  { 
	     _prod_bound = TRUE ; 
	     tmp_size = 0 ; 
	     _tmp_var = product_interface_label ( network ) ; 
	  } 
	  [ 
	    'UNBOUND_VARIABLE : 
	     { 
	       _prod_bound = FALSE ; 
	       _pname = "network" ; 
	       if ( not ( Build_Stage_Only ) ) 
	         if ( not ( registered ( _pname ) ) ) 
	           signal ( 'CANCEL , instantiate ( Depend_Not_Installed_Mesg ) ) ; 
	     } 
	  ] 
	  { 
	    if ( _prod_bound ) 
	      tmp_size = verify ( network ) ; 
	  } 
	}
    depend_size=depend_size + tmp_size;
     
	{ /*_VERIFY_PRODUCT ( svrmgr , "svrmgr" , tmp_size ) */ 
	  { 
	     _prod_bound = TRUE ; 
	     tmp_size = 0 ; 
	     _tmp_var = product_interface_label ( svrmgr ) ; 
	  } 
	  [ 
	    'UNBOUND_VARIABLE : 
	     { 
	       _prod_bound = FALSE ; 
	       _pname = "svrmgr" ; 
	       if ( not ( Build_Stage_Only ) ) 
	         if ( not ( registered ( _pname ) ) ) 
	           signal ( 'CANCEL , instantiate ( Depend_Not_Installed_Mesg ) ) ; 
	     } 
	  ] 
	  { 
	    if ( _prod_bound ) 
	      tmp_size = verify ( svrmgr ) ; 
	  } 
	}
    depend_size=depend_size + tmp_size;
     
	{ /*_VERIFY_PRODUCT ( plsql , "plsql" , tmp_size ) */ 
	  { 
	     _prod_bound = TRUE ; 
	     tmp_size = 0 ; 
	     _tmp_var = product_interface_label ( plsql ) ; 
	  } 
	  [ 
	    'UNBOUND_VARIABLE : 
	     { 
	       _prod_bound = FALSE ; 
	       _pname = "plsql" ; 
	       if ( not ( Build_Stage_Only ) ) 
	         if ( not ( registered ( _pname ) ) ) 
	           signal ( 'CANCEL , instantiate ( Depend_Not_Installed_Mesg ) ) ; 
	     } 
	  ] 
	  { 
	    if ( _prod_bound ) 
	      tmp_size = verify ( plsql ) ; 
	  } 
	}
    depend_size=depend_size + tmp_size;

    has_db_objects=true;  /* RDBMS creates database objects */

    /* This prevents UNBOUND_VARIABLE error in rdbms.ins */
    pa_inst_list = list();

/*
 * $Header: panlys.vrf.pp 3090000.1 95/09/05 15:17:23 wyim Generic<base> $ Copyr (c) 1992 Oracle
 */
/***************************************************************************
NAME
    panlys.vrf

FUNCTION
    Common product version analysis, relink and db action determination
    code used in *.vrf scripts.

NOTES
    References the following globol variables:
	Analyze_Version_Prompt
	Do_Upgrade_Prompt, Do_Upgrade_Content, Do_Upgrade_Help
	Inst_Action, Inst_Normal, Inst_Maintain, Inst_Force_Fresh,
		Inst_Force_Upgrade, Inst_Per_Product.

    References the following variables local to the product name space:
        product_label		
        depend_size		

    Sets the following variables local to product name space that control 
    the script execution flow:
        do_load		
        do_upgrade		
        do_relink	
        do_db_actions		

CREATED
    PKu 	07/26/92

MODIFIED 
    JDonham 08/18/94  Bug 199720: If the user selected Inst_DB_Upgrade, don't
                        show the _db_act_list dialog unless the script was
			internally called.

    ERuben  10/05/93  Bug 181945: Set do_load from tape to true if the
                        current version being load does not equal the version
                        in sw_state_file.

***************************************************************************/
   {/* panlys.vrf */

    local_relink_install_failed=list();
    patch_install=false;
    do_dei_patch=false;
    do_load=false;
    do_upgrade=false;
    do_relink=false;
    do_db_actions=false;
    do_prod_admin=false;
    do_migrate=false;

    is_upgrade=false;
    query_db_action=false;

    _db_act_list=DB_Action_Full_List;
    _db_act_help=DB_Action_Full_Help;

    current_version = product_version(product);
    installed_version = "UNKNOWN";

    plocation=product_location(product);
    pfname=product_file_name(product);
    sw_state_file="%Stage_Home%/%plocation%/%pfname%.SW";
    dei_file="%Stage_Home%/%plocation%/%pfname%.dei";
    cmpr_dei_file="%Stage_Home%/%plocation%/%pfname%.dei_";
    map_file="%Stage_Home%/%plocation%/%pfname%.map";
    patch_prd_file="%Stage_Home%/%plocation%/PARTIAL.prd";

    ui_product(product_label);
    ui_action("");

    /*
     * Add product to list for loading from tape or CD into stage.
     *
     * JDONHAM: the '__' hack shouldn't be needed any more, since
     * unix.pvf.pp is now fixed to remove duplicate tape blocks.
     */
    add(Load_Product_List, product);

    /*
     * Do not do any product analysis if this ORAINST session is for
     * building stage or loading doc only.
     */
    if (Build_Stage_Only || Install_Doc_Only)
        return(depend_size);

    /*
    ** Determine if this product is a patch
    ** If this is a patch release, we take different actions
    ** ex. relinking is forced, partial.prdO is NOT deleted, etc.
    */
    if (exists(patch_prd_file))
      Patch_Install=TRUE;


    if ((Inst_Action==Inst_Fresh) || (Inst_Action==Inst_SW) ||
	(Migrate_Action==Migrate_SW_Inst))
    {
	/* This is an installation, reinstallation, or upgrade based on
	   unix.rgs.  Perform product analysis */
        /*
         * check version compatibility.
         */
        ui_action(instantiate(Analyze_Version_Prompt));

        if (not(registered(product_name(product))))
	{
	    /* Fresh install -- load files */
            if (not(Patch_Install))
              do_load = true;
            else
              do_load = yesno_dialog(instantiate(Do_Patch_Prompt),false,
                                     Do_Patch_Content,instantiate(Do_Patch_Help));
		}
        else
        {
            registry = registration(product_name(product));
            installed_version = registry_version(registry);

            if (earlier_version(registry,current_version))
	    {
		/* if do upgrade, load files and set the do_upgrade flag */
                do_load = yesno_dialog(instantiate(Do_Upgrade_Prompt),
                                        Do_Upgrade_Content,
                                        instantiate(Do_Upgrade_Help));
		is_upgrade = do_load;
		    }
            else if (not(internally_called))
	    {
		/* if do reinstall (user explicitly selected the product), 
		   load files */
                do_load =  yesno_dialog(instantiate(Reinstall_Prompt), false,
					Reinstall_Content);
		    }
	    else
	      ui_action(instantiate(Already_Installed_Msg));
	        }

        /*
        ** This basically checks to see if the product is already load during
        ** a Fresh Install.  Product might be already loaded because of a
        ** partial install which was aborted due to failure.  If the product
        ** is already loaded from tape, we give the option of skipping it.
        ** NOTE: this should be enhanced to take care of build_stage_only,
        **       possibly in a different 'if' block to avoid problems regarding
        **       removing do_load from the following 'if' block
        */
	if (Tape_Load && do_load)
        {
	    if (not(exists(sw_state_file)))
	        do_load_from_tape=true;
	    else
	    {
	        /* Software appears to be already loaded and untouched in
	           stage home.  Ask the user if reload into stage home */
	        {
		        version_in_stage=translate("VERSION", sw_state_file, "=");

		        if (version_in_stage == current_version)
                {
		            do_load_from_tape=yesno_dialog(
				        instantiate(Load_from_Tape_Prompt), false,
				        Load_from_Tape_Content,
				        instantiate(Load_from_Tape_Help));
	                } else
                {
                    /*
                     * Bug 181945:
                     * If we've reached here then sw_state_file existed, but
                     * the version number is not equal to the current version.
                     * This situation would indicate that we are using the 
                     * same stage home as the last version, without having
                     * removed the last version.  This would happen if we
                     * installed the last version with Keep_Stage equal to 
                     * true, or if this particular product was never installed
                     * from the previous release.
                     */
                    do_load_from_tape = true;
	                } /*if (version_in_stage == current_version)*/
		        }
		        [   'UNBOUND_ENVIRONMENT_VARIABLE: { do_load_from_tape=true; }]
		    }

        if (not(do_load_from_tape)) extract(Load_Product_List, product);
		}

        /*
        ** LATER:
        ** We should add some code here to terminate the install if we are
        ** installing from temporary/permanent staging area and the SW state
        ** file is not present.  We'd have to 'if' out floppy and CDROM
        ** permanent staging areas.  This also creates a problem for testing
        ** since a permanent staging area is harder to simulate with a
        ** SHIPHOME.
        */

        if (not(do_load))
        {
          if (member(Load_Product_List, product))
            extract(Load_Product_List, product);
	        }
        else
        {
          /*
          ** Create DB objects if doing complete fresh install; do
          ** product admin if loading files
          */
          do_prod_admin = true;
          do_relink = Relink_All;

          if (Inst_Action==Inst_Fresh)
          {
            if (not(empty(DB_Startup_Failed)))
            {
              modify("", "  (%product_label%): S/W install only (DB action deactivated due to DB creation/startup failure.", Install_Log);
	            }
            else
            {
              do_db_actions=true; do_upgrade=is_upgrade;
	            }
	          }

          /*
          ** If this is a patch install, force relinking on.
          ** If do_relink is not already TRUE at this point, inform
          ** the user we are forcing it to be TRUE.
          */
          if (Patch_Install && not(do_relink))
          {
            do_relink=TRUE;
            information_dialog(instantiate(patch_relink_prompt),
                               patch_relink_content,patch_relink_help);
	          }
	        }
	    } 
    else if (Inst_Action==Inst_DB_New)
    {
      if (not(internally_called))
      {
        /*
        ** The user selected this product to have its DB objects created.
        */
        do_db_actions=true; 
	      }
      else
      {
        /*
        ** The product the user selected relies on this product being
        ** installed.
        */
        query_db_action=true;
	      }
	    }
    else if (Inst_Action==Inst_DB_Upgrade)
    {
      /*
       * Bug 199720:
       *
       * The user has already chosen Inst_DB_Upgrade, so we should only pop
       * up the _db_act_list dialog if the script was internally called for
       * this product (i.e. the product the user selected relies on this
       * product).
       *
       */

      if (not(internally_called))
	{

	  /*
	   *  _db_act_list=DB_Action_Short_List;
	   *  _db_act_help=DB_Action_Short_Help;
	   *
	   *  Don't need to set these since we won't be putting up the dialog
	   */

	  do_db_actions=true; do_upgrade=true;
		}
      else
	{
	  query_db_action=true;
	        }

	    }
    else if (Inst_Action==Inst_Deinstall)
    {
	signal('CANCEL, instantiate(Deinst_Wrong_Win_Msg));
	    }
    else if (Inst_Action==Inst_V6_To_V7)
    {
        if ((Migrate_Action==Migrate_Util_Inst) ||
	    (Migrate_Action==Migrate_Util_Run) )
	{
	    signal('CANCEL, instantiate(Migrate_Only_Prompt));
		}
        if (Migrate_Action==Migrate_DB)
        {
	    query_db_action=true;
	    if (not(internally_called))
	    {
    	        _db_act_list=DB_Action_Short_List;
    	        _db_act_help=DB_Action_Short_Help;
		    }
	        }
	    }
    else if (Inst_Action==Inst_Deinstall_Patch)
    {
      /*
      ** This session is specifically for deinstalling
      ** a patch.
      **
      ** 1) Make sure the product is installed.
      ** 2) Double check to make sure current version is OLDER
      **    than installed version.
      ** 3) Set do_dei_patch to true since we want to revert
      **    to the old files.
      ** 4) Set do_relink to true since we want to relink
      **    right after we deinstall.
      */
      if (not(registered(product_name(product))))
      {
        information_dialog(instantiate(Not_Installed_Err));
        return(depend_size);
	      }

      registry = registration(product_name(product));
      installed_version = registry_version(registry);

      if (later_version(registry,current_version))
      {
        do_dei_patch=TRUE;
        do_relink=TRUE;
	      }
      else
      {
        do_dei_patch=yesno_dialog(instantiate(Do_Dei_Patch_Prompt),false,
                                  Do_Dei_Patch_Content,
                                  instantiate(Do_Dei_Patch_Help));
        if (do_dei_patch)
          do_relink=TRUE;
	      }
	    }
    else if (Inst_Action==Inst_Maint)
    {
        /*
         * If this ORAINST session is for creating DB, relink executables,
	 * and/or product administration, then does the following:
	 *
	 * - if user selected "product admin", then do it only if the script
	 *   is not internally called.
	 * - if user selected "product relink", then do it only if the script
	 *   is not internally called.
	 * - if user selected "DB objects create/upgrade", then prompt the user
	 *   whether he wants to create/upgrade/do nothing.
         */
        /*
        ** We don't want to produce the warning error for dbup or __dbupload
        */
        product_title=product_name(product);
        if ((not(registered(product_title))) && 
            (product_title != "dbup") &&
            (product_title != "__dbupload"))
	{
          information_dialog(instantiate(Not_Installed_Err));
          return(depend_size);
		}

	/* take actions only if externally invoked */
	if (not(internally_called)) 
	{
	    if (member(Maint_Action, Maint_Prod_Admin))
	        do_prod_admin=true;

	    if (member(Maint_Action, Maint_Relink))
	        do_relink=true;

	    if (member(Maint_Action, Maint_DB_Obj))
	    {
	        query_db_action=true;
	        _db_act_list=DB_Action_Short_List;
	        _db_act_help=DB_Action_Short_Help;
		    }
		}
	    }
    else
	signal('failure, instantiate("Unexpected Inst_Action value: %Inst_Action%"));

    if (has_db_objects && query_db_action)
    {
        db_action=single_selection_dialog(instantiate(DB_Action_Prompt),
			_db_act_list, DB_Action_Content, _db_act_help);
        if (db_action==DB_Action_Create)
        {
	    do_db_actions=true; do_upgrade=false;
	        }
        else if (db_action==DB_Action_Upgrade)
        {
	    do_db_actions=true; do_upgrade=true;
	        }
        else if (db_action==DB_Action_No) 
        { 
	    do_db_actions=false; do_upgrade=false;
		} 
        else 
	    signal('failure, instantiate("Unexpected db_action value: %db_action%"));
	    }

    if ((Migrate_Action==Migrate_DB) && do_upgrade) do_migrate=true;

    modify("", "  (%product_label%):", Install_Log);
    modify("", "    do_load=%do_load%; do_relink=%do_relink%; do_db_actions=%do_db_actions%; do_upgrade=%do_upgrade%", Install_Log);
    modify("", "    do_migrate=%do_migrate%; do_prod_admin=%do_prod_admin%; has_db_objects=%has_db_objects%; is_upgrade=%is_upgrade%", Install_Log);
    modify("", "    OraDoc=%OraDoc%; Do_Install_Cd_Doc=%Do_Install_CD_Doc%", Install_Log);
	   }/*end of panlys.vrf*/


    if (not(empty(RDBMS_Opts_List)))
         
	{ /*_LOG_MSG ( rdbms_opts_chosen_msg , Install_Log ) */ 
	  _msg = rdbms_opts_chosen_msg ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}

    /* If going to install s/w and/or relink executables, then
     * make sure no instances associated w/ ORACLE_HOME are running.
     * Note:  This only needs to be done if we are installing in a
     *        pre-existing ORACLE_HOME.  If we are installing in an
     *        OFA_Compliant environment, into a new ORACLE_HOME, and
     *        executables in an old ORACLE_HOME are running the database,
     *        then we do not need to shutdown the pre-existing databases.
     *        For example, if the databases were created by 7.0.12, and
     *        the executables are in $ORACLE_BASE/product/7.0.12/bin, and
     *        we are installing the 7.0.13 executables in 
     *        $ORACLE_BASE/product/7.0.13/bin, then we don't need to make 
     *        sure the database is shutdown.  We achieve this by only looking
     *        in the new ORACLE_HOME for sgadef files.
     */
    if (do_load || do_relink || not(empty(RDBMS_Opts_List)))
    {
        inst_running=true;
        while (inst_running)
        {
            /*
             * If the database instance(s) already is running, then ask the user
             * to shut it down.  If the user doesn't want to shut it down, then
             * exit. 
             */
             
	{ /*_LOG_MSG ( inst_down_mesg , Install_Log ) */ 
	  _msg = inst_down_mesg ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
	    if (Floppy_Install)
		 
	{ /*_SYS ( "%Oracle_Home%/floppyinst/dbsup.sh" , inst_down_mesg ) */ 
	  _cmd = "%Oracle_Home%/floppyinst/dbsup.sh" ; _exe = "%Oracle_Home%/floppyinst/dbsup.sh" ; _com = inst_down_mesg ; _help = Sys_Macro_Help ; 
	  
	{ /*_LOG_SEL ( _cmd ,  _log_file ) */ 
	    _log_file = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      _log_file = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      _log_file = Make_Log ; 
	} 
	  
	  { { /*_SYS_RETRY*/ 
	    _result = "Retry" ; 
	    _log_file = _log_file ; 
	    problem_holdfile = instantiate ( Sys_Macro_Holdfile ) ; 
	    while ( _result == "Retry" ) { 
	      problem_holdfile = instantiate ( Sys_Macro_Holdfile ) ; 
	      modify ( "" , log_divider ( ) , _log_file ) ; 
	      modify ( "" , "Action:  %_com%" , _log_file ) ; 
	      modify ( "" , "Command: (%_cmd%), Out,Err=%_log_file%" , _log_file ) ; 
	      remove_file ( problem_holdfile ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      _stat = spawn ( _exe , problem_holdfile , problem_holdfile ) ; 
	      modify ( "" , "Status:  %_stat%" , _log_file ) ; 
	      if ( _stat != 0 ) { 
	      modify ( "" , "(( OIERR-SYS: %_cmd% ))" , _log_file ) ; 
	      } 
	      _s = _stat ; _result = "Ok" ; 
	      while ( ( _s != 0 ) || ( Sys_Option_ProcessDflt && ( _result == "Process" ) ) ) { 
	        _result = full_retry_dialog ( instantiate ( Sys_Macro_Prompt ) , 
	  	      problem_holdfile , true , Sys_Option_Ignore , true , 
	  	      instantiate ( Sys_Macro_Content ) , instantiate ( _help ) ) ; 
	        if ( Sys_Option_ProcessDflt && ( _result == "Process" ) ) 
	          
		  { /*_SYS_PROCESS_ERROR*/ 
		    { problem_header  = instantiate ( Problem_Header_Dflt ) ; 
	  	      problem_text    = instantiate ( Sys_Macro_Prompt ) ; 
	    	      problem_action  = _com ; 
		      execute ( "problem.ins" ) ; 
		    } 
		    [ 'DEFAULT : { information_dialog ( problem_error_info , problem_error_info_content , problem_error_info_help ) ; } ] 
		  } /*End SYS_PROCESS_ERROR*/ 
	        _s = 0 ; 
	      } 
	      
	    { modify ( "" , "{" , _log_file ) ; 
	      create_file ( problem_holdfile ) ; /*To stop sed raising error*/ 
	      _pfx = "OIERR-SYS" ; if ( _result == "Ok" ) _pfx = "Ok" ; 
	      spawn ( instantiate ( "sed -e 's/^/| %%_pfx%%: /' < %%problem_holdfile%% >>%%_log_file%%" ) ) ; 
	      modify ( "" , "}" , _log_file ) ; } 
	    [ 'DEFAULT : { } ]  
	      modify ( "" , instantiate ( "Result:  %%_result%%" ) , _log_file ) ; 
	    } 
	    modify ( "" , log_divider ( ) , _log_file ) ; 
	    Sys_Option_Ignore = true ; 
	    Sys_Option_ProcessDflt = true ; 
	   } 
	   [ 'CANCEL : { modify ( "" , "Result:  Cancel" , _log_file ) ; 
	      		signal ( 'CANCEL , Sys_Macro_Cancel_Prompt ) ; } ] 
	  } /*End _SYS_RETRY*/ 
	} /*End SYS*/
	    else
                 
	{ /*_SYSTEM ( "%Stage_Home%/rdbms/install/rdbms/dbsup.sh" , inst_down_mesg , status ) */ 
	  _cmd = "%Stage_Home%/rdbms/install/rdbms/dbsup.sh" ; _com = inst_down_mesg ; 
	   
	{ /*_LOG_SEL ( _cmd ,  outfile ) */ 
	    outfile = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      outfile = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      outfile = Make_Log ; 
	} 
	  _out = outfile ; _err = outfile ; 
	  modify ( "" , log_divider ( ) , outfile ) ; 
	  modify ( "" , "Action:  %_com%" , _out ) ; 
	  modify ( "" , "Command: (%_cmd%), Out=%_out%, Err=%_err%" , _out ) ; 
	  modify ( "" , "{" , _out ) ; 
	  _stat = spawn ( _cmd , _out , _err ) ; 
	  modify ( "" , "}" , _out ) ; 
	  modify ( "" , "Status:  %_stat%" , _out ) ; 
	  if ( _stat != 0 ) { 
	  modify ( "" , "(( OIERR-SYSTEM: %_cmd% ))" , _out ) ; 
	  } 
	  status = _stat ; 
	  modify ( "" , log_divider ( ) , _out ) ; 
	} /*End SYSTEM*/

/*WGDEBUG*/
status = 0;
            if (status != 0) 
                inst_running=true;
            else
                inst_running=false;

            if (inst_running && (not(do_upgrade)))
            {
                 
	{ /*_LOG_MSG ( instantiate ( inst_exist_echo ) , Install_Log ) */ 
	  _msg = instantiate ( inst_exist_echo ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                 
	{ /*_YESNO_DLG_N ( instantiate ( inst_exist_prompt ) , TRUE , "%pname%.cont_installation" , cont_installation ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.cont_installation" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = TRUE ; ] 
	  } 
	  else 
	    _dflt_bool = TRUE ; 
	  if ( Default_Install ) 
	    cont_installation = _dflt_bool ; 
	  else 
	    cont_installation = YESNO_DIALOG ( instantiate ( inst_exist_prompt ) , _dflt_bool ) ; 
	  if ( cont_installation ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.cont_installation" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( inst_exist_prompt ) ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
                if (cont_installation==false)
                {
                     
	{ /*_LOG_MSG ( user_chooses_to_stop , Install_Log ) */ 
	  _msg = user_chooses_to_stop ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                    signal('CANCEL, user_chooses_to_stop);
                }
            } /* if exists */

            if (exists(sgadef_file))
            {
	        if (do_migrate)
	        {
		    signal('CANCEL, shutdown_for_migrate_info);
	        }
	        else
	        {
	             
	{ /*_YESNO_DLG_N ( shutdown_db_prompt , TRUE , "%pname%.shutdown_db" , shutdown_db ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.shutdown_db" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = TRUE ; ] 
	  } 
	  else 
	    _dflt_bool = TRUE ; 
	  if ( Default_Install ) 
	    shutdown_db = _dflt_bool ; 
	  else 
	    shutdown_db = YESNO_DIALOG ( shutdown_db_prompt , _dflt_bool ) ; 
	  if ( shutdown_db ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.shutdown_db" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = shutdown_db_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
	            if (not(shutdown_db))
	            {
            	        signal('CANCEL, instantiate(db_exists_prompt));
		    } /* if (shutdown_db) */
		    else
		    {
		        /*
		         * shutdown(); Someday, this function will be available.
		         */
		        ui_action(dbshut_msg); 
		         
	{ /*_SYSTEM ( "%Oracle_Home%/rdbms/install/rdbms/shutdown.sh" , dbshut_msg , status ) */ 
	  _cmd = "%Oracle_Home%/rdbms/install/rdbms/shutdown.sh" ; _com = dbshut_msg ; 
	   
	{ /*_LOG_SEL ( _cmd ,  outfile ) */ 
	    outfile = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      outfile = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      outfile = Make_Log ; 
	} 
	  _out = outfile ; _err = outfile ; 
	  modify ( "" , log_divider ( ) , outfile ) ; 
	  modify ( "" , "Action:  %_com%" , _out ) ; 
	  modify ( "" , "Command: (%_cmd%), Out=%_out%, Err=%_err%" , _out ) ; 
	  modify ( "" , "{" , _out ) ; 
	  _stat = spawn ( _cmd , _out , _err ) ; 
	  modify ( "" , "}" , _out ) ; 
	  modify ( "" , "Status:  %_stat%" , _out ) ; 
	  if ( _stat != 0 ) { 
	  modify ( "" , "(( OIERR-SYSTEM: %_cmd% ))" , _out ) ; 
	  } 
	  status = _stat ; 
	  modify ( "" , log_divider ( ) , _out ) ; 
	} /*End SYSTEM*/
		        if (not(status == 0))
		        {
		             
	{ /*_SYS_ERR ( instantiate ( vrf_shutdown_error ) ) */ 
	      _com = instantiate ( vrf_shutdown_error ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
		            signal('CANCEL, instantiate(vrf_shutdown_error));
		        }
		    }
	        } /* !do_migrate */
	    } /* if sgadefSID.dbf exists */
	} /* while (inst_running) */


        {
	 
	{ /*_LOG_MSG ( checking_ulimit_echo , Install_Log ) */ 
	  _msg = checking_ulimit_echo ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
	ulimit=translate("ULIMIT");
        tmp_ulimit="%ulimit%";
        if(tmp_ulimit == "unlimited")
          ulimit=desired_ulimit;
	}
	[   'UNBOUND_ENVIRONMENT_VARIABLE :
	    {    
		ulimit = desired_ulimit;
		information_dialog(ulimit_not_found_info);
	    }
	]

        ulimit=desired_ulimit;
	if (ulimit < desired_ulimit)
	{
	     
	{ /*_ECHO ( ulimit_error_message ) */ 
	  _dummy = ulimit_error_message ; 
	  modify ( "" , ">>> %_dummy%" , Install_Log ) ; 
	}
	    signal('CANCEL, ulimit_error_message);
	} /* if ulimit */

	/*
	 * Protocol Adapters:  Need to take care of the possiblity that
	 * the user wants to allow network connections, but has not asked
	 * for any network protocol adapters to be installed.
	 */

	/*
	 * Construct a list of adapters
	 */
	prod_list = all_products();
	pa_prod_list = list();
        new_pa_prod_list = list();
	while (not(empty(prod_list)))
	{
	    curprod = first(prod_list);
	    prod_list = rest(prod_list);
	    if (unix_product_linking_group(curprod) == "pa")
            {
		add(pa_prod_list, curprod);
                curprod_name = product_interface_label(curprod);
                add(new_pa_prod_list, curprod_name);
            }
	}
        saved_pa_prod_list = list();
        saved_pa_prod_list = pa_prod_list;
	/*
	 * Check registered product list for Protocol Adapters
	 */
	reg_list = all_registrations();
	pa_reg_list = list();
	while (not(empty(reg_list)))
	{
	    curreg = first(reg_list);
	    reg_list = rest(reg_list);
	    if (unix_registry_linking_group(curreg) == "pa")
		add(pa_reg_list, curreg);
	}
	/*
	 * If no registered adapters, and none are selected, look at the 
	 * list of adapters in Stage Home. Ask the customer if they should 
	 * be installed.
	 */
	pa_inst_list = list();
	pa_size = 0;
/*
	if (empty(pa_reg_list) && empty(Selected_PAs_List)) 
	{
            _dflt_list = list(curprod_name);
            pa_list = MULTIPLE_SELECTION_DIALOG(inst_pa_prompt, new_pa_prod_list, _dflt_list, inst_pa_content, "");
            while(not(empty(new_pa_prod_list)))
            {
                curpa=first(new_pa_prod_list);
                new_pa_prod_list=rest(new_pa_prod_list);
                if(member(pa_list, curpa))
                {
                    temp_pa_prod_list = list();
                    temp_pa_prod_list = saved_pa_prod_list;
                    found = 0;
                    while(not(empty(temp_pa_prod_list)))
                    {
                         temppa = first(temp_pa_prod_list);
                         temp_pa_prod_list = rest(temp_pa_prod_list);
                         if(product_interface_label(temppa) == curpa)
                         {
                            found = 1;
                            break();
                         }
                    }
                    if(found == 1)
                    {
                        pa_size=verify(temppa);
                        depend_size = depend_size + pa_size;
                        add(pa_inst_list, temppa);
                    }
                }
            }
	}
*/

    }  /* if do_load || do_relink */

    ui_product(product_label);
    ui_action("");

    /* If the session is Creating New DB Objects, then:

       The idea is that we want to allow the user to install tools
       db objects against an existing running instance.  We also
       want to allow but not require the user to create a database 
       if he wants to (but only thru explicitly selecting RDBMS).
     */ 
    if (not(do_load) && do_db_actions && not(do_upgrade))
    {
	if (internally_called)
	{
          /* Vivek --- We don't need to cancel operation over here.
             Just setting do_db_actions=false should do the trick.
            if (not(exists(sgadef_file)))
	    {
	        information_dialog(inst_not_running_msg,
			inst_not_running_content, inst_not_running_help); 
	        signal('cancel);
	    }
	    else
         */
		do_db_actions=false; 
	}
        else
	{
	    if (exists(sgadef_file))
                signal('CANCEL, instantiate(db_exists_prompt));
	}
    }


    /* Get the dba group name and determine if relinking is necessary */
    mark
    if (do_load || do_relink || (not(empty(RDBMS_Opts_List))))
    {
        /*
         * Bug 162167: Will check what DBA group is set to in
         * $ORACLE_HOME/rdbms/lib/config.c before deciding whether
         * or not to relink.  No reason to do this if do_load is true,
         * since we will be loading a new oracle executable with 
         * 'dba' as the dba group.
         */
        config_dba_group_set = false;
        config_dba_group = "";
        if (not(do_load))
        {
             
	{ /*_SYSTEM ( create_dba_group_file , "Putting %config_c%'s dba group in temporary file." , status ) */ 
	  _cmd = create_dba_group_file ; _com = "Putting %config_c%'s dba group in temporary file." ; 
	   
	{ /*_LOG_SEL ( _cmd ,  outfile ) */ 
	    outfile = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      outfile = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      outfile = Make_Log ; 
	} 
	  _out = outfile ; _err = outfile ; 
	  modify ( "" , log_divider ( ) , outfile ) ; 
	  modify ( "" , "Action:  %_com%" , _out ) ; 
	  modify ( "" , "Command: (%_cmd%), Out=%_out%, Err=%_err%" , _out ) ; 
	  modify ( "" , "{" , _out ) ; 
	  _stat = spawn ( _cmd , _out , _err ) ; 
	  modify ( "" , "}" , _out ) ; 
	  modify ( "" , "Status:  %_stat%" , _out ) ; 
	  if ( _stat != 0 ) { 
	  modify ( "" , "(( OIERR-SYSTEM: %_cmd% ))" , _out ) ; 
	  } 
	  status = _stat ; 
	  modify ( "" , log_divider ( ) , _out ) ; 
	} /*End SYSTEM*/
             
	{ /*_LOG_MSG ( "status from %create_dba_group_file%: %status%." , Install_Log ) */ 
	  _msg = "status from %create_dba_group_file%: %status%." ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
            if (status == 0)
            {
                {
                     
	{ /*_LOG_MSG ( "Translating dba_group_idx" , Install_Log ) */ 
	  _msg = "Translating dba_group_idx" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                    config_dba_group = translate(dba_group_idx, 
                        dba_group_tmp_file, "=");
                    remove_file(dba_group_tmp_file);
                     
	{ /*_LOG_MSG ( "Translate of dba_group_idx succeeded" , Install_Log ) */ 
	  _msg = "Translate of dba_group_idx succeeded" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                }
                [ 'UNBOUND_ENVIRONMENT_VARIABLE: config_dba_group="";
                ]
                if (config_dba_group != "")
                {
                    default_dba_group = config_dba_group;
                    config_dba_group_set = true;
                }
            } /* if (not(status)) */
        } /* if (not(do_load)) */
         
	{ /*_LOG_MSG ( "config_dba_group: %config_dba_group%" , Install_Log ) */ 
	  _msg = "config_dba_group: %config_dba_group%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
         
	{ /*_LOG_MSG ( "config_dba_group_set: %config_dba_group_set%" , Install_Log ) */ 
	  _msg = "config_dba_group_set: %config_dba_group_set%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}

        /* Get the dba group from the user. */
        group_list=unix_get_groups();

        /* This is to circumvent a getgroups problem on some platforms */
        if (not(member(group_list, Group)))
            add(group_list, Group);

        /* If the user the a member of "default_dba_group" group, use that 
           as the default.  Otherwise use user's primary group as the default */
        if (member(group_list, default_dba_group))
            dflt_grp=default_dba_group;
        else 
            dflt_grp=Group;

         
	{ /*_SINGLE_SELECT_DLG ( dba_group_prompt , group_list , dflt_grp , dba_group_content , dba_group_help , "%pname%.dba_group" , dba_group ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.dba_group" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = dflt_grp ; ] 
	  } 
	  else 
	    _dflt_str = dflt_grp ; 
	  if ( Default_Install ) 
	    dba_group = _dflt_str ; 
	  else 
	    dba_group = SINGLE_SELECTION_DIALOG ( dba_group_prompt , group_list , _dflt_str , dba_group_content , dba_group_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.dba_group" , dba_group , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "SINGLE_SELECT" ) */ 
	  _dlg_type = "SINGLE_SELECT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = dba_group_prompt ; _answer = dba_group ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	default_oper_group=dba_group;
	oper_group=default_oper_group;

	while(TRUE)
	{
	 
	{ /*_TEXT_DLG ( oper_group_prompt , default_oper_group , oper_group_content , oper_group_help , "%pname%.oper_group" , oper_group ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.oper_group" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = default_oper_group ; ] 
	  } 
	  else 
	    _dflt_str = default_oper_group ; 
	  if ( Default_Install ) 
	    oper_group = _dflt_str ; 
	  else 
	    oper_group = TEXT_DIALOG ( oper_group_prompt , _dflt_str , oper_group_content , oper_group_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.oper_group" , oper_group , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = oper_group_prompt ; _answer = oper_group ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	status1 = 1;	
	  
	{ /*_SYSTEM ( instantiate ( "%SH%/rdbms/install/rdbms/verf_grp.sh %oper_group%" ) , instantiate ( check_grp_mesg ) , status ) */ 
	  _cmd = instantiate ( "%SH%/rdbms/install/rdbms/verf_grp.sh %oper_group%" ) ; _com = instantiate ( check_grp_mesg ) ; 
	   
	{ /*_LOG_SEL ( _cmd ,  outfile ) */ 
	    outfile = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      outfile = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      outfile = Make_Log ; 
	} 
	  _out = outfile ; _err = outfile ; 
	  modify ( "" , log_divider ( ) , outfile ) ; 
	  modify ( "" , "Action:  %_com%" , _out ) ; 
	  modify ( "" , "Command: (%_cmd%), Out=%_out%, Err=%_err%" , _out ) ; 
	  modify ( "" , "{" , _out ) ; 
	  _stat = spawn ( _cmd , _out , _err ) ; 
	  modify ( "" , "}" , _out ) ; 
	  modify ( "" , "Status:  %_stat%" , _out ) ; 
	  if ( _stat != 0 ) { 
	  modify ( "" , "(( OIERR-SYSTEM: %_cmd% ))" , _out ) ; 
	  } 
	  status = _stat ; 
	  modify ( "" , log_divider ( ) , _out ) ; 
	} /*End SYSTEM*/
/* WGDEBUG */
status = 0;
	if (status == 0)
	{
		 
	{ /*_LOG_MSG ( instantiate ( grp_exist_mesg ) , Install_Log ) */ 
	  _msg = instantiate ( grp_exist_mesg ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
		break();
	} else {
		 
	{ /*_LOG_MSG ( instantiate ( grp_non_exist_mesg ) , Install_Log ) */ 
	  _msg = instantiate ( grp_non_exist_mesg ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
		status2=yesno_dialog(instantiate(non_exist_grp_prompt), 
			FALSE,  instantiate(non_exist_grp_content), 
			instantiate(non_exist_grp_help));
		if(status2)
			{
			 
	{ /*_LOG_MSG ( instantiate ( ok_grp_mesg ) , Install_Log ) */ 
	  _msg = instantiate ( ok_grp_mesg ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
			break();
			}/*if(status2)*/
		}/*(status1==0)*/
		Default_Install=FALSE;
	} /*while(TRUE)*/
	Default_Install=Def_Inst_sav;
        mark
        if ((dba_group != default_dba_group) || (oper_group != default_oper_group))
        {
            do_relink=true;
            create_new_config_file=true;
             
	{ /*_LOG_MSG ( instantiate ( non_default_group_info ) , Install_Log ) */ 
	  _msg = instantiate ( non_default_group_info ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
            if (not(Default_Install))
            {
                information_dialog(instantiate(non_default_group_info));
            }
        } /* if ((dba_group != default_dba_group)|| not(config_dba_group_set) */
    } 

    /* Creating a new database */
    mark
    if (do_db_actions && (not(do_upgrade)) && (not(do_migrate)))
    {
        /*dbname is now equal to the first SID asked by the installer
          in unix.stp. Sid has to be asked in unix.stp to be in the
          global namespace so that it is picked up by dbup.ins whether
          it's called from svrmgr or rdbms. Line added by VIVEK */

        dbname = "%Oracle_Sid%";
        Default_Install=Def_Inst_sav;

DfsInstall = FALSE;
        if(DfsInstall)
        {
             Type_Of_Device = RD_Based;
        }
        else
        {
            type_of_file_list = list(File_Based, RD_Based);
            _dflt_str = File_Based;
            Type_Of_Device = SINGLE_SELECTION_DIALOG( type_of_files_prompt, type_of_file_list, _dflt_str, type_of_files_content, type_of_files_help);
        }
        Oracle_Mount_Point1 = "";
        Oracle_Mount_Point2 = "";
        Oracle_Mount_Point3 = "";

        /* Setting up default file names */
        if(Type_Of_Device == File_Based)
        {
		mt_point1_dflt = "";
		mt_point2_dflt = "";
		mt_point3_dflt = "";
             
	{ /*_YESNO_DLG ( no_of_mt_points_prompt , TRUE , no_of_mt_points_content , no_of_mt_points_help , "%pname%.no_of_mt_points" , Three_Mt_Points ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.no_of_mt_points" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = TRUE ; ] 
	  } 
	  else 
	    _dflt_bool = TRUE ; 
	  if ( Default_Install ) 
	    Three_Mt_Points = _dflt_bool ; 
	  else 
	    Three_Mt_Points = YESNO_DIALOG ( no_of_mt_points_prompt , _dflt_bool , no_of_mt_points_content , no_of_mt_points_help ) ; 
	  if ( Three_Mt_Points ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.no_of_mt_points" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = no_of_mt_points_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
	 
	{ /*_LOG_MSG ( "Control files will be distributed over following mount points:" , Install_Log ) */ 
	  _msg = "Control files will be distributed over following mount points:" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
           if(Three_Mt_Points)
           {
		 if (exists(User_Dflt_File))
		 {
			temp_dflt = translate ("%pname%.Oracle_Mount_Point1" , User_Dflt_File , "=");
			mt_point1_dflt = "%temp_dflt%";
		 }
                        ['UNBOUND_ENVIRONMENT_VARIABLE : _mt_point1_dflt = "";]

                 Oracle_Mount_Point1 = text_dialog(mt_point1_prompt, mt_point1_dflt, mt_point1_content, mt_point_help);
                 if(not(Oracle_Mount_Point1 == ""))
		 {
			temp_list=explode(Oracle_Mount_Point1, "/", TRUE);
                       if(not(first(temp_list) == "/"))
                       {
                          information_dialog("Pathnames must be 'absolute' (i.e., begin with the root directory '/' and contain all directory levels).", mt_point1_content, mt_point_help);
			  Oracle_Mount_Point1 = "";
		       }
		 }
		 if(not(Oracle_Mount_Point1 == ""))
                 if(not(exists(Oracle_Mount_Point1)))
                 {
                      {make_directory(Oracle_Mount_Point1);}
                      [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                        {
                           information_dialog(create_dir_failed, create_dir_failed_content, create_dir_failed_help);
                           Oracle_Mount_Point1="";
                        }
                      ]
                 }

             while(Oracle_Mount_Point1 == "")
             {
                 Oracle_Mount_Point1 = text_dialog(mt_point1_prompt, mt_point1_dflt, mt_point1_content, mt_point_help);
                 if(Oracle_Mount_Point1 == "")
                     information_dialog(mt_empty_info);
                 if(not(exists(Oracle_Mount_Point1)))
                 {
                      {make_directory(Oracle_Mount_Point1);}
                      [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                        {
                           information_dialog(create_dir_failed, create_dir_failed_content, create_dir_failed_help);
                           Oracle_Mount_Point1="";
                        }
                      ]
                 }
             }

                 if (exists(User_Dflt_File))
                 {
                        temp_dflt = translate ("%pname%.Oracle_Mount_Point2" , User_Dflt_File , "=");
			mt_point2_dflt = "%temp_dflt%";
                 }
                        ['UNBOUND_ENVIRONMENT_VARIABLE : _mt_point2_dflt = "";]

                 Oracle_Mount_Point2 = text_dialog(mt_point2_prompt, mt_point2_dflt, mt_point2_content, mt_point_help);
                 if(not(Oracle_Mount_Point2 == ""))
                 {
                        temp_list=explode(Oracle_Mount_Point2, "/", TRUE);
                       if(not(first(temp_list) == "/"))
                       {
                          information_dialog("Pathnames must be 'absolute' (i.e., begin with the root directory '/' and contain all directory levels).", mt_point1_content, mt_point_help);
                          Oracle_Mount_Point2 = "";
                       }
                 }
                 if(not(Oracle_Mount_Point2 == ""))
                    if(not(exists(Oracle_Mount_Point2)))
                    {
                        {make_directory(Oracle_Mount_Point2);}
                         [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                           {
                             information_dialog(create_dir_failed);
                             Oracle_Mount_Point2="";
                           }
                         ]
                     }

             while(Oracle_Mount_Point2 == "")
             {
                    Oracle_Mount_Point2 = text_dialog(mt_point2_prompt, "",mt_point2_content, mt_point_help);
                    if(Oracle_Mount_Point2 == "")
                       information_dialog(mt_empty_info);
                    else
                    if(not(exists(Oracle_Mount_Point2)))
                    {
                        {make_directory(Oracle_Mount_Point2);}
                         [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                           {
                             information_dialog(create_dir_failed);
                             Oracle_Mount_Point2="";
                           }
                         ]
                     }
               }

                 if (exists(User_Dflt_File))
                 {
                        temp_dflt = translate ("%pname%.Oracle_Mount_Point3" , User_Dflt_File , "=");
			mt_point3_dflt = "%temp_dflt%";
                 }
                        ['UNBOUND_ENVIRONMENT_VARIABLE : _mt_point3_dflt = "";]
                 Oracle_Mount_Point3 = text_dialog(mt_point3_prompt, mt_point3_dflt, mt_point3_content, mt_point_help);
                 if(not(Oracle_Mount_Point3 == ""))
                 {
                        temp_list=explode(Oracle_Mount_Point3, "/", TRUE);
                       if(not(first(temp_list) == "/"))
                       {
                          information_dialog("Pathnames must be 'absolute' (i.e., begin with the root directory '/' and contain all directory levels).", mt_point1_content, mt_point_help);
                          Oracle_Mount_Point3 = "";
                       }
                 }
                 if(not(Oracle_Mount_Point3 == "")) 
                      if(not(exists(Oracle_Mount_Point3)))
                      {
                          {make_directory(Oracle_Mount_Point3);}
                           [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                            {
                               information_dialog(create_dir_failed);
                               Oracle_Mount_Point3="";
                             }
                           ]
                       }

               while(Oracle_Mount_Point3 == "")
               {
                      Oracle_Mount_Point3 = text_dialog(mt_point3_prompt, "",mt_point3_content, mt_point_help);
                      if(Oracle_Mount_Point3 == "")
                        information_dialog(mt_empty_info);
                      else
                      if(not(exists(Oracle_Mount_Point3)))
                      {
                          {make_directory(Oracle_Mount_Point3);}
                           [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                            {
                               information_dialog(create_dir_failed);
                               Oracle_Mount_Point3="";
                             }
                           ]
                       }
               }

		if (exists(User_Dflt_File))
                {
                    modify("%pname%.Oracle_Mount_Point1" , Oracle_Mount_Point1 , User_Dflt_File , "=") ;
                    modify("%pname%.Oracle_Mount_Point2" , Oracle_Mount_Point2 , User_Dflt_File , "=") ;
                    modify("%pname%.Oracle_Mount_Point3" , Oracle_Mount_Point3 , User_Dflt_File , "=") ;
		}
		 
	{ /*_LOG_MSG ( "The first mount point:  %Oracle_Mount_Point1%" , Install_Log ) */ 
	  _msg = "The first mount point:  %Oracle_Mount_Point1%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                 
	{ /*_LOG_MSG ( "The second mount point: %Oracle_Mount_Point2%" , Install_Log ) */ 
	  _msg = "The second mount point: %Oracle_Mount_Point2%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                 
	{ /*_LOG_MSG ( "The third mount point:  %Oracle_Mount_Point3%" , Install_Log ) */ 
	  _msg = "The third mount point:  %Oracle_Mount_Point3%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}

            }
            else
            {
                 if (exists(User_Dflt_File))
                 {
                        temp_dflt = translate ("%pname%.Oracle_Mount_Point1" , User_Dflt_File , "=");
			mt_point1_dflt = "%temp_dflt%";
                 }
                        ['UNBOUND_ENVIRONMENT_VARIABLE : _mt_point1_dflt = "";]
                 Oracle_Mount_Point1 = text_dialog(mt_point_prompt, mt_point1_dflt, mt_point1_content, mt_point_help);
                 if(not(Oracle_Mount_Point1 == ""))
                 {
                        temp_list=explode(Oracle_Mount_Point1, "/", TRUE);
                       if(not(first(temp_list) == "/"))
                       {
                          information_dialog("Pathnames must be 'absolute' (i.e., begin with the root directory '/' and contain all directory levels).", mt_point1_content, mt_point_help); 
                          Oracle_Mount_Point1 = "";
                       }
                 }
                 if(not(Oracle_Mount_Point1 == ""))
                   if(not(exists(Oracle_Mount_Point1)))
                   {
                        {make_directory(Oracle_Mount_Point1);}
                        [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                          {
                             information_dialog(create_dir_failed);
                             Oracle_Mount_Point1="";
                          }
                        ]
                   }

                while(Oracle_Mount_Point1 == "")
                {
                   Oracle_Mount_Point1 = text_dialog(mt_point_prompt, mt_point1_dflt, mt_point1_content, mt_point_help);
                   if(Oracle_Mount_Point1 == "")
                      information_dialog(mt_empty_info);
                   else
                   if(not(exists(Oracle_Mount_Point1)))
                   {
                        {make_directory(Oracle_Mount_Point1);}
                        [ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
                          {
                             information_dialog(create_dir_failed);
                             Oracle_Mount_Point1="";
                          }
                        ]
                   }
                }
            }
                if (exists(User_Dflt_File))
                {
                    modify("%pname%.Oracle_Mount_Point1" , Oracle_Mount_Point1 , User_Dflt_File , "=") ;
		}
                 
	{ /*_LOG_MSG ( "User selected to have one mount point: %Oracle_Mount_Point1%" , Install_Log ) */ 
	  _msg = "User selected to have one mount point: %Oracle_Mount_Point1%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}

      } /* If type_of_device == File_Based */

      admin_dir="%Oracle_Base%/admin/%dbname%";
      if (Type_Of_Device == File_Based)
      {
            make_directory("%Oracle_Mount_Point1%/oradata");
            make_directory("%Oracle_Mount_Point1%/oradata/%dbname%");
            if(Oracle_Mount_Point2 != "")
            {
               make_directory("%Oracle_Mount_Point2%/oradata");
               make_directory("%Oracle_Mount_Point2%/oradata/%dbname%");
            }
            if(Oracle_Mount_Point3 != "")
            {
               make_directory("%Oracle_Mount_Point3%/oradata");
               make_directory("%Oracle_Mount_Point3%/oradata/%dbname%");
            }
            data_dir1 ="%Oracle_Mount_Point1%/oradata/%dbname%";
            if(Oracle_Mount_Point2 != "")
               data_dir2 = "%Oracle_Mount_Point2%/oradata/%dbname%";
            else
               data_dir2 = data_dir1;
            if(Oracle_Mount_Point3 != "")
               data_dir3 = "%Oracle_Mount_Point3%/oradata/%dbname%";
            else
               data_dir3 = data_dir1;
      }
      db_id=dbname;
      pfile_dir="%admin_dir%/pfile";
      create_dir="%admin_dir%/create";
      bdump_dir="%admin_dir%/bdump";
      cdump_dir="%admin_dir%/cdump";
      udump_dir="%admin_dir%/udump";
      if (Type_Of_Device == File_Based)
      {
         control1_file_dflt="%data_dir1%/control01.ctl";
         control2_file_dflt="%data_dir2%/control02.ctl";
         control3_file_dflt="%data_dir3%/control03.ctl";
         system_file_dflt  ="%data_dir1%/system01.dbf";
         log1_file_dflt    ="%data_dir1%/redo%db_id%01.log";
         log2_file_dflt    ="%data_dir2%/redo%db_id%02.log";
         log3_file_dflt    ="%data_dir3%/redo%db_id%03.log";
         rbs_file_dflt     ="%data_dir1%/rbs01.dbf";
         temp_file_dflt    ="%data_dir1%/temp01.dbf";
         users_file_dflt   ="%data_dir1%/users01.dbf";
         tools_file_dflt   ="%data_dir1%/tools01.dbf";
      }
      else
      {
	    devprf_dflt = "/dev/vx/rdsk";
            devtmp = "%devprf_dflt%/r%Oracle_Sid%";
            control1_file_dflt="%devtmp%.cntl1";
            control2_file_dflt="%devtmp%.cntl2";
            control3_file_dflt="%devtmp%.cntl3";
            system_file_dflt  ="%devtmp%.system";
            rbs_file_dflt     ="%devtmp%.rbs";
            temp_file_dflt    ="%devtmp%.temp";
            users_file_dflt   ="%devtmp%.user";
            tools_file_dflt   ="%devtmp%.tools";
            log1_file_dflt    = "%devtmp%.redo1_1";
            log2_file_dflt    = "%devtmp%.redo1_2";
            log3_file_dflt    = "%devtmp%.redo1_3";
      }



        pfile_spec="%pfile_dir%/init%Oracle_Sid%.ora";
        modify("PFILE_%Oracle_Sid%", pfile_spec, "%OH%/orainst/pfile.spc", 
            "=");

        orapwd_size_dflt="1"; orapwd_size_min="1";
    	system_size_dflt  ="40M";    system_size_min   ="5M";
    	log1_size_dflt    ="500k";  log1_size_min     ="100k";
    	log2_size_dflt    ="500k";  log2_size_min     ="100k";
    	log3_size_dflt    ="500k";  log3_size_min     ="100k";
    	rbs_size_dflt     ="8M";    rbs_size_min      ="1400k";
    	temp_size_dflt    ="550k";  temp_size_min     ="260k";
    	users_size_dflt   ="1M";    users_size_min    ="200k";
    	tools_size_dflt   ="15M";    tools_size_min    ="1M";

        /* Bug 148646:  Establish filename for crdb<dbname>.sql spool file. */
        create_db_spool_file = "%create_dir%/crdb%dbname%.lst";

        /* begin DB config */
        ui_action(instantiate(DB_Config_Prompt));

	/****************************************************** 
	 * Select character set in which to create the database
	 ******************************************************/
	{   
	    nls_sg=NLS_Subgroup; 
	}
	[   'UNBOUND_VARIABLE: nls_sg=nlsgrp_us; ]

	char_set_others="(Others..)";
	char_set_list=list(
        		"EE8ISO8859P2",	
        		"EL8DEC",
        		"JA16EUC",
        		"KSC5601",
        		"RU8PC855",
        		"US7ASCII",
        		"WE8DEC",
        		"WE8ISO8859P9",
			char_set_others);

	/* languages that use WE8DEC as the default char set */
	we8dec_grp=list(nlsgrp_ptb, 
			nlsgrp_dk, 
			nlsgrp_nl, 
			nlsgrp_sf, 
			nlsgrp_f, 
			nlsgrp_d, 
			nlsgrp_i, 
			nlsgrp_n, 
			nlsgrp_pt, 
			nlsgrp_e, 
			nlsgrp_s); 
	/* -- to be added to mesgs.stp.pp in the future if needed --
			nlsgrp_frc, 
			nlsgrp_esm, 
	 */

	/* languages that use EE8ISO8859P2_grp as the default char set */
	EE8ISO8859P2_grp=list(nlsgrp_sk, nlsgrp_cs, nlsgrp_pl, nlsgrp_hu);

        char_set_dflt=db_char_set_default;			

	if (member(EE8ISO8859P2_grp, nls_sg))
            char_set_dflt="EE8ISO8859P2";	
	else if (nls_sg==nlsgrp_el) 	
            char_set_dflt="EL8DEC";		/* Greek */
	else if (nls_sg==nlsgrp_ja) 
            char_set_dflt="JA16EUC";		/* Japanese EUC */
	else if (nls_sg==nlsgrp_ko) 
            char_set_dflt="KSC5601";		/* Korean */
	else if (nls_sg==nlsgrp_ru) 
            char_set_dflt="RU8PC855";		/* Russian */
	else if (nls_sg==nlsgrp_us) 	
            char_set_dflt="US7ASCII";		/* American */
	else if (member(we8dec_grp, nls_sg))
            char_set_dflt="WE8DEC";		/* many languages */
	else if (nls_sg==nlsgrp_tr) 	
            char_set_dflt="WE8ISO8859P9";	/* Turkish */

	/*  -- for future use --
        	char_set_dflt="AR8ISO8859P6"; 	-- Arabic
        	char_set_dflt="CGB2312-80";	-- Simplified Chinese
        	char_set_dflt="CNS11643-86"; 	-- Traditional Chinese
        	char_set_dflt="SJIS";		-- Janpanese Shift-JIS
        	char_set_dflt="NEE8ISO8859P4";	-- Lithuanian
        	char_set_dflt="WE8ISO8859P1";	-- Icelandic 
	*/

	db_char_set="";
        while (db_char_set=="")
        {
	     
	{ /*_SINGLE_SELECT_DLG ( db_char_select_prompt , char_set_list , char_set_dflt , db_char_set_content , db_char_set_help , "%pname%.db_char_set" , db_char_set ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.db_char_set" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = char_set_dflt ; ] 
	  } 
	  else 
	    _dflt_str = char_set_dflt ; 
	  if ( Default_Install ) 
	    db_char_set = _dflt_str ; 
	  else 
	    db_char_set = SINGLE_SELECTION_DIALOG ( db_char_select_prompt , char_set_list , _dflt_str , db_char_set_content , db_char_set_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.db_char_set" , db_char_set , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "SINGLE_SELECT" ) */ 
	  _dlg_type = "SINGLE_SELECT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = db_char_select_prompt ; _answer = db_char_set ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}

	    if (db_char_set==char_set_others)
	    {
		if (exists(User_Dflt_File))
		    modify("%pname%.db_char_set", db_char_set_default, 
			   User_Dflt_File, "=");

	         
	{ /*_TEXT_DLG ( db_char_set_prompt , db_char_set_default , db_char_set_content , db_char_set_help , "%pname%.db_char_set" , db_char_set ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.db_char_set" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = db_char_set_default ; ] 
	  } 
	  else 
	    _dflt_str = db_char_set_default ; 
	  if ( Default_Install ) 
	    db_char_set = _dflt_str ; 
	  else 
	    db_char_set = TEXT_DIALOG ( db_char_set_prompt , _dflt_str , db_char_set_content , db_char_set_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.db_char_set" , db_char_set , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = db_char_set_prompt ; _answer = db_char_set ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    }

	    if (db_char_set=="")
	    {
		information_dialog(db_char_set_null_msg);
	        db_char_set="";
	    }
	    else if (not(unix_character_set_verify(db_char_set)))
	    {
		information_dialog(instantiate(db_char_set_invalid_msg));
	        db_char_set="";
	    }
	    Default_Install=FALSE;
	}
	Default_Install=Def_Inst_sav;

        /* Assign the system and sys passwords */
	 
	{ /*_GET_SYSTEM_PW ( system_pw ) */ 
	    if ( empty ( System_Pw_Cache ) ) 
	      _do_ask = true ; 
	    else 
	    { 
	      { 
	        _do_ask = _asked_in_this_script ; 
	        if ( _asked_in_this_script ) 
	          while ( not ( empty ( System_Pw_Cache ) ) ) 
	            extract ( System_Pw_Cache , first ( System_Pw_Cache ) ) ; 
	      } 
	      [   'UNBOUND_VARIABLE : { _do_ask = false ; } ] 
	    } 
	    if ( _do_ask ) 
	    { 
	      _asked_in_this_script = true ; 
	      system_pw = "" ; 
	      while ( system_pw == "" ) 
	      { 
	        _system_pw1 = PASSWORD_DIALOG ( System_Pw_Prompt , 
	                                      System_Pw_Content , System_Pw_Help ) ; 
	        _system_pw2 = PASSWORD_DIALOG ( System_Pw_Prompt2 , 
	                                      System_Pw_Content , System_Pw_Help ) ; 
	        if ( ( _system_pw1 != _system_pw2 ) || ( _system_pw1 == "" ) ) 
	          information_dialog ( Passwd_Mismatch_Msg ) ; 
	        else 
	          system_pw = _system_pw1 ; 
	      } 
	      add ( System_Pw_Cache , system_pw ) ; 
	    } 
	    else 
	    { 
	      _asked_in_this_script = false ; 
	      system_pw = first ( System_Pw_Cache ) ; 
	    } 
	  _dummy = system_pw ; modify ( "SYSTEM_PASS" , "system/%_dummy%" ) ; 
	  _dummy = "GET_SYSTEM_PW" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	modify("system_pw", system_pw);

	 
	{ /*_GET_SYS_PW ( sys_pw ) */ 
	    if ( empty ( Sys_Pw_Cache ) ) 
	      _do_ask_sys = true ; 
	    else 
	    { 
	      { 
	        _do_ask_sys = _asked_in_this_script_sys ; 
	        if ( _asked_in_this_script_sys ) 
	          while ( not ( empty ( Sys_Pw_Cache ) ) ) 
	            extract ( Sys_Pw_Cache , first ( Sys_Pw_Cache ) ) ; 
	      } 
	      [   'UNBOUND_VARIABLE : { _do_ask_sys = false ; } ] 
	    } 
	    if ( _do_ask_sys ) 
	    { 
	      _asked_in_this_script_sys = true ; 
	      sys_pw = "" ; 
	      while ( sys_pw == "" ) 
	      { 
	        _sys_pw1 = PASSWORD_DIALOG ( Sys_Pw_Prompt , 
	                                      Sys_Pw_Content , Sys_Pw_Help ) ; 
	        _sys_pw2 = PASSWORD_DIALOG ( Pw_Prompt2 , 
	                                      Sys_Pw_Content , Sys_Pw_Help ) ; 
	        if ( ( _sys_pw1 != _sys_pw2 ) || ( _sys_pw1 == "" ) ) 
	          information_dialog ( Passwd_Mismatch_Msg ) ; 
	        else 
	          sys_pw = _sys_pw1 ; 
	      } 
	      add ( Sys_Pw_Cache , sys_pw ) ; 
	    } 
	    else 
	    { 
	      _asked_in_this_script_sys = false ; 
	      sys_pw = first ( Sys_Pw_Cache ) ; 
	    } 
	  _dummy = sys_pw ; modify ( "SYS_PASS" , "sys/%_dummy%" ) ; 
	  _dummy = "GET_SYS_PW" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	modify("sys_pw", sys_pw);

	/* Get DBA and Operator passwords. Query remote connect internal */

         
	{ /*_YESNO_DLG ( orapwd_prompt , false , orapwd_content , orapwd_pw_help , "%pname%.orapwd_pw_get" , orapwd_pw_get ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.orapwd_pw_get" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = false ; ] 
	  } 
	  else 
	    _dflt_bool = false ; 
	  if ( Default_Install ) 
	    orapwd_pw_get = _dflt_bool ; 
	  else 
	    orapwd_pw_get = YESNO_DIALOG ( orapwd_prompt , _dflt_bool , orapwd_content , orapwd_pw_help ) ; 
	  if ( orapwd_pw_get ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.orapwd_pw_get" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = orapwd_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}

	/* where opassword file is stored */
	make_directory(dbs_dir);

        if (orapwd_pw_get)
	{
	    /* get the dba and operator passwords.  ask whether to
	       disable remote connect internal */
             
	{ /*_PASSWORD_DLG ( orapwd_pw_prompt , "dba" , orapwd_pw_content , orapwd_pw_help , orapwd_pw ) */ 
	    orapwd_pw = "" ; 
	    while ( orapwd_pw == "" ) 
	    { 
	      _output1 = PASSWORD_DIALOG ( orapwd_pw_prompt , orapwd_pw_content , orapwd_pw_help ) ; 
	      _output2 = PASSWORD_DIALOG ( Pw_Prompt2 , orapwd_pw_content , orapwd_pw_help ) ; 
	      if ( ( _output1 != _output2 ) || ( _output1 == "" ) ) 
	        information_dialog ( Passwd_Mismatch_Msg ) ; 
	      else 
	        orapwd_pw = _output1 ; 
	    } 
	  
	{ /*_LOG_HDR ( "PASSWD" ) */ 
	  _dlg_type = "PASSWD" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = orapwd_pw_prompt ; 
	  _answer = orapwd_pw ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> <censored info>" ; modify ( "" , _dummy , Install_Log ) ; 
	}

                 
	{ /*_SIZE_DLG ( orapwd_entries_prompt , orapwd_size_dflt , orapwd_size_min , orapwd_size_content , orapwd_size_help , "%pname%.opapwd_size" , orapwd_size , orapwd_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.opapwd_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = orapwd_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = orapwd_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    orapwd_val = numerify ( _dflt_str ) ; 
	    orapwd_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    orapwd_size = "" ; 
	    _min = orapwd_size_min ; 
	    while ( orapwd_size == "" ) 
	    { 
	      while ( orapwd_size == "" ) 
	      { 
	        orapwd_size = TEXT_DIALOG ( orapwd_entries_prompt , _dflt_str , orapwd_size_content , orapwd_size_help ) ; 
	        { orapwd_val = numerify ( orapwd_size ) ; _answer = orapwd_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { orapwd_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( orapwd_val < numerify ( orapwd_size_min ) ) 
	      { orapwd_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.opapwd_size" , orapwd_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = orapwd_entries_prompt ; _answer = orapwd_size ; _value = orapwd_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}
	}

	/* 
	** Get listener password and create a listener.ora file
	** under $ORACLE_HOME/network/admin
	 */
         
	{ /*_PASSWORD_DLG ( lsnr_pw_prompt , "listener" , lsnr_pw_content , lsnr_pw_help , lsnr_pw ) */ 
	    lsnr_pw = "" ; 
	    while ( lsnr_pw == "" ) 
	    { 
	      _output1 = PASSWORD_DIALOG ( lsnr_pw_prompt , lsnr_pw_content , lsnr_pw_help ) ; 
	      _output2 = PASSWORD_DIALOG ( Pw_Prompt2 , lsnr_pw_content , lsnr_pw_help ) ; 
	      if ( ( _output1 != _output2 ) || ( _output1 == "" ) ) 
	        information_dialog ( Passwd_Mismatch_Msg ) ; 
	      else 
	        lsnr_pw = _output1 ; 
	    } 
	  
	{ /*_LOG_HDR ( "PASSWD" ) */ 
	  _dlg_type = "PASSWD" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = lsnr_pw_prompt ; 
	  _answer = lsnr_pw ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> <censored info>" ; modify ( "" , _dummy , Install_Log ) ; 
	}

	/*
	** Ask if user wishes to have MTS configured and listener started.
	*/
	   start_lsnr_dflt = false;

	    
	{ /*_YESNO_DLG ( start_lsnr_prompt , start_lsnr_dflt , start_lsnr_content , start_lsnr_help , "%pname%.start_lsnr" , start_lsnr ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.start_lsnr" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = start_lsnr_dflt ; ] 
	  } 
	  else 
	    _dflt_bool = start_lsnr_dflt ; 
	  if ( Default_Install ) 
	    start_lsnr = _dflt_bool ; 
	  else 
	    start_lsnr = YESNO_DIALOG ( start_lsnr_prompt , _dflt_bool , start_lsnr_content , start_lsnr_help ) ; 
	  if ( start_lsnr ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.start_lsnr" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = start_lsnr_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}

	  /*
	   * Use list member to indicate "boolean" for MTS configuration.
	   * rdbms.ins will use this to judge whether to bring up the database
	   * with an IPC dispatcher, and start an IPC listener.
	   */
           db_domain_name_prompt=nls("db_domain_name_prompt", "Please give the database domain name(db_domain)");
           db_domain_name_content=nls("db_domain_name_content", "DB Domain Name");
	   db_domain_name_help = nls ("db_domain_name_help", "If you plan on editing your init.ora file to add a database domain name, this is the value you intend to use.");
           dom_name="";
           db_domain_name_dflt="";
	   if (start_lsnr) {
		Start_Lsnr = TRUE;
             
	{ /*_TEXT_DLG ( db_domain_name_prompt , db_domain_name_dflt , db_domain_name_content , db_domain_name_help , "%pname%.dom_name" , dom_name ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.dom_name" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = db_domain_name_dflt ; ] 
	  } 
	  else 
	    _dflt_str = db_domain_name_dflt ; 
	  if ( Default_Install ) 
	    dom_name = _dflt_str ; 
	  else 
	    dom_name = TEXT_DIALOG ( db_domain_name_prompt , _dflt_str , db_domain_name_content , db_domain_name_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.dom_name" , dom_name , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = db_domain_name_prompt ; _answer = dom_name ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	   }	


   mark {	/* Mark rdbms.1 -- to facilate smart backup */
        /* Ask whether to use the default control files */
        {
	  dflt_ctrlf_ok=false;
          if(Type_Of_Device == File_Based)
             
	{ /*_YESNO_DLG ( instantiate ( dflt_ctrlf_prompt ) , true , ctrlf_content_fs , dflt_ctrlf_help , "%pname%.dflt_ctrlf_ok" , dflt_ctrlf_ok ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.dflt_ctrlf_ok" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    dflt_ctrlf_ok = _dflt_bool ; 
	  else 
	    dflt_ctrlf_ok = YESNO_DIALOG ( instantiate ( dflt_ctrlf_prompt ) , _dflt_bool , ctrlf_content_fs , dflt_ctrlf_help ) ; 
	  if ( dflt_ctrlf_ok ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.dflt_ctrlf_ok" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( dflt_ctrlf_prompt ) ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        }
	all_db_files_list=list();

        /* If user wants to use the defaults but one or more of the defaults
           already exists, then must prompt for control file specifications */
        if (dflt_ctrlf_ok &&
            (exists(control1_file_dflt) || exists(control2_file_dflt) ||
             exists(control3_file_dflt)) )
        {
            if (Default_Install)
            {
                 
	{ /*_LOG_MSG ( instantiate ( ctrlf_exist_note ) , Install_Log ) */ 
	  _msg = instantiate ( ctrlf_exist_note ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
            } else {
                information_dialog(instantiate(ctrlf_exist_prompt));
            }
            dflt_ctrlf_ok=false;
        }


        if (dflt_ctrlf_ok)
        {
            /* use the defaults */
            control1_file=control1_file_dflt;
            control2_file=control2_file_dflt;
            control3_file=control3_file_dflt;
        }
        else
        {

          while (TRUE)
          {
             
	{ /*_GET_FILE_DLG ( instantiate ( get_ctrlf1_prompt ) , control1_file_dflt , dflt_ctrlf_content , dflt_ctrlf_help , "%pname%.control1_file" , control1_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.control1_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = control1_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = control1_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( instantiate ( get_ctrlf1_prompt ) , _dflt_str , dflt_ctrlf_content , dflt_ctrlf_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  control1_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.control1_file" , control1_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( get_ctrlf1_prompt ) ; _answer = control1_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
            ent_val="%control1_file%"; ent_type=cont_file_renamed_content;
            if (not(member(all_db_files_list,control1_file)))
                break();
            else
                information_dialog(instantiate(dup_value));
          }
	    add(all_db_files_list,control1_file);

	  while (TRUE)
	  {
             
	{ /*_GET_FILE_DLG ( instantiate ( get_ctrlf2_prompt ) , control2_file_dflt , dflt_ctrlf_content , dflt_ctrlf_help , "%pname%.control2_file" , control2_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.control2_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = control2_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = control2_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( instantiate ( get_ctrlf2_prompt ) , _dflt_str , dflt_ctrlf_content , dflt_ctrlf_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  control2_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.control2_file" , control2_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( get_ctrlf2_prompt ) ; _answer = control2_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%control2_file%"; ent_type=cont_file_renamed_content;
	    if (not(member(all_db_files_list,control2_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
   	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,control2_file);

	  while (TRUE)
	  {
             
	{ /*_GET_FILE_DLG ( instantiate ( get_ctrlf3_prompt ) , control3_file_dflt , dflt_ctrlf_content , dflt_ctrlf_help , "%pname%.control3_file" , control3_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.control3_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = control3_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = control3_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( instantiate ( get_ctrlf3_prompt ) , _dflt_str , dflt_ctrlf_content , dflt_ctrlf_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  control3_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.control3_file" , control3_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( get_ctrlf3_prompt ) ; _answer = control3_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%control3_file%"; ent_type=cont_file_renamed_content;
	    if (not(member(all_db_files_list,control3_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,control3_file);
        }


        /* Present the user with the list of database and log file names and 
	   sizes.  Ask if these are acceptable. */

	mark
	{
	    if (not(Default_Install))
	    {
		information_dialog(instantiate(db_dflt_prompt1),
			db_dflt_content1, db_dflt_help1);
	         
	{ /*_LOG_MSG ( instantiate ( db_dflt_prompt1 ) , Install_Log ) */ 
	  _msg = instantiate ( db_dflt_prompt1 ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
		mark
		{
		information_dialog(instantiate(db_dflt_prompt2),
			db_dflt_content2, db_dflt_help2);
	         
	{ /*_LOG_MSG ( instantiate ( db_dflt_prompt2 ) , Install_Log ) */ 
	  _msg = instantiate ( db_dflt_prompt2 ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
		}
	    }
	    mark
	    {
	         
	{ /*_YESNO_DLG ( instantiate ( all_db_defaults_prompt ) , true , all_db_defaults_content , instantiate ( all_db_defaults_help ) , "%pname%.all_db_defaults_okay" , all_db_defaults_okay ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.all_db_defaults_okay" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    all_db_defaults_okay = _dflt_bool ; 
	  else 
	    all_db_defaults_okay = YESNO_DIALOG ( instantiate ( all_db_defaults_prompt ) , _dflt_bool , all_db_defaults_content , instantiate ( all_db_defaults_help ) ) ; 
	  if ( all_db_defaults_okay ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.all_db_defaults_okay" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( all_db_defaults_prompt ) ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
	    }
	}


        default_file_exists = false;

        if (all_db_defaults_okay)
	{
            /* If any one of the default files exists, then can't use them
               as is.  Must prompt the user for file specifications */
            dflt_file_list=list( system_file_dflt, log1_file_dflt,
                log2_file_dflt, log3_file_dflt, rbs_file_dflt,
                temp_file_dflt, users_file_dflt, tools_file_dflt);

            if_any_exists=false;
            while (not(if_any_exists) && not(empty(dflt_file_list)))
            {
                cur_dflt_file=first(dflt_file_list);
                if (exists(cur_dflt_file))
                    if_any_exists=true;
                dflt_file_list=rest(dflt_file_list);
            }

            if (if_any_exists)
            {
                default_file_exists=true;

                 
	{ /*_LOG_MSG ( files_exist_echo , Install_Log ) */ 
	  _msg = files_exist_echo ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                if (Default_Install)
                {
                     
	{ /*_LOG_MSG ( files_exist_note , Install_Log ) */ 
	  _msg = files_exist_note ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                } else {
                    information_dialog(files_exist_msg);
                }
            }
            else
            {
                /* Set database file names and sizes to defaults */
                system_file     =system_file_dflt;
                log1_file       =log1_file_dflt;
                log2_file       =log2_file_dflt;
                log3_file       =log3_file_dflt;
                rbs_file        =rbs_file_dflt;
                temp_file       =temp_file_dflt;
                users_file      =users_file_dflt;
                tools_file      =tools_file_dflt;

                orapwd_size=orapwd_size_dflt;
                system_size=system_size_dflt;
                log1_size  =log1_size_dflt;
                log2_size  =log2_size_dflt;
                log3_size  =log3_size_dflt;
                rbs_size   =rbs_size_dflt;
                temp_size  =temp_size_dflt;
                users_size =users_size_dflt;
                tools_size =tools_size_dflt;

                /* At least in this instance, depend_size is easily
                 * determined.
                 */
                dflt_size_list=list( system_size_dflt,
                        log1_size_dflt, log2_size_dflt,
                        log3_size_dflt, rbs_size_dflt,
                        temp_size_dflt, users_size_dflt,
                        tools_size_dflt);

                while (not(empty(dflt_size_list)))
                {
                    depend_size=depend_size+numerify(first(dflt_size_list));
                    dflt_size_list=rest(dflt_size_list);
                }
            }
        }
	mark
        if (not(all_db_defaults_okay) || default_file_exists)
        {

	  while (TRUE)
	  {
            /* Get name and size of the SYSTEM database file */
          if(Type_Of_Device == RD_Based)
               system_file_content = system_file_content_rd;
          else
               system_file_content = system_file_content_fs;

             
	{ /*_GET_FILE_DLG ( system_file_prompt , system_file_dflt , system_file_content , system_file_help , "%pname%.system_file" , system_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.system_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = system_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = system_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( system_file_prompt , _dflt_str , system_file_content , system_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  system_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.system_file" , system_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = system_file_prompt ; _answer = system_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%system_file%"; ent_type=system_file_content;
	    if (not(member(all_db_files_list,system_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,system_file);
             
	{ /*_SIZE_DLG ( system_size_prompt , system_size_dflt , system_size_min , system_size_content , file_size_help , "%pname%.system_size" , system_size , system_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.system_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = system_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = system_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    system_val = numerify ( _dflt_str ) ; 
	    system_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    system_size = "" ; 
	    _min = system_size_min ; 
	    while ( system_size == "" ) 
	    { 
	      while ( system_size == "" ) 
	      { 
	        system_size = TEXT_DIALOG ( system_size_prompt , _dflt_str , system_size_content , file_size_help ) ; 
	        { system_val = numerify ( system_size ) ; _answer = system_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { system_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( system_val < numerify ( system_size_min ) ) 
	      { system_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.system_size" , system_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = system_size_prompt ; _answer = system_size ; _value = system_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}

          if(Type_Of_Device == RD_Based)
             log_file_content = log_file_content_rd;
          else
             log_file_content = log_file_content_fs;

	  while (TRUE)
	  {

            /* Get names and sizes of the redo log files */
             
	{ /*_GET_FILE_DLG ( log1_file_prompt , log1_file_dflt , log_file_content , log_file_help , "%pname%.log1_file" , log1_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.log1_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = log1_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = log1_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( log1_file_prompt , _dflt_str , log_file_content , log_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  log1_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.log1_file" , log1_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = log1_file_prompt ; _answer = log1_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%log1_file%"; ent_type=log_file_content;
	    if (not(member(all_db_files_list,log1_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,log1_file);
             
	{ /*_SIZE_DLG ( log1_size_prompt , log1_size_dflt , log1_size_min , log_size_content , file_size_help , "%pname%.log1_size" , log1_size , log1_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.log1_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = log1_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = log1_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    log1_val = numerify ( _dflt_str ) ; 
	    log1_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    log1_size = "" ; 
	    _min = log1_size_min ; 
	    while ( log1_size == "" ) 
	    { 
	      while ( log1_size == "" ) 
	      { 
	        log1_size = TEXT_DIALOG ( log1_size_prompt , _dflt_str , log_size_content , file_size_help ) ; 
	        { log1_val = numerify ( log1_size ) ; _answer = log1_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { log1_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( log1_val < numerify ( log1_size_min ) ) 
	      { log1_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.log1_size" , log1_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = log1_size_prompt ; _answer = log1_size ; _value = log1_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}

	  while (TRUE)
	  {
             
	{ /*_GET_FILE_DLG ( log2_file_prompt , log2_file_dflt , log_file_content , log_file_help , "%pname%.log2_file" , log2_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.log2_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = log2_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = log2_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( log2_file_prompt , _dflt_str , log_file_content , log_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  log2_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.log2_file" , log2_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = log2_file_prompt ; _answer = log2_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%log2_file%"; ent_type=log_file_content;
	    if (not(member(all_db_files_list,log2_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,log2_file);
             
	{ /*_SIZE_DLG ( log2_size_prompt , log2_size_dflt , log2_size_min , log_size_content , file_size_help , "%pname%.log2_size" , log2_size , log2_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.log2_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = log2_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = log2_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    log2_val = numerify ( _dflt_str ) ; 
	    log2_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    log2_size = "" ; 
	    _min = log2_size_min ; 
	    while ( log2_size == "" ) 
	    { 
	      while ( log2_size == "" ) 
	      { 
	        log2_size = TEXT_DIALOG ( log2_size_prompt , _dflt_str , log_size_content , file_size_help ) ; 
	        { log2_val = numerify ( log2_size ) ; _answer = log2_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { log2_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( log2_val < numerify ( log2_size_min ) ) 
	      { log2_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.log2_size" , log2_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = log2_size_prompt ; _answer = log2_size ; _value = log2_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}

	  while (TRUE)
	  {
             
	{ /*_GET_FILE_DLG ( log3_file_prompt , log3_file_dflt , log_file_content , log_file_help , "%pname%.log3_file" , log3_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.log3_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = log3_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = log3_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( log3_file_prompt , _dflt_str , log_file_content , log_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  log3_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.log3_file" , log3_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = log3_file_prompt ; _answer = log3_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%log3_file%"; ent_type=log_file_content;
	    if (not(member(all_db_files_list,log3_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,log3_file);
             
	{ /*_SIZE_DLG ( log3_size_prompt , log3_size_dflt , log3_size_min , log_size_content , file_size_help , "%pname%.log3_size" , log3_size , log3_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.log3_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = log3_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = log3_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    log3_val = numerify ( _dflt_str ) ; 
	    log3_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    log3_size = "" ; 
	    _min = log3_size_min ; 
	    while ( log3_size == "" ) 
	    { 
	      while ( log3_size == "" ) 
	      { 
	        log3_size = TEXT_DIALOG ( log3_size_prompt , _dflt_str , log_size_content , file_size_help ) ; 
	        { log3_val = numerify ( log3_size ) ; _answer = log3_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { log3_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( log3_val < numerify ( log3_size_min ) ) 
	      { log3_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.log3_size" , log3_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = log3_size_prompt ; _answer = log3_size ; _value = log3_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}

          if(Type_Of_Device == RD_Based)
              rbs_file_content = rbs_file_content_rd;
          else
              rbs_file_content = rbs_file_content_fs;

	  while (TRUE)
	  {
            /* Get name and size of the Rollback database file */
             
	{ /*_GET_FILE_DLG ( rbs_file_prompt , rbs_file_dflt , rbs_file_content , rbs_file_help , "%pname%.rbs_file" , rbs_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.rbs_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = rbs_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = rbs_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( rbs_file_prompt , _dflt_str , rbs_file_content , rbs_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  rbs_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.rbs_file" , rbs_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = rbs_file_prompt ; _answer = rbs_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%rbs_file%"; ent_type=rbs_file_content;
	    if (not(member(all_db_files_list,rbs_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,rbs_file);
             
	{ /*_SIZE_DLG ( rbs_size_prompt , rbs_size_dflt , rbs_size_min , rbs_size_content , file_size_help , "%pname%.rbs_size" , rbs_size , rbs_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.rbs_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = rbs_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = rbs_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    rbs_val = numerify ( _dflt_str ) ; 
	    rbs_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    rbs_size = "" ; 
	    _min = rbs_size_min ; 
	    while ( rbs_size == "" ) 
	    { 
	      while ( rbs_size == "" ) 
	      { 
	        rbs_size = TEXT_DIALOG ( rbs_size_prompt , _dflt_str , rbs_size_content , file_size_help ) ; 
	        { rbs_val = numerify ( rbs_size ) ; _answer = rbs_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { rbs_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( rbs_val < numerify ( rbs_size_min ) ) 
	      { rbs_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.rbs_size" , rbs_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = rbs_size_prompt ; _answer = rbs_size ; _value = rbs_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}




          if(Type_Of_Device == RD_Based)
             temp_file_content = temp_file_content_rd;
          else
             temp_file_content = temp_file_content_fs;

	  while (TRUE)
	  {
            /* Get name and size of the Temporary database file */
             
	{ /*_GET_FILE_DLG ( temp_file_prompt , temp_file_dflt , temp_file_content , temp_file_help , "%pname%.temp_file" , temp_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.temp_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = temp_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = temp_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( temp_file_prompt , _dflt_str , temp_file_content , temp_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  temp_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.temp_file" , temp_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = temp_file_prompt ; _answer = temp_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
	    ent_val="%temp_file%"; ent_type=temp_file_content;
	    if (not(member(all_db_files_list,temp_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,temp_file);

             
	{ /*_SIZE_DLG ( temp_size_prompt , temp_size_dflt , temp_size_min , temp_size_content , file_size_help , "%pname%.temp_size" , temp_size , temp_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.temp_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = temp_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = temp_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    temp_val = numerify ( _dflt_str ) ; 
	    temp_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    temp_size = "" ; 
	    _min = temp_size_min ; 
	    while ( temp_size == "" ) 
	    { 
	      while ( temp_size == "" ) 
	      { 
	        temp_size = TEXT_DIALOG ( temp_size_prompt , _dflt_str , temp_size_content , file_size_help ) ; 
	        { temp_val = numerify ( temp_size ) ; _answer = temp_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { temp_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( temp_val < numerify ( temp_size_min ) ) 
	      { temp_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.temp_size" , temp_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = temp_size_prompt ; _answer = temp_size ; _value = temp_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}



          if(Type_Of_Device == RD_Based)
                users_file_content = users_file_content_rd;
          else
                users_file_content = users_file_content_fs;


	  while (TRUE)
	  {
            /* Get name and size of the Users misc. database file */
             
	{ /*_GET_FILE_DLG ( users_file_prompt , users_file_dflt , users_file_content , users_file_help , "%pname%.users_file" , users_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.users_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = users_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = users_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( users_file_prompt , _dflt_str , users_file_content , users_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  users_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.users_file" , users_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = users_file_prompt ; _answer = users_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}

	    ent_val="%users_file%"; ent_type=users_file_content;
	    if (not(member(all_db_files_list,users_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,users_file);

             
	{ /*_SIZE_DLG ( users_size_prompt , users_size_dflt , users_size_min , users_size_content , file_size_help , "%pname%.users_size" , users_size , users_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.users_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = users_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = users_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    users_val = numerify ( _dflt_str ) ; 
	    users_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    users_size = "" ; 
	    _min = users_size_min ; 
	    while ( users_size == "" ) 
	    { 
	      while ( users_size == "" ) 
	      { 
	        users_size = TEXT_DIALOG ( users_size_prompt , _dflt_str , users_size_content , file_size_help ) ; 
	        { users_val = numerify ( users_size ) ; _answer = users_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { users_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( users_val < numerify ( users_size_min ) ) 
	      { users_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.users_size" , users_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = users_size_prompt ; _answer = users_size ; _value = users_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}



          if(Type_Of_Device == RD_Based)
             tools_file_content=tools_file_content_rd;
          else
             tools_file_content=tools_file_content_fs;

	  while (TRUE)
	  {
            /* Get name and size of the Tools database file */
             
	{ /*_GET_FILE_DLG ( tools_file_prompt , tools_file_dflt , tools_file_content , tools_file_help , "%pname%.tools_file" , tools_file ) */ 
	  _fname = "" ; 
	  while ( _fname == "" ) 
	  { 
	    if ( exists ( User_Dflt_File ) ) 
	    { 
	      { _tmp_var = translate ( "%pname%.tools_file" , User_Dflt_File , "=" ) ; 
	        _dflt_str = "%_tmp_var%" ; 
	      } 
	      [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = tools_file_dflt ; ] 
	    } 
	    else 
	      _dflt_str = tools_file_dflt ; 
	    if ( Default_Install ) 
	      _fname = _dflt_str ; 
	    else 
	      _fname = TEXT_DIALOG ( tools_file_prompt , _dflt_str , tools_file_content , tools_file_help ) ; 
	    if ( _fname == "" ) 
	      information_dialog ( _Empty_Name_Prompt ) ; 
	    else if ( exists ( _fname ) ) 
	    { 
	      if ( not ( unix_raw_file ( _fname ) ) ) 
	      { 
	        if ( Default_Install ) 
	          _delete = true ; 
	        else 
	          _delete = YESNO_DIALOG ( instantiate ( _Delete_Prompt ) , false , 
	                                 _Delete_Content , _Delete_Help ) ; 
	        if ( _delete ) 
	          remove_file ( _fname ) ; 
	        else 
	        { 
	          _dflt = _fname ; 
	          _fname = "" ; 
	        } 
	      } 
	    } 
	  } 
	  tools_file = _fname ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.tools_file" , tools_file , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "GET_FILE" ) */ 
	  _dlg_type = "GET_FILE" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = tools_file_prompt ; _answer = tools_file ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}

	    ent_val="%tools_file%"; ent_type=tools_file_content;
	    if (not(member(all_db_files_list,tools_file)))
		break();
	    else 
		information_dialog(instantiate(dup_value));
	    Default_Install=FALSE;
	  }
	  Default_Install=Def_Inst_sav;
	  add(all_db_files_list,tools_file);
             
	{ /*_SIZE_DLG ( tools_size_prompt , tools_size_dflt , tools_size_min , tools_size_content , file_size_help , "%pname%.tools_size" , tools_size , tools_val ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.tools_size" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = tools_size_dflt ; ] 
	  } 
	  else 
	    _dflt_str = tools_size_dflt ; 
	  if ( Default_Install ) 
	  { 
	    tools_val = numerify ( _dflt_str ) ; 
	    tools_size = _dflt_str ; 
	  } 
	  else 
	  { 
	    tools_size = "" ; 
	    _min = tools_size_min ; 
	    while ( tools_size == "" ) 
	    { 
	      while ( tools_size == "" ) 
	      { 
	        tools_size = TEXT_DIALOG ( tools_size_prompt , _dflt_str , tools_size_content , file_size_help ) ; 
	        { tools_val = numerify ( tools_size ) ; _answer = tools_size ; 
	        } 
	        [ 'LEXICAL_ERROR : 
	          { tools_size = "" ;  information_dialog ( invalid_number_error ) ; } 
	        ] 
	      } 
	      if ( tools_val < numerify ( tools_size_min ) ) 
	      { tools_size = "" ; information_dialog ( instantiate ( Num_Small_Error ) ) ; 
	      } 
	    } 
	    if ( exists ( User_Dflt_File ) ) modify ( "%pname%.tools_size" , tools_size , User_Dflt_File , "=" ) ; 
	    
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	    _prompt = tools_size_prompt ; _answer = tools_size ; _value = tools_val ; 
	    _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	    _dummy = "       A> %_answer% (%_value% bytes)" ; 
	    modify ( "" , _dummy , Install_Log ) ; 
	  } 
	}


        depend_size=depend_size+system_val+log1_val+log2_val+log3_val+
			    rbs_val+temp_val+users_val+tools_val;
	} /* if not (all_db_defaults_okay) */

        } /* Mark rdbms.1 */

    } /* if (do_db_actions) */


    if(ORCA_Debug)
    {
        
	{ /*_LOG_MSG ( "DEBUG: do_upgrade: %do_upgrade%" , Debug_Log ) */ 
	  _msg = "DEBUG: do_upgrade: %do_upgrade%" ; 
	  _logfile = Debug_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
        
	{ /*_LOG_MSG ( "DEBUG: do_migrate: %do_migrate%" , Debug_Log ) */ 
	  _msg = "DEBUG: do_migrate: %do_migrate%" ; 
	  _logfile = Debug_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
        
	{ /*_LOG_MSG ( "DEBUG: do_load: %do_load%" , Debug_Log ) */ 
	  _msg = "DEBUG: do_load: %do_load%" ; 
	  _logfile = Debug_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
        
	{ /*_LOG_MSG ( "DEBUG: do_relink: %do_relink%" , Debug_Log ) */ 
	  _msg = "DEBUG: do_relink: %do_relink%" ; 
	  _logfile = Debug_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
        
	{ /*_LOG_MSG ( "DEBUG: do_db_actions: %do_db_actions%" , Debug_Log ) */ 
	  _msg = "DEBUG: do_db_actions: %do_db_actions%" ; 
	  _logfile = Debug_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
     }
    /*
     * Need to add code because we were attempting to bring up a database
     * if the customer was doing and 'Install Software Only' and there was
     * not a pre-existing database.
     */
    /*
     * First need to determine if a database already exists or not.
     * If one does, we will set database_exists to true.
     * Don't need to do if do_db_actions==true, since we must already know
     *   there is a database, or we're creating a database.
     * Initialize the following variables:
     *   load_or_relink_only
     *   relink_only
     *   database_exists
     */
    load_or_relink_only = ((do_relink || do_load) && not(do_db_actions)
        && not(do_migrate));
    relink_only = (not(do_load) && do_relink && not(do_db_actions)
        && not(do_migrate));
    database_exists = false; /* Initialize to prevent errors. */
    startup_after_load_relink = false; /* Initialize to pervent errors. */
    if (load_or_relink_only)
    {
         
	{ /*_LOG_MSG ( instantiate ( relink_load_only ) , Install_Log ) */ 
	  _msg = instantiate ( relink_load_only ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
        database_state_known = false;
        /* 
         * Let's try to be somewhat automated, and check if there is
         * already an SID defined.  If there is, then we'll check for
         * an init.ora file under ORACLE_HOME.
         */
        if (Oracle_Sid == "")
        {
            /* See if ORACLE_SID is defined in the user's environment. */
            {
                ora_sid_tmp=translate("ORACLE_SID");
                ora_sid_dflt="%ora_sid_tmp%";
            }
            [   'UNBOUND_ENVIRONMENT_VARIABLE : { ora_sid_dflt = ""; } ]
        } /* if (Oracle_Sid == "") */
        if (Default_Install)
        {
            Oracle_Sid = ora_sid_dflt;
        }
        while (Oracle_Sid == "")
        {
             
	{ /*_TEXT_DLG ( ora_sid_prompt , ora_sid_dflt , ora_sid_content , ora_sid_help , "Oracle_SID" , Oracle_Sid ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "Oracle_SID" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = ora_sid_dflt ; ] 
	  } 
	  else 
	    _dflt_str = ora_sid_dflt ; 
	  if ( Default_Install ) 
	    Oracle_Sid = _dflt_str ; 
	  else 
	    Oracle_Sid = TEXT_DIALOG ( ora_sid_prompt , _dflt_str , ora_sid_content , ora_sid_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "Oracle_SID" , Oracle_Sid , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = ora_sid_prompt ; _answer = Oracle_Sid ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}

            if (Oracle_Sid == "")
                information_dialog(ora_sid_info1);
	    Default_Install=FALSE;
        }
	Default_Install=Def_Inst_sav;

        modify("ORACLE_SID", Oracle_Sid);
        if (Oracle_Sid != "")
        {
            /*
             * There is an Oracle SID defined.  Now check for initSID.ora.
             */
            pfile_dbs_dir_file = "%Oracle_Home%/dbs/init%Oracle_Sid%.ora";
            {
                if (exists(pfile_dbs_dir_file))
                {
                    /*
                     * It is likely that a database exists, but we can't be 
                     * sure.  Check if this is a database that may be
                     * started up.
                     */
                     
	{ /*_YESNO_DLG ( instantiate ( database_exists_prompt ) , true , database_exists_content , instantiate ( database_exists_help ) , "%pname%.database_exists" , database_exists ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.database_exists" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    database_exists = _dflt_bool ; 
	  else 
	    database_exists = YESNO_DIALOG ( instantiate ( database_exists_prompt ) , _dflt_bool , database_exists_content , instantiate ( database_exists_help ) ) ; 
	  if ( database_exists ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.database_exists" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( database_exists_prompt ) ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
                    database_state_known = true;
                } else {
                    /*
                     * So their Oracle_Sid is set, but they don't have
                     * an initSID.ora.  Why would this be:
                     * 1.  OFA_Compliant.  
                     *    a.  There is a database, but it's Oracle_Home is
                     *        under a different product/version directory.
                     *        We may want to create a soft-link to the 
                     *        initSID.ora file under ORACLE_BASE/admin/dbname/
                     *        pfile, but we don't want to start up the database
                     *        because it may still be running.
                     *        If the Oracle_Home were the present directory,
                     *        then there should be a soft-link to the 
                     *        initSID.ora file under ORACLE_BASE/admin/dbname/
                     *        pfile.
                     *    b.  This their first install, and they will 
                     *        create the database later.
                     * 2.  Non-OFA_Compliant.
                     *    A database hasn't been created yet.  There is
                     *    no reason to believe that one should be started up.
                     *    If there was a database, there would have been an
                     *    initSID.ora.
                     */
                    database_state_known = false;
                } /* if (exists(pfile_dbs_dir)) */
            }
            [ 'OS_ERROR: database_state_known = false; 
            ]
            if (OFA_Compliant && not(database_state_known))
            {
                database_exists = false;
                database_state_known = true;
            } else {
                if (not(OFA_Compliant))
                {
                    /*
                     * Since not OFA_Compliant and no initSID.ora, there is
                     * no database.
                     */
                    database_exists = false;
                    database_state_known = true;
                } /* if (not(OFA_Compliant)) */
            } /* if (OFA_Compliant && not(database_state_known)) */
        } else {
            /* Should we do anything if Oracle_Sid is ""? */
        } /* if (Oracle_Sid != "") */
    } /* if (load_or_relink_only) */

    /*
     * If upgrading database, figure out the version of existing db.
     * If loading and a database exists, we need this information to 
     * determine if upgrade scripts are required for this new version of
     * the database.
     * If we are just relinking and a database exists, then we aren't upgrading
     * and there is no reason that we shouldn't attempt to start up the 
     * database.
     */
    if (do_upgrade && not(do_migrate)) 
    {
        pre_easily_upgradable_option = "7.0.10 or earlier";
        upg_from_list=list("7.2.3", "7.2.2", "7.1.6", "7.1.5", "7.1.4", "7.1.3", "7.1.2", "7.0.16","7.0.15", "7.0.13", "7.0.12", 
		"7.0.11", pre_easily_upgradable_option);
        dflt_upg_from="7.2.3";
        earliest_easily_upgradable="7.0.11";

         
	{ /*_SINGLE_SELECT_DLG ( upg_from_prompt , upg_from_list , dflt_upg_from , upg_from_content , upg_from_help , "%pname%.upg_from_ver" , upg_from_ver ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.upg_from_ver" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = dflt_upg_from ; ] 
	  } 
	  else 
	    _dflt_str = dflt_upg_from ; 
	  if ( Default_Install ) 
	    upg_from_ver = _dflt_str ; 
	  else 
	    upg_from_ver = SINGLE_SELECTION_DIALOG ( upg_from_prompt , upg_from_list , _dflt_str , upg_from_content , upg_from_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.upg_from_ver" , upg_from_ver , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "SINGLE_SELECT" ) */ 
	  _dlg_type = "SINGLE_SELECT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = upg_from_prompt ; _answer = upg_from_ver ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}




        /* 
         * For 7.1, the only versions cited in the README file are 7.0.13 and
         * 7.0.15.  For both of these, the scripts to run are the same.
         * So, we'll create two varibles to handle this, so we'll know what
         * version we're upgrading from.
         */
        upg_7013_to_7102=false;
        upg_7015_to_7102=false;
	upg_7016_to_7102=false;
	upg_7102_to_7103=false;
	upg_7103_to_7104=false;
	upg_7104_to_7105=false;
	upg_7105_to_7106=false;
	upg_7106_to_7202=false;
        upg_7202_to_7203=false;
        upg_7203_to_7301=false;
        upg_7301_to_7302=false;
        /*
         * We'll only add upg_7014_to_7015 and upg_7013_to_7015.  If the
         * the user is upgrading from a version earlier than 7.0.13, we'll
         * first run the scripts to upgrade him to 7.0.13, then run the
         * 7.0.13 to 7.0.15 upgrade scripts.
         */
        upg_7015_to_7016=false;
        upg_7013_to_7015=false;
        upg_7012_to_7013=false;
        upg_7011_to_7013=false;
        upg_7010_to_7013=false;
        no_upgrade_scripts_needed=false;

        if (upg_from_ver==pre_easily_upgradable_option)
        {
            upg_7010_to_7013=true;
            upg_7013_to_7015=true;
	    upg_7015_to_7102=true;
	    upg_7102_to_7103=true;
	    upg_7103_to_7104=true;
	    upg_7104_to_7105=true;
	    upg_7105_to_7106=true;
	    upg_7106_to_7202=true;
            upg_7202_to_7203=true;
            upg_7203_to_7301=true;
            upg_7301_to_7302=true;
            information_dialog(instantiate(upg_from_early_info), 
                upg_from_early_content, instantiate(upg_from_early_help));
        } else {
            if (upg_from_ver=="7.0.11") 
            {
                upg_7011_to_7013=true;
                upg_7013_to_7015=true;
	    upg_7015_to_7102=true;
	    upg_7102_to_7103=true;
	    upg_7103_to_7104=true;
	    upg_7104_to_7105=true;
            upg_7105_to_7106=true;
	    upg_7106_to_7202=true;
            upg_7202_to_7203=true;
            upg_7203_to_7301=true;
            upg_7301_to_7302=true;
            } else {
	            if (upg_from_ver=="7.0.12") 
                {
                    upg_7012_to_7013=true;
                    upg_7013_to_7015=true;
	    upg_7015_to_7102=true;
	    upg_7102_to_7103=true;
	    upg_7103_to_7104=true;
	    upg_7104_to_7105=true;
            upg_7105_to_7106=true;
	    upg_7106_to_7202=true;
            upg_7202_to_7203=true;
            upg_7203_to_7301=true;
            upg_7301_to_7302=true;
                } else {
                    if (upg_from_ver=="7.0.13")
                    {
                        upg_7013_to_7015=true;
	    upg_7015_to_7102=true;
	    upg_7102_to_7103=true;
	    upg_7103_to_7104=true;
	    upg_7104_to_7105=true;
            upg_7105_to_7106=true;
	    upg_7106_to_7202=true;
            upg_7202_to_7203=true;
            upg_7203_to_7301=true;
            upg_7301_to_7302=true;
                    } else {
                        if (upg_from_ver=="7.0.15")
                        {
                            upg_7015_to_7102=true;
			    upg_7102_to_7103=true;
			    upg_7103_to_7104=true;
			    upg_7104_to_7105=true;
                   	    upg_7105_to_7106=true;
			    upg_7106_to_7202=true;
                            upg_7202_to_7203=true;
                            upg_7203_to_7301=true;
                            upg_7301_to_7302=true;
                        } else {
			    if (upg_from_ver=="7.0.16")
			    {
                            upg_7016_to_7102=true;
                            upg_7102_to_7103=true;
			    upg_7103_to_7104=true;
			    upg_7104_to_7105=true;
		            upg_7105_to_7106=true;
			    upg_7106_to_7202=true;
                            upg_7202_to_7203=true;
                            upg_7203_to_7301=true;
                            upg_7301_to_7302=true;
			    } else {
				if (upg_from_ver=="7.1.2")
				{
                                   upg_7102_to_7103=true;
				   upg_7103_to_7104=true;
				   upg_7104_to_7105=true;
			           upg_7105_to_7106=true;
				   upg_7106_to_7202=true;
                                   upg_7202_to_7203=true;
                                   upg_7203_to_7301=true;
                                   upg_7301_to_7302=true;
				} else {
				    if (upg_from_ver=="7.1.3")
                                    {
			       	       upg_7103_to_7104=true;
                                       upg_7104_to_7105=true;
			               upg_7105_to_7106=true;
				       upg_7106_to_7202=true;
                                       upg_7202_to_7203=true;
                                       upg_7203_to_7301=true;
                                       upg_7301_to_7302=true;
                                     } else {
                                         if (upg_from_ver=="7.1.4")
                                         {
                                            upg_7104_to_7105=true;
				            upg_7105_to_7106=true;
					    upg_7106_to_7202=true;
                                            upg_7202_to_7203=true;
                                            upg_7203_to_7301=true;
                                            upg_7301_to_7302=true;
                                           } else {
                                               if (upg_from_ver=="7.1.5")
                                               {
                                                  upg_7105_to_7106=true;
						  upg_7106_to_7202=true;
                                                  upg_7202_to_7203=true;
                                                  upg_7203_to_7301=true;
                                                  upg_7301_to_7302=true;
                                                } else {
                                               if (upg_from_ver=="7.1.6")
                                               {
                                                  upg_7106_to_7202=true;
                                                  upg_7202_to_7203=true;
                                                  upg_7203_to_7301=true;
                                                  upg_7301_to_7302=true;
 						} else {
                                                 if (upg_from_ver=="7.2.2")
                                                  {
                                                    upg_7202_to_7203=true;
                                                    upg_7203_to_7301=true;
                                                    upg_7301_to_7302=true;
                                                 } /* if (upg_from_ver=="7.2.2") */
                                                 else{
                                                 if(upg_from_ver == "7.2.3")
                                                 {
                                                    upg_7203_to_7301=true;
                                                    upg_7301_to_7302=true;

                                                 }
                                               }
                                              } /* if (upg_from_ver=="7.1.6") */
                                            } /* if (upg_from_ver=="7.1.5") */
				        } /* if (upg_from_ver=="7.1.4") */	
				    } /* if (upg_from_ver=="7.1.3") */
				} /* if (upg_from_ver=="7.1.2") */
		   	    } /* if (upg_from_ver=="7.0.16") */
			} /* if (upg_from_ver=="7.0.15") */
                    } /* if (upg_from_ver=="7.0.13") */
                } /* if (upg_from_ver=="7.0.12") */
            } /* if (upg_from_ver=="7.0.11") */
        } /* if (upg_from_ver==pre_easily_upgradable_option) */
        /*
         * If someone is upgrading to a 7.1 database, there is no reason
         * to go through the step of upgrading from 7.0.13 to 7.0.15.  
         * Therefore, if upg_7013_to_7015 is true, then upg_7013_to_7102 should
         * be set to true, and upg_7013_t0_7015 should be set back to false.
	*/

        if (upg_7013_to_7015)
        {
            upg_7013_to_7102 = true;
            upg_7013_to_7015 = false;
        } /* if (upg_7013_to_7015) */
    } else {
        no_upgrade_scripts_needed=false;
        if (relink_only && database_exists)
        {
            no_upgrade_scripts_needed=true;
            upg_from_ver=rel_version;  /* Note: rel_version set in unix.zoo */
        } /* if (relink_only && database_exists) */
    } /*    if ((do_upgrade && not(do_migrate)) ||
                (load_or_relink_only && database_exists)) */

    /* NON-OFA COMPLIANT:
     * At this point if we are doing a non-OFA Compliant install there is
     * no need to ask anymore questions.
     * Proof:
     * 1.  A database already exists.
     *     a.  We know that we can start it up, because we know:
     *         - That no databases with this ORACLE_HOME are up.
     *         - If this is an upgrade, we know what scripts to run against it.
     * 2.  A database doesn't already exist.
     *     a. if do_db_actions is true, then we'll be creating a database
     *        since do_upgrade should be false.
     *     b. if load_or_relink_only is true, then database_exists will be
     *        false and there will be no reason to attempt to start up the
     *        the database.
     */
    /* OFA COMPLIANT:
     * What we still need to do if this is an OFA COMPLIANT installation:
     * 1.  We need to make sure that there is an initSID.ora in the 
     *     ORACLE_HOME/dbs directory.  To do this, we need to find out the 
     *     dbname of the existing database.  We'll never need to do this for 
     *     do_upgrade since we know that an initSID.ora must already exist if 
     *     we're installing into a pre-existing Oracle Home, or one already
     *     got created during the Load Software Only phase of an upgrade
     *     involving a new Oracle Home.
     * 2.  If a database exists and the user is just loading or relinking,
     *     they may not want to shut the database down and start it up again.
     *     They may wish to do this at a more opportune time.  If they are
     *     upgrading then they must shutdown the database first.  As long
     *     as no upgrade scripts are required for the files they are loading,
     *     the database may be started up.
     * 3.  If the user is doing an upgrade or wants to start up the database
     *     with the new executables, then they must shutdown the old database
     *     first.  If they are using the same Oracle Home as the previous 
     *     version of the database, then we already know that all the databases
     *     controlled by that set of executables have been shutdown.  On the
     *     other hand, if this is an upgrade from a new Oracle Home or if
     *     they want the database to be started up after relinking or loading
     *     files, then they must tell us about the old Oracle Home so that
     *     we can be sure the database has been shutdown first.
     */
    if (OFA_Compliant && 
        ((do_upgrade && not(do_migrate)) || 
         (load_or_relink_only && database_exists)))
    {
        /* We only need to set up an initSID.ora link when the user is
         * loading or relinking, not when upgrading.  See the arguments above.
         * We need to find out the dbname of the database, so we can set
         * up the soft link from $ORACLE_HOME/dbs/initSID.ora to the 
         * $ORACLE_BASE/admin/dbname/pfile/initSID.ora file.
         */ 
        dbs_pfile="%Oracle_Home%/dbs/init%Oracle_Sid%.ora";
        if(load_or_relink_only && not(exists(dbs_pfile)))
        {
            dbname="";
            while (dbname=="")
            {
                 
	{ /*_TEXT_DLG ( old_dbname_prompt , dbname_default , old_dbname_content , old_dbname_help , dbname_default , dbname ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( dbname_default , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = dbname_default ; ] 
	  } 
	  else 
	    _dflt_str = dbname_default ; 
	  if ( Default_Install ) 
	    dbname = _dflt_str ; 
	  else 
	    dbname = TEXT_DIALOG ( old_dbname_prompt , _dflt_str , old_dbname_content , old_dbname_help ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( dbname_default , dbname , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = old_dbname_prompt ; _answer = dbname ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
                 
	{ /*_LOG_MSG ( "User says dbname is: %dbname%" , Install_Log ) */ 
	  _msg = "User says dbname is: %dbname%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                if (length(dbname) > dbname_max_length)
                {
                     
	{ /*_LOG_MSG ( dbname_too_long_info , Install_Log ) */ 
	  _msg = dbname_too_long_info ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                    information_dialog(dbname_too_long_info);
                    dbname="";
                } else {
                    dbname_admin_dir="%Oracle_Base%/admin/%dbname%";
                    if (not(exists(dbname_admin_dir)))
                    {
                         
	{ /*_LOG_MSG ( instantiate ( dbname_nonex_info ) , Install_Log ) */ 
	  _msg = instantiate ( dbname_nonex_info ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                        information_dialog(instantiate(dbname_nonex_info));
                        dbname="";
                    } else {
                        pfile_spec=
                            "%dbname_admin_dir%/pfile/init%Oracle_Sid%.ora";
                        if (not(exists(pfile_spec)))
                        {
                             
	{ /*_LOG_MSG ( instantiate ( pfile_not_exists_info ) , Install_Log ) */ 
	  _msg = instantiate ( pfile_not_exists_info ) ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                            information_dialog(instantiate
                                (pfile_not_exists_info));
                            dbname="";
                        }
                    } /* if (not(exists(dbname_admin_dir))) */
                } /* if (length(dbname) > dbname_max_length) */
		Default_Install=FALSE;
            } /* while (dbname=="") */
	    Default_Install=Def_Inst_sav;
        } /* if (load_or_relink_only && not(exists(dbs_pfile))) */

        /*
         * At this point, if we are doing an OFA_Compliant upgrade into a 
         * different Oracle_Home than was used to create or upgrade the 
         * database in the past, then we should ask the person if they would
         * like the database started up once loading or relinking is finished.
         * But we should only do this if no upgrade scripts are needed.
         * If they say yes, then we should ask them to be sure that the
         * database is not currently running.  We would only be able to check
         * on this ourselves if we ask them for their old Oracle Home.
         */
        if (load_or_relink_only && database_exists &&
            no_upgrade_scripts_needed && not(do_upgrade))
        {
             
	{ /*_YESNO_DLG ( instantiate ( startup_load_link_prompt ) , true , startup_load_link_content , instantiate ( startup_load_link_help ) , "%pname%.startup_after_load_relink" , startup_after_load_relink ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.startup_after_load_relink" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    startup_after_load_relink = _dflt_bool ; 
	  else 
	    startup_after_load_relink = YESNO_DIALOG ( instantiate ( startup_load_link_prompt ) , _dflt_bool , startup_load_link_content , instantiate ( startup_load_link_help ) ) ; 
	  if ( startup_after_load_relink ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.startup_after_load_relink" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( startup_load_link_prompt ) ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        }

        /* If doing an OFA Compliant install or upgrade.  Then we need to be
         * be sure that the old database has been shutdown, so that it is
         * no longer using the old executable.  Remember, at this point
         * we know that a database already exists.  We only insist that 
         * the old database be taken down if:
         * 1.  There will be database upgrade actions taken against the
         *     database.
         * 2.  The user is only loading or relinking executables, but there
         *     are no upgrade scripts that are required to be run.
         * Therefore, we need to find out the old Oracle Home.
         * NOTE:  This would only happen in an OFA_Compliant install/upgrade.
         */ 
        if (do_db_actions || startup_after_load_relink)
        {
            old_oracle_home_dflt="%Oracle_Base%/product/%upg_from_ver%";
            old_oracle_home="";
            while(old_oracle_home=="")
            {
                 
	{ /*_TEXT_DLG ( instantiate ( old_oracle_home_prompt ) , old_oracle_home_dflt , old_oracle_home_content , instantiate ( old_oracle_home_help ) , "%pname%.old_oracle_home" , old_oracle_home ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { _tmp_var = translate ( "%pname%.old_oracle_home" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_str = old_oracle_home_dflt ; ] 
	  } 
	  else 
	    _dflt_str = old_oracle_home_dflt ; 
	  if ( Default_Install ) 
	    old_oracle_home = _dflt_str ; 
	  else 
	    old_oracle_home = TEXT_DIALOG ( instantiate ( old_oracle_home_prompt ) , _dflt_str , old_oracle_home_content , instantiate ( old_oracle_home_help ) ) ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.old_oracle_home" , old_oracle_home , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "TEXT" ) */ 
	  _dlg_type = "TEXT" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( old_oracle_home_prompt ) ; _answer = old_oracle_home ; 
	  _dummy = "       Q> %_prompt%" ; modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; modify ( "" , _dummy , Install_Log ) ; 
	}
                 
	{ /*_LOG_MSG ( "User says old_oracle_home is: %old_oracle_home%" , Install_Log ) */ 
	  _msg = "User says old_oracle_home is: %old_oracle_home%" ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                {
                    if (not(exists(old_oracle_home)))
                    {
                        old_oracle_home_wrong=true;
                    } else {
                        old_oracle_home_wrong=false;
                         
	{ /*_LOG_MSG ( "It exists." , Install_Log ) */ 
	  _msg = "It exists." ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                    } /* if (not(exists(old_oracle_home))) */
                }
                [ 'OS_ERROR: old_oracle_home_wrong=true;
                ]
                if (old_oracle_home_wrong)
                {
                    information_dialog(instantiate(old_oracle_home_info));
                     
	{ /*_LOG_MSG ( "It doesn't exist.  Try again." , Install_Log ) */ 
	  _msg = "It doesn't exist.  Try again." ; 
	  _logfile = Install_Log ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
                    old_oracle_home="";
                }
		Default_Install=FALSE;
            } /* while (old_oracle_home=="") */
	    Default_Install=Def_Inst_sav;
            /* Now attempt to shutdown the database if it is up. */
            old_sgadef_file="%old_oracle_home%/dbs/sgadef%Oracle_Sid%.dbf";
            if (exists(old_sgadef_file))
            {
	         
	{ /*_YESNO_DLG_N ( shutdown_db_prompt , true , "%pname%.shutdown_db" , shutdown_db ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.shutdown_db" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    shutdown_db = _dflt_bool ; 
	  else 
	    shutdown_db = YESNO_DIALOG ( shutdown_db_prompt , _dflt_bool ) ; 
	  if ( shutdown_db ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.shutdown_db" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = shutdown_db_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
	        if (not(shutdown_db))
	        {
      	            signal('CANCEL, instantiate(db_exists_prompt));
		} /* if (shutdown_db) */
		else
		{
                    /* Need to modify environment's Oracle_Home for this
                     * small part.
                     */
                    modify("ORACLE_HOME", old_oracle_home);
                    /*
                     * shutdown(); Someday, this function will be available.
                     */
                    ui_action(dbshut_msg); 
		     
	{ /*_SYSTEM ( "%old_oracle_home%/rdbms/install/rdbms/shutdown.sh" , dbshut_msg , status ) */ 
	  _cmd = "%old_oracle_home%/rdbms/install/rdbms/shutdown.sh" ; _com = dbshut_msg ; 
	   
	{ /*_LOG_SEL ( _cmd ,  outfile ) */ 
	    outfile = OS_Log ; 
	   if ( contains ( _cmd , "bin/sqldba" ) || contains ( _cmd , "bin/sqlplus" ) || contains ( _cmd , "bin/svrmgrl" ) || contains ( _cmd , "dbs/migrate.bsq" ) ) 
	      outfile = Sql_Log ; 
	   if ( contains ( _cmd , "make " ) ) 
	      outfile = Make_Log ; 
	} 
	  _out = outfile ; _err = outfile ; 
	  modify ( "" , log_divider ( ) , outfile ) ; 
	  modify ( "" , "Action:  %_com%" , _out ) ; 
	  modify ( "" , "Command: (%_cmd%), Out=%_out%, Err=%_err%" , _out ) ; 
	  modify ( "" , "{" , _out ) ; 
	  _stat = spawn ( _cmd , _out , _err ) ; 
	  modify ( "" , "}" , _out ) ; 
	  modify ( "" , "Status:  %_stat%" , _out ) ; 
	  if ( _stat != 0 ) { 
	  modify ( "" , "(( OIERR-SYSTEM: %_cmd% ))" , _out ) ; 
	  } 
	  status = _stat ; 
	  modify ( "" , log_divider ( ) , _out ) ; 
	} /*End SYSTEM*/
                    modify("ORACLE_HOME", Oracle_Home);
                    if (not(status == 0))
                    {
                         
	{ /*_SYS_ERR ( instantiate ( vrf_shutdown_error ) ) */ 
	      _com = instantiate ( vrf_shutdown_error ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	      modify ( "" , "Action:  %_com%" , Install_Log ) ; 
	      _line = replace ( log_divider ( ) , "-" , "" ) ; 
	      modify ( "" , log_divider ( ) , Install_Log ) ; 
	}
                        signal('CANCEL, instantiate(vrf_shutdown_error));
                    }
                } /* if (not(shutdown_db)) */ 
            } /* if (exists(old_sgadef_file)) */
        } /* OFA_Compliant && (do_db_actions || startup_after_load_relink)) */
    } /*     if (OFA_Compliant &&
                 ((do_upgrade && not(do_migrate)) ||
                  (load_or_relink_only && database_exists))) */

	 
	{ /*_CHECK_INST_CD_DOC*/ 
	  install_cd_doc = false ; 
	  if ( OraDoc )  
	  {  
	    if ( do_load && Do_Install_CD_Doc ) 
	    { 
		{ 
		/* -- - Load GLOBAL SELECTED SIZE info*/ 
		   { install_doc_size_selected = translate (  
			"tmp.install_doc_size_selected" , User_Dflt_File , "=" ) ; } 
		   [ 'DEFAULT : { install_doc_size_selected = install_doc_size_unknown ; } ] 
	 
	        /* -- - Determine Document NAME and DOCS to include*/ 
	          _tmp_Ver = explode ( "%current_version%" , "." ) ; 
		  _tmp_Ver1 = first ( _tmp_Ver ) ; 
		  _tmp_Ver2 = first ( rest ( _tmp_Ver ) ) ; 
		  _docver = "%_tmp_Ver1%%_tmp_Ver2%" ; 
		  install_docs = explode ( translate ( "%pname%/%_docver%" , 
					install_doc_map_file , "=" ) ) ; 
		/* -- - Space used if we select this item*/ 
		  _tmp_DocsIfSelected = list ( ) ; /*NB : Must do it this way ( union ) */ 
		  union ( _tmp_DocsIfSelected , install_docs_selected ) ; 
		  union ( _tmp_DocsIfSelected , install_docs ) ; 
		  
	{ /*_CALC_DOC_SPACE_RQD*/ 
	  { 
		_tmp_docs = _tmp_DocsIfSelected ; 
		ret_DocSpaceRqd = 0 ; 
		while ( not ( empty ( _tmp_docs ) ) ) { 
			_tmp_Doc = first ( _tmp_docs ) ; 
			_tmp_Size = translate ( "%_tmp_Doc%" , 
					install_doc_size_file , "=" ) ; 
			ret_DocSpaceRqd = ret_DocSpaceRqd + _tmp_Size ; 
			_tmp_docs = rest ( _tmp_docs ) ; 
		} 
	  } 
	  [ 'DEFAULT : { ret_DocSpaceRqd = install_doc_size_unknown ; } ] 
	} 
		  _tmp_SpaceIfSelected = ret_DocSpaceRqd ; 
		/* -- - Calculate extra space needed by this DOC*/ 
		  install_doc_size = _tmp_SpaceIfSelected - install_doc_size_selected ; 
		} 
	        [ 'DEFAULT : { install_doc_size = install_doc_size_unknown ; 
			      install_docs = list ( ) ; } ] 
	 
		/* -- - How much free space is there ? */ 
	        { install_doc_freespace = free_space ( "%Oracle_Doc%" ) 
					 - install_doc_size_selected ; } 
	        [ 'UNDERFLOW : { install_doc_freespace = 0 ; } 
	          'DEFAULT : { install_doc_freespace = install_doc_size_unknown ; } ] 
	        if ( Do_Ask_Install_CD_Doc ) { 
		  { install_doc_freespace_kb = install_doc_freespace / 1024 ; } 
		  [ 'DEFAULT : { install_doc_freespace_kb = install_doc_size_unknown ; } ] 
		  { install_doc_size_selected_kb = 1 + ( install_doc_size_selected / 1024 ) ; } 
		  [ 'DEFAULT : { install_doc_size_selected_kb = install_doc_size_unknown ; } ] 
		  { install_doc_size_kb = 1 + ( install_doc_size / 1024 ) ; } 
		  [ 'DEFAULT : { install_doc_size_kb = install_doc_size_unknown ; } ] 
	          
	{ /*_YESNO_DLG ( instantiate ( install_doc_from_cd_prompt ) ,  true ,  
	              install_doc_from_cd_content ,  install_doc_from_cd_help ,  
	              "%pname%.install_cd_doc" , install_cd_doc ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( 
	              "%pname%.install_cd_doc" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    install_cd_doc = _dflt_bool ; 
	  else 
	    install_cd_doc = YESNO_DIALOG ( instantiate ( install_doc_from_cd_prompt ) , _dflt_bool ,  
	              install_doc_from_cd_content ,  install_doc_from_cd_help ) ; 
	  if ( install_cd_doc ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( 
	              "%pname%.install_cd_doc" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = instantiate ( install_doc_from_cd_prompt ) ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	        } 
	        else 
	          install_cd_doc = true ; 
	    } 
	    if ( install_cd_doc ) { 
	      { install_doc_size_selected = install_doc_size_selected + install_doc_size ; 
		union ( install_docs_selected , install_docs ) ; } 
	      [ 'DEFAULT : { install_doc_size_selected = install_doc_size_unknown ; } ] 
	    } 
	    /* -- - Update the GLOBAL SIZE SELECTED figure*/ 
	    { modify ( "tmp.install_doc_size_selected" , "%install_doc_size_selected%" , 
		   User_Dflt_File , "=" ) ; } 
	    [ 'DEFAULT : { } ] 
	  }  
	} 

    /*
     * Return total size of the product files.
     */
     
	{ /*_TOTAL_SZ ( sum ( base , admin , bin , lib , dbs , instal , mesg_dflt , mesg , doc ) , depend_size , total_size ) */ 
	  if ( do_load ) 
	    total_size = ( sum ( base , admin , bin , lib , dbs , instal , mesg_dflt , mesg , doc ) ) + ( depend_size ) ; 
	  else 
	    total_size = ( depend_size ) ; 
	}

    if (do_migrate)
    {
         
	{ /*_YESNO_DLG ( last_chance_prompt , true , last_chance_content , last_chance_help , "%pname%.last_chance_output" , last_chance_output ) */ 
	  if ( exists ( User_Dflt_File ) ) 
	  { 
	    { 
	      _tmp_var = translate ( "%pname%.last_chance_output" , User_Dflt_File , "=" ) ; 
	      _dflt_str = "%_tmp_var%" ; 
	      if ( _dflt_str == "TRUE" ) 
	        _dflt_bool = TRUE ; 
	      else 
	        _dflt_bool = FALSE ; 
	    } 
	    [ 'UNBOUND_ENVIRONMENT_VARIABLE : _dflt_bool = true ; ] 
	  } 
	  else 
	    _dflt_bool = true ; 
	  if ( Default_Install ) 
	    last_chance_output = _dflt_bool ; 
	  else 
	    last_chance_output = YESNO_DIALOG ( last_chance_prompt , _dflt_bool , last_chance_content , last_chance_help ) ; 
	  if ( last_chance_output ) 
	    _answer = "TRUE" ; 
	  else 
	    _answer = "FALSE" ; 
	  if ( exists ( User_Dflt_File ) ) modify ( "%pname%.last_chance_output" , _answer , User_Dflt_File , "=" ) ; 
	  
	{ /*_LOG_HDR ( "YESNO" ) */ 
	  _dlg_type = "YESNO" ; 
	  modify ( "" , "      " , Install_Log ) ; 
	  if ( _dlg_type == "YESNO" ) 
	    _dummy = "-[ YESNO ]--------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "TEXT" ) 
	    _dummy = "-[ TEXT ]---------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "SINGLE_SELECT" ) 
	    _dummy = "-[ SINGLE_SELECT ]------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_SELECT" ) 
	    _dummy = "-[ MULTI_SELECT ]-------------------------------------------------------------" ; 
	  else if ( _dlg_type == "GET_FILE" ) 
	    _dummy = "-[ GET_FILE ]-----------------------------------------------------------------" ; 
	  else if ( _dlg_type == "PASSWD" ) 
	    _dummy = "-[ PASSWD ]-------------------------------------------------------------------" ; 
	  else if ( _dlg_type == "MULTI_TEXT" ) 
	  { 
	    divider = "############################################################" ; 
	    dummy  = "#                    INSTALL LOG FILE                      #" ; 
	    linespace = "                     " ; 
	    modify ( "" , divider , Install_Log ) ; 
	    modify ( "" , dummy , Install_Log ) ; 
	    modify ( "" , divider , Install_Log ) ; 
	    spawn ( "echo %Install_Log%" , Install_Log , Install_Log ) ; 
	    spawn ( "echo `date` - `id`" , Install_Log , Install_Log ) ; 
	    modify ( "" , linespace , Install_Log ) ; 
	    dummy  = "#                    SQL LOG FILE                          #" ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    modify ( "" , dummy , Sql_Log ) ; 
	    modify ( "" , divider , Sql_Log ) ; 
	    spawn ( "echo %Sql_Log%" , Sql_Log , Sql_Log ) ; 
	    spawn ( "echo `date` - `id`" , Sql_Log , Sql_Log ) ; 
	    modify ( "" , linespace , Sql_Log ) ; 
	    dummy  = "#                    MAKE LOG FILE                         #" ; 
	    modify ( "" , divider , Make_Log ) ; 
	    modify ( "" , dummy , Make_Log ) ; 
	    modify ( "" , divider , Make_Log ) ; 
	    spawn ( "echo %Make_Log%" , Make_Log , Make_Log ) ; 
	    spawn ( "echo `date` - `id`" , Make_Log , Make_Log ) ; 
	    modify ( "" , linespace , Make_Log ) ; 
	    dummy  = "#                    OS LOG FILE                           #" ; 
	    modify ( "" , divider , OS_Log ) ; 
	    modify ( "" , dummy , OS_Log ) ; 
	    modify ( "" , divider , OS_Log ) ; 
	    spawn ( "echo %OS_Log%" , OS_Log , OS_Log ) ; 
	    spawn ( "echo `date` - `id`" , OS_Log , OS_Log ) ; 
	    modify ( "" , linespace , OS_Log ) ; 
	    _dummy = "-[ MULTI_TEXT ]-------------------------------------------------------------" ; 
	  } 
	  modify ( "" , _dummy , Install_Log ) ; 
	} 
	  _prompt = last_chance_prompt ; 
	  _dummy = "       Q> %_prompt%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	  _dummy = "       A> %_answer%" ; 
	  modify ( "" , _dummy , Install_Log ) ; 
	}
        if (last_chance_output)
        {
            signal('CANCEL, last_chance_quit);
        } /* !last_chance_output */
    } /* do_migrate */

     
	{ /*_LOG_MSG ( "Leaving rdbms.vrf" , "" ) */ 
	  _msg = "Leaving rdbms.vrf" ; 
	  _logfile = "" ; 
	  if ( _logfile == "" ) 
	  { 
	    modify ( "" , ">>> %_msg%" , Install_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Sql_Log ) ; 
	    modify ( "" , ">>> %_msg%" , Make_Log ) ; 
	    modify ( "" , ">>> %_msg%" , OS_Log ) ; 
	    if ( ORCA_Debug ) 
	      modify ( "" , ">>> %_msg%" , Debug_Log ) ; 
	  } 
	  else if ( _logfile == Install_Log ) 
	    modify ( "" , "     - %_msg%" , Install_Log ) ; 
	  else if ( _logfile == Sql_Log ) 
	    modify ( "" , "     - %_msg%" , Sql_Log ) ; 
	  else if ( _logfile == Make_Log ) 
	    modify ( "" , "     - %_msg%" , Make_Log ) ; 
	  else if ( _logfile == OS_Log ) 
	    modify ( "" , "     - %_msg%" , OS_Log ) ; 
	  else if ( _logfile == Debug_Log ) 
	    if ( ORCA_Debug ) 
	      modify ( "" , "     - %_msg%" , Debub_Log ) ; 
	  else 
	    information_dialog ( "Bad Log file name" ) ; 
	}
    return(total_size); 
}}}
 
