Operating System - HP-UX
1822494 Members
2422 Online
109642 Solutions
New Discussion юеВ

Oracle forms environment variable problem.

 
SOLVED
Go to solution
Michael Langas
Advisor

Oracle forms environment variable problem.

Can anyone describe how evironment variables work inside of oracle forms? Pointing me to docs works to ;-)

I recently move a users home directory on a dev server and it broke a script that is being called by an oracle form. The user has hardcoded $HOME in the script because it is not being initialized when called from the oracle form. It's obvious why this broke the script. I have little to no knowledge of oracle forms, so any advice will be appreciated.

Thanks.
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: Oracle forms environment variable problem.

Environment variables really don't work inside of forms.

What they effect is the behavior of the forms server/servelets when they are started.

The place to focus is the startup script for the forms server or the servlet configuration.

Key variables are:

FORMS_PATH

This tells the server WHERE to look for forms.

Here is a working environment dump

_=/usr/bin/env
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/mx/share/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/resmon/share/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/scr/share/man:/usr/dt/share/man:/opt/samba/man://opt/perl/man:/opt/aCC/share/man/%L:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/perf/man/%L:/opt/perf/man:/opt/OV/man/itose/%L:/opt/OV/man/itose:/opt/audio/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/image/share/man:/opt/imake/man:/opt/ldapux/share/man:/opt/ldapux/ypldapd/man:/opt/sec_mgmt/share/man/%L:/opt/sec_mgmt/share/man:/opt/ssh/share/man:/opt/gnome/man:/opt/graphics/common/man:/opt/aCC/share/man
SHLIB_PATH=/ias/product/1.0.2/6iserver/lib:usr/lib:usr/ucblib
PATH=/ias/product/1.0.2/6iserver/bin:/ias/product/1.0.2/Apache/Apache/bin:/ias/product/1.0.2/6iserver/icache/lib:/ias/product/1.0.2/6iserver/ifs1.1/bin:/ias/product/1.0.2/6iserver/webcache/bin:/ias/product/1.0.2/6iserver/6iserver:/ias/product/1.0.2/6iserver/discwb33/util:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/mx/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/pd/bin:/opt/resmon/bin:/opt/ignite/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/scr/bin://opt/perl/bin:/usr/sbin/diag/contrib:/opt/aCC/bin:/opt/langtools/bin:/opt/perf/bin:/opt/OV/bin/OpC:/opt/imake/bin:/opt/sec_mgmt/spc/bin:/opt/sec_mgmt/bastille/bin:/opt/gnome/bin:/opt/mozilla:/opt/netscape:/opt/graphics/common/bin:/oracle/scripts/tst/compile:/ias/product/1.0.2/6iserver/forms60/sysalt
COLUMNS=80
EDITOR=vi
LOGNAME=forms60
TMP=/utmp
LIBPATH=/ias/product/1.0.2/6iserver/network/jre11/lib/PA_RISC
ORACLE_SID=ias
ERASE=^H
TNS_ADMIN=/ias/product/1.0.2/6iserver/network/admin
DISPLAY=kch3lgf.juf.net:0.0
SHELL=/sbin/sh
ORATAB=/etc/oratab
HOME=/home/forms60
TERM=xterm
ORACLE_HOME=/ias/product/1.0.2/6iserver/
PWD=/home/forms60
TZ=CST6CDT
LINES=24

Here is a working .profile

Some things have to be adapted to your environment such as oracle home.

@(#) $Revision: 66.1.1.1 $

# Default user .profile file (/bin/sh initialization).

# Set up the terminal:
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl cs8 -parity
tabs

# Set up the search paths:
# PATH=/home/forms60/bin:$PATH

# Set up the shell environment:
set -u
trap "echo 'logout'" 0

# Set up the shell variables:
EDITOR=vi
export EDITOR

ORACLE_SID=ias
#ORACLE_BASE=/oracle
export ORACLE_SID
export ORACLE_BASE
ORACLE_HOME=/ias/product/1.0.2/6iserver/
IAS_HOME=/ias/product/1.0.2/
export ORACLE_HOME
ORATAB=/etc/oratab
export ORATAB

# . /usr/contrib/bin/setOraProfile
#echo "Starting oracle settings"

export TMP=/utmp
#export SHLIB_PATH=${ORACLE_HOME}lib:usr/lib:usr/ucblib/:$SHLIB_PATH
SHLIB_PATH=${ORACLE_HOME}lib:usr/lib:usr/ucblib
export SHLIB_PATH

export LIBPATH=${ORACLE_HOME}network/jre11/lib/PA_RISC

PATH=${ORACLE_HOME}bin:${IAS_HOME}Apache/Apache/bin:${ORACLE_HOME}icache/lib:${ORACLE_HOME}ifs1.1/bin:${ORACLE_HOME}webcache/bin:${ORACLE_HOME}6iserver:${ORACLE_HOME}discwb33/util:$PATH:/oracle/scripts/tst/compile:/ias/product/1.0.2/6iserver/forms60/sysalt
export PATH

# PATH=$PATH:/oracle/scripts/tst/compile

echo $PATH

TNS_ADMIN=${ORACLE_HOME}network/admin
export TNS_ADMIN
clear
. /ias/product/1.0.2/6iserver/forms60.sh

ORACLE_SID=ias
export ORACLE_SID
#. /usr/contrib/bin/setOraProfile
# DISPLAY=10.1.102.149:0.0
# export DISPLAY
# PATH=$ORACLE_HOME/bin:$PATH
# FORMS60_PATH=$ORACLE_HOME/forms60/jufdev;export FORMS60_PATH

#. /usr/contrib/bin/setOraProfile
DISPLAY=10.1.102.108:0.0
export DISPLAY
PATH=$ORACLE_HOME/bin:$PATH
FORMS60_PATH=$ORACLE_HOME/forms60/sysalt;export FORMS60_PATH


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Michael Langas
Advisor

Re: Oracle forms environment variable problem.

Steven,

Thanks for the quick response. I'm still not sure I understand how the HOME variable will get set. It's normally dynamic and I would like to keep it that way. I don't want them hardcoding it in the .profile if at all possible. Keep in mind I'm not talking about ORACLE_HOME. They are picking stuff up from their home dir.

Thanks again

Mike
Lisa  Mauer
Regular Advisor

Re: Oracle forms environment variable problem.

Michael: Not sure if this is what you are looking for, but we set all our Oracle and application environment variables in a script in /usr/local/bin, then that script gets called from everyone's .profile. That way only 1 script needs to be changed and anytime someone logs into the .profile those variables will get set.