#
# $Header: o8srvr.805.vrf.pp  96/08/17 15:31:57 <unix> $ Copyr (c) 1992 Oracle
#

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

/***************************************************************************
NAME
    o8srvr.805.vrf.pp

FUNCTION
    Performs the following for the documentation for product :
    - Product depenency analysis to determine whether
      to load the product files.

CREATED
    GBARSKAY		08/15/96

MODIFIED
    NORMSETH            04/17/97 
    NORMSETH		06/13/97
***************************************************************************/
{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.                                                           */
/* 8/10/95 - For client Side shared lib support */
/* 2/4/97 - For Intelligent Agent support */
/*
 * $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." );







/* Install Merge Changes */
/* Changed SIZE_DLG to SIZE_DLG_MAX */

/* Install Merge Changes */
/* Added the #ifdef KEEP_COMMENTS block */


/* Install Merge Changes */


/* 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 o8srvr.805.vrf", "")*/ 
	   _msg="Entering o8srvr.805.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%", Debug_Log); 
	   else 
	     information_dialog("Bad Log file name"); 
	}

    /*
     * String initialization
     */

    product = server_doc;
    src = "%Stage_Home%/o8srvr.805";


odoc_prompt=nls("odoc_prompt","Enter the pathname for your $ORACLE_DOC directory:");
odoc_content=nls("odoc_content","ORACLE_DOC");
odoc_help=nls("odoc_help", "ORACLE_DOC is a directory where you installed all Product Documentation.");
odoc_info1=nls("odoc_info1","You must specify $ORACLE_DOC.");
odoc_info6=nls("odoc_info6","You have entered the wrong ORACLE_DOC directory.");

format_prompt=nls("format_prompt", "Select one of the following formats for your Oracle8 Server documentation: ");
format_content=nls("format_content", "Documentation Format");
format_help=nls("format_help", "Oracle online documentation is available in HTML and PDF formats.  Select the format(s) you want to install.  HTML documents can be read with a browser; PDF documents require an Adobe Acrobat Reader 3.0 or higher.");
format_html=nls("format_html", "HTML");
format_pdf=nls("format_pdf", "PDF");
format_all=nls("format_all", "Both");

has_db_objects=false;

/*
 * $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*/

    /*
     * Product dependency analysis.
     */
    depend_size= 0;

     
	{/*_VERIFY_PRODUCT( dcommon , "dcommon" , tmp_size )*/ 
	   { 
	     _prod_bound=TRUE; 
	     tmp_size =0; 
	     _tmp_var=product_interface_label( dcommon ); 
	   } 
	   [ 
	     'UNBOUND_VARIABLE: 
	     { 
	       _prod_bound=FALSE; 
	       _pname= "dcommon" ; 
	       if (not(Build_Stage_Only)) 
	         if (not(registered(_pname))) 
	           signal('CANCEL,instantiate(Depend_Not_Installed_Mesg)); 
	     } 
	   ] 
	   { 
	     if (_prod_bound) 
	        tmp_size =verify( dcommon ); 
	   } 
	}

/*
 * $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_cd_doc = false;
        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_Doc_Only) || (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*/



/* This needs to be done in case a path different from
   "Install Doc Only" was selected and therefore ORACLE_DOC
   directory is not defined.
*/

        {
           test=OD;
        }
        [ 'UNBOUND_VARIABLE:
        {
          if( empty(odoc_list) )
          {
        {
            Oracle_Base=translate("ORACLE_BASE");
        }
        [ 'UNBOUND_ENVIRONMENT_VARIABLE: {
                Oracle_Base=""; }  ]


    /* Prompt for Oracle Doc directory */

    {
      odoc_dflt=translate("ORACLE_DOC");
      if (odoc_dflt == "")
      {
        if(Oracle_Base != "")
           odoc_dflt = "%Oracle_Base%/doc";
        else
           odoc_dflt = "%Oracle_Home%/doc";
      }
    }
    [ 'UNBOUND_ENVIRONMENT_VARIABLE: {
      if(Oracle_Base != "")
         odoc_dflt="%Oracle_Base%/doc";
      else
         odoc_dflt="%Oracle_Home%/doc"; } ]

         Oracle_Doc = "";

    while (Oracle_Doc == "")
    {
        
	{/*_TEXT_DLG(odoc_prompt, odoc_dflt, odoc_content, odoc_help, "unix.Oracle_Doc", Oracle_Doc )*/ 
	   if (exists(User_Dflt_File)) 
	   { 
	     { _tmp_var=translate( "unix.Oracle_Doc", User_Dflt_File, "="); 
	       _dflt_str="%_tmp_var%"; 
	     } 
	     [ 'UNBOUND_ENVIRONMENT_VARIABLE: _dflt_str= odoc_dflt; ] 
	   } 
	   else 
	     _dflt_str= odoc_dflt; 
	   if (Default_Install) 
	      Oracle_Doc = _dflt_str; 
	   else 
	      Oracle_Doc =TEXT_DIALOG(odoc_prompt, _dflt_str, odoc_content, odoc_help); 
	   if (exists(User_Dflt_File)) modify( "unix.Oracle_Doc", Oracle_Doc , 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=odoc_prompt; _answer= Oracle_Doc ; 
	   _dummy="       Q> %_prompt%"; modify("", _dummy, Install_Log); 
	   _dummy="       A> %_answer%"; modify("", _dummy, Install_Log); 
	}

        if (Oracle_Doc == "")
            information_dialog(odoc_info1);
        else
        {
		{make_directory(Oracle_Doc);}            
		[ 'INVALID_FILE_NAME, 'PERMISSION_DENIED, 'FILE_NOT_FOUND,
                  'WRITE_ERROR, 'OS_ERROR:
                     information_dialog(instantiate(odoc_info3));
		]
        }
     }

                OD = Oracle_Doc;
                add(odoc_list, Oracle_Doc);
          }
          else
                OD= first(odoc_list);
        }
        ]

        format_dflt = format_html;
        format_list = list (format_html, format_pdf, format_all);

        
	{/*_SINGLE_SELECT_DLG(format_prompt, format_list, format_dflt, format_content, format_help, "unix.Doc_format", format)*/ 
	   if (exists(User_Dflt_File) && (not(AddUpgInst && (( format_dflt == Doc_Load_All) || ( format_dflt == CD_Doc_Install_All))))) 
	   { 
	     { _tmp_var=translate( "unix.Doc_format", User_Dflt_File, "="); 
	       _dflt_str="%_tmp_var%"; 
	     } 
	     [ 'UNBOUND_ENVIRONMENT_VARIABLE: _dflt_str= format_dflt; ] 
	   } 
	   else 
	     _dflt_str= format_dflt; 
	   if (Default_Install) 
	      format = _dflt_str; 
	   else 
	      format=SINGLE_SELECTION_DIALOG(format_prompt, format_list, _dflt_str, format_content, format_help); 
	   if (exists(User_Dflt_File)) modify( "unix.Doc_format", format,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=format_prompt; _answer= format; 
	   _dummy="       Q> %_prompt%"; modify("", _dummy, Install_Log); 
	   _dummy="       A> %_answer%"; modify("", _dummy, Install_Log); 
	}



    add(Load_Product_List, product);
    /*
     * Return total size of files depending upon options selected ...
     */

        if (format == format_html)
                
	{/*_TOTAL_SZ(sum(base, instal, htmldoc), depend_size, total_size)*/ 
	   if (do_load) 
	      total_size = (sum(base, instal, htmldoc)) + ( depend_size); 
	   else 
	      total_size = ( depend_size); 
	}
        else if (format == format_pdf)
                
	{/*_TOTAL_SZ(sum(base, instal, pdf), depend_size, total_size)*/ 
	   if (do_load) 
	      total_size = (sum(base, instal, pdf)) + ( depend_size); 
	   else 
	      total_size = ( depend_size); 
	}
        else
                 
	{/*_TOTAL_SZ(sum(base, instal, htmldoc, pdf), depend_size, total_size)*/ 
	   if (do_load) 
	      total_size = (sum(base, instal, htmldoc, pdf)) + ( depend_size); 
	   else 
	      total_size = ( depend_size); 
	}


if (is_upgrade)
{
        RM_html = "Removing html documents before an upgrade ... ";

        
	{/*_RM(Rm_html, htmldoc)*/ 
	   
	{/*_ACTION(instantiate(Rm_html))*/ 
	   _com=instantiate(Rm_html); 
	   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%", Debug_Log); 
	   else 
	     information_dialog("Bad Log file name"); 
	} 
	} 
	   remove( htmldoc); 
	}

}

    return(total_size);
    
	{/*_LOG_MSG("Leaving o8srvr.805.vrf", "")*/ 
	   _msg="Leaving o8srvr.805.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%", Debug_Log); 
	   else 
	     information_dialog("Bad Log file name"); 
	}
}}}
 
