Oracle Interview Questions – Oracle Forms – Custom Development – FAQ


What is the ICX: Forms Launcher system profile option for?

This profile option is used by the Self Service Web Applications Personal Home Page (also known as ICX) to determine the base URL needed to launch an application, which in this case is a Forms application.

What should ICX: Forms Launcher be set to?

ICX: Forms Launcher –is set to ?http://machine_name:port/dev60cgi/f60cgi?. In Apps release 11i you can add some parameters to this URL to enable some Forms features like tracing.

What is FORMS60_TIMEOUT?
FORMS60_TIMEOUT is an environment setting that determines the maximum idle time (in minutes) before f60webmx shuts down.  Note that it will only terminate an idle middle tier process, i.e. one which is waiting for the "next message" from the client. If the middle tier process is running a transaction or waiting for a query to complete it will not have take effect.

How do you enable Forms Runtime Diagnostics (FRD) in Apps?
To enable Forms Runtime Diagnostics (FRD):

– login to Apps as sysadmin
– click on Profile/System
– query ICX%FORMS%LAUNCHER
– add the following to the end of its value at user level:
?record=collect&log=/tmp/forms_frd.log

Note that like any Apps profiles you can do this on various levels e.g. site, user, etc. so that you target your FRD accordingly. Also be aware that FRD incurs significant overhead to Apps processing so disable it when not in use

How do you generate Apps Forms modules or FMB files?
Oftentimes as part of upgrading Forms or modifying a Form module or applying a patch modifying a Form module, you would encounter an issue that would necessitate manually regenerating the Forms module executable or FMX file. To do this you issue the following command:

f60gen module=form_name.fmb userid=apps/apps output_file=form_name.fmx module_type=form batch=yes compile_all=special

How do you generate Apps Forms library modules or PLL files?
To do this you issue the following command:

f60gen module=library_name.pll userid=apps/apps module_type=library batch=yes compile_all=special

How do you generate Apps Forms menu modules or MMB files?
Note that there is only one menu for Apps so it is rare that you need to regenerate the menu. To do this you issue the following command:

f60gen module=FNDMENU.mmb userid=apps/apps output_file=FNDMENU.mmx module_type=menu batch=yes compile_all=special

What is the sequence in which Forms resolves program unit calls?
Forms will attempt to resolve a program unit call in the following sequence:

Program Units node
Forms Library
Database

Where can you find the source Forms modules for Apps?
Apps places all its source (FMB) files in the $AU_TOP/forms/<language> directory whereas the FMX files reside in their respective $PRODUCT_TOP/forms/<language> directory. On the other hand, all menu (MMB, MMX) and library (PLL and PLX) files are copied to the $AU_TOP/resource directory.

How can you find the version of Forms in Apps?
Once you are in an Apps form …

click on Help
click on About Oracle Applications

information is under the Current Form section. The Form Name corresponds to the FMB and FMX file for that form.  The Form Version corresponds to the release level of that form.

How can I open an Apps form in Forms Builder

If you want to open a product specific form, make sure you have all its associated forms and libraries copied over.  Since it is quite difficult to pinpoint exactly what this is, its best to just copy over the entire contents of $AU_TOP/forms/<language> and $AU_TOP/resource.

How can you confirm the version of the FMX or FMB file?
Oftentimes, once you determine the version and name of the current form you want to peek into the internal workings of the actual form itself. To ensure that you are peeking at the right release of the FMB file you can do the following:

$adident Header FNDSCSGN.fmb

If you simply copy the form over to a a machine that does not have Apps installed, you will run into is a lot of FRM-18108: "Failed to load the following objects" errors.  This is because an Apps form is usually dependent on a host of other forms, libaries and menus.

If you want to open the TEMPLATE.fmb form, make sure you have the following forms, libraries, copied over as well from the $AU_TOP/forms/<language> and $AU_TOP/resource directories:

APPSTAND.fmb
APPCORE.pll
APPCORE2.pll
APPDAYPK.pll
CUSTOM.pll
FNDSQF.pll
GHR.pll
GLOBE.pll
GSM.pll
JA.pll
JE.pll
JL.pll
VERT.pll
OPM.pll
PQH_GEN.pll
PSA.pll
PSAC.pll
PSB.pll
IGILUTIL.pll
IGILUTIL2.pll

What is a Forms Builder node?

    A Forms Builder node refers to the leaves and branches of its Object Navigator. The Object Navigator provides a hierarchical display of the objects in a Form modules.

    +Forms
       +Module
       +Trigger
       +Alerts
       +Attached Libraries
       +Data Blocks
       +Canvases
       +Editors
       +LOVs
       +Object Groups
       +Parameters
       +Pop Up Menus
       +Program Units
       +Property Classes
       +Record Groups
       +Reports
       +Visual Attributes
       +Windows
    +Menu
    +PL/SQL Libraries
    +Object Libraries
    +Built-In Packages
    +Database Objects

    Objects are grouped under their respective nodes. For example, all of the windows defined in a form module appear under the Windows node; all the LOVs defined in the form module appearunder the LOVs node and all the program units appear under the Program Units node.  It is important to familiarize yourself with this in case you need to navigate within an Apps form during the course of debugging a problem.

     

     

Advertisements

Basic Unix Vi editor command


Unix Vi editor command keys:

ZZ

Q

<ESC>

:<cmd>

:!<cmd>

^g

^f

^b

^d

^u

<x>G

/<x>

?<x>

n

N

]]

[[

%

^l

^r

z<CR>

z-

^e

^y

H

L

M

+

hjkl

0

$

f<x>

F<x>

Exit, saving changes

Enter ex mode

End of insert

Execute ex command

Shell command

Show filename/size

Forward one screen

Back one screen

Forward half screen

Backward half screen

Go to line <x>

Search forward for <x>

Search backward for <x>

Repeat last search

Reverse last search

Next section/function

Previous section/function

Find matching () { or }

Redraw screen

Refresh screen

Current line at top

Current line at bottom

Scroll down one line

Scroll up one line

revious context

Home window line

Last window line

Middle window line

Next line

Cursor movement:

left/down/up/right

Beginning of line

End of line

Find <x> forward

Find <x> backward

t<x>

T<x>

<x>|

w,W

b,B

e,E

^h

^w

^?

~

a

i,I

A

o

O

r

R

d

dd

c

y

C

D

s

S

J

x

X

Y

p

P

<<

>>

u

U

Up to <x> forward

Back up to <x>

Go to column <x>

Forward one word

Back one word

End of word

Erase last character

Erase last word

Interrupt

Toggle character case

Append after

Insert before

Append at end of line

Open line below

Open line above

Replace character

Replace characters

Delete

Delete line

Change

Yank lines to buffer

Change rest of line

Delete rest of line

Substitute character

Substitute lines

Join lines

Delete after

Delete before

Yank current line

Put back lines

Put before

Shift line left

Shift line right

Undo last change

Restore current line

File Options:

sh      Invoke shell

vi      Vi mode

wq      Write and quit

w <f>   Write file <f>

w! <f>  Overwrite file <f>

Ex mode commands:

q

q!

r <f>

set <x>

set no<v>

set all

Quit

Quit, discard changes

Read in file <f>

Enable option

Disable option

Show all options

      
      

Shell Script Tutorial for Oracle Applications


  • Steps to Register Shell Script as a concurrent program
  • Sample Shell Script to copy the file from source to destination
  • Basic Shell Script Commands

Steps to Register Shell Script as a concurrent program

step 1:
=======
Place the <name>.prog script under the bin directory for your
applications top directory.

For example, call the script KO_DEMO.prog and place it under
$CUSTOM_TOP/bin

step 2:
=======
Make a symbolic link from your script to $FND_TOP/bin/fndcpesr
For example, if the script is called KO_DEMO.prog use this:

 ln -s $FND_TOP/bin/fndcpesr KO_DEMO

This link should be named the same as your script without the
.prog extension.

Put the link for your script in the same directory where the
script is located.

step 3:
=======
Register the concurrent program, using an execution method of
‘Host’. Use the name of your script without the .prog extension
as the name of the executable.

For the example above:
Use KO_DEMO

step 4:
=======
Your script will be passed at least 4 parameters, from $1 to $4.

  $1 = orauser/pwd
  $2 = userid(apps)
  $3 = username,
  $4 = request_id

Any other parameters you define will be passed in as $5 and higher.
Make sure your script returns an exit status also.

Sample Shell Script to copy the file from source to destination

#Note: If you see # in front of any line it means that its a comment line not the actual code
#** ********************************************************************
# Created By : Shivmohan P

# Creation Date : 19-Sep-2008
# Script Name : KO_demo.prog
# Description : This Script accepts three parameters
# 1)Data File Name 2)Source Directory Path 3)Target Directory Path
# Then copy the file from source location to target location.
# If copy fails send the error status/message to concurrent program so that user can see status.
#
#
# ========
# History
# ========
# Version 1 shivmohan 19-sep-2008 Created for knoworacle.com users
#
#** ********************************************************************
#Parameters from 1 to 4 i.e $1 $2 $3 $4 are standard parameters
# $1 : username/password of the database
# $2 : userid
# $3 : USERNAME
# $4 : Concurrent Request ID
DataFileName=$5  
SourceDirectory=$6
TargetDirectory=$7
echo “————————————————–”
echo “Parameters received from concurrent program ..”
echo ” Time : “`date`
echo “————————————————–”
echo “Arguments : ”
echo ” Data File Name : “${DataFileName}
echo ” SourceDirectory : “${SourceDirectory}
echo ” TargetDirectory : “${TargetDirectory}
echo “————————————————–”
echo ” Copying the file from source directory to target directory…”
cp ${SourceDirectory}/${DataFileName} ${TargetDirectory}
if [ $? -ne 0 ]
# the $? will contain the result of previously executed statement.
#It will be 0 if success and 1 if fail in many cases
# -ne represents not “equal to”

then
echo “Entered Exception”
exit 1
# exit 1 represents concurrent program status. 1 for error, 2 for warning 0 for success
else
echo “File Successfully copied from source to destination”
exit 0
fi
echo “****************************************************************”

Basic Shell Script Commands

# Create Directory
mkdir <dirname>
# Remove Directory
rmdir <dirname>
#remove folder with files
rm -r -f <dirname>
# Change Directory
cd <newpath>
# Create new file
vi <newfile.ext>
#insert data into file
vi <openfilename.ext>
esc i <make changes>
#Save file
esc :wq enter
# exit with out saving changes
esc :q! enter
# open existing file
vi <existingfilename.ext>
#remove file
rm <filename.ext>
# copy file with same name
cp <sourcedir>/<sourcefilename.ext> <destinationdir>
# copy file with new name
cp <sourcedir>/<sourcefilename.ext> <destinationdir>/<newfilename.ext>
# Move file with same name
mv <sourcedir>/<sourcefilename.ext> <destinationdir>
# move file with data appended to filename in the front
mv <sourcedir>/<sourcefilename.ext> <destinationdir>/`date+%H%M%d%m%y`<filename.ext>
#print line
echo “your text here to print”
#print date
echo `date`

Working with CONCSUB


The CONCSUB is a utility which allows you to submit a concurrent program to the concurrent manager from the operating system level without having to log on to Oracle Applications.
The CONCSUB executable is located at $FND_TOP/bin/CONCSUB.

The functionality of the CONCSUB can be categorized into the following

  • Submitting Concurrent Requests
  • Controlling Concurrent Managers

Submitting Concurrent Requests
You can use the CONCSUB to execute both seeded and custom programs in Oracle Applications. In case of custom programs they must first be registered in Oracle Applications before you can execute them with CONCSUB.

The following can be used in Oracle Applications to run the active users report from the command line without logging in the  applications

CONCSUB APPS/APPS SYSADMIN “System Administrator” SYSADMIN WAIT=N CONCURRENT FND FNDSCURS PROGRAM_NAME='”Active Users”‘
Submitted request 2866136 for CONCURRENT FND FNDSCURS PROGRAM_NAME=”Active Users”

The log and out file for this program is also created at the location defined by your $APPLCSF/$APPLLOG and $APPLCSF/$APPLOUT respectively.

The WAIT=Y/N is used to specify weather to wait for the first concurrent request to be completed before the second is submitted or not.

You can also use various printing parameters with the COCNCSUB to directly print the output of your concurrent request.

PRINTER=<printer name>
NUMBER_OF_COPIES=<number of reports to be printed>
PRINT_STYLE=<printer style to be used>    
LANGUAGE=<language to be used>

Also you could specify the start date and completion options along with CONCSUB by using the following parameters

START=<Requested Start Date>
REPEAT_DAYS=<Repeat Interval>
REPEAT_END=<Request Resubmission End Date>

Controlling Concurrent Managers
Apart from submitting concurrent request the CONCSUB can also be used to shutdown your concurrent managers

CONCSUB apps/apps_password SYSADMIN ‘System Administrator’ SYSADMIN WAIT=N CONCURRENT FND SHUTDOWN

Sometimes the shutdown of the concurrent managers via the CONCSUB utility using the SHUTDOWN clause hangs and you may want to terminate your concurrent managers, in such a case you can use the ABORT clause with CONCSUB to do a force shutdown of your concurrent managers.

CONCSUB apps/apps SYSADMIN ‘System Administrator’ SYSADMIN WAIT=N CONCURRENT FND ABORT

In this case a concurrent request to terminate the concurrent managers is fired with a -75 priority. In case of the shutdown  the priority is 0 and default priority is of a concurrent request 50, by assigning a -75 priority the CONCSUB ensures abort is executed before shutdown.

Needless to say that the shutdown would fail in case the SYSADMN user or the System Administrator responsibility is inactive.

However to start the concurrent managers the CONCSUB is not used instead the startmgr executable is used.(Though possible)
This is located at $FND_TOP/bin/startmgr.

$startmgr sysmgr=apps/apps@sam
Starting icm@sam Internal Concurrent Manager
Default printer is

By default if no manager name is specified the ICM or the Internal Concurrent Manager is started. You can also start a specific manager by using the mgrname clause

To use CONCSUB to start the concurrent managers the STARTUP clause is used

$ CONCSUB apps/apps SYSADMIN ‘System Administrator’ SYSADMIN WAIT=N CONCURRENT FND STARTUP
Submitted request 2849496 for CONCURRENT FND STARTUP

UNIX / Shell Programming Basic – Beginner Questions Answers


 

 

What is $*?

Its mainly used for showing up all params. This show all parameter values passed in shell script

 

What does $# stand for?

# will return the number of parameters that are passed as the command-line arguments.

 

What does $? Return?

$? will return exit status of command .0 if command gets successfully executed ,non-zero if command failed.

 

What are Different types of shells?

sh : the oldest shell 
csh : C shell 
ksh : Korn Shell 
bash : bourne again shell
 

 

 

How do you read arguments in a shell program – $1, $2?

Shell script accepts parameters in following format… 
$1 would be the first command line argument, $2 the second, and so on 
$0 is the name of the script or function

If your script has more than 9 params then accept in following way… 
${12} : 12th param 
${18} : 18th param

 

What are the different kinds of loops available in shell script?

for, if, while, case

 

What is the difference between a shell variable that is exported and the one that is not exported?

The Shell variable which is exported would available to all the programs outside the Shell also. And the shell variable which is not exported, would available for that shell or for the shell program only, in which the variable is declared.

 

Export LANG=C 
will make the variable LANG the
global variable, put it into the global environment. All other processes can use it. 
 
LANG=C 
will change the value only in the current script. 

 

  

If you have a string “one two three”, which shell command would you use to extract the strings?

echo $string | cut -d” ” -f1 
echo $string | cut -d” ” -f2 
echo $string | cut -d” ” -f3 

 

How will you list only the empty lines in a file (using grep)?

grep “^$” filename.txt

 

How would you get the character positions 10-20 from a text file?

cat filename.txt | cut -c 10-20

or

cut -c10-20 <filename.txt>

 

How would you replace the n character in a file with some xyz?

sed ‘s/n/xyz/g’ filename > new_filename

 

We can replace n characters by using the following command:
1,$s/./xyz/g
where 1 shows that the search string will start searching patterns from first line of the file.
           ‘.’ for any character.

            g for global replacemet.

 

 

What is the difference between a ‘thread’ and a ‘process’?

A process is a collection of virtual memory space, code, data, and system resources. A thread is code that is to be serially executed within a process. A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread. A process can have multiple threads in addition to the primary thread

Thread – is stream of executable code within process. They are light weight process. All thread with in a process  share process instruction,code & data segment,open file descriptor,signal handler,userID and GroupID. Thread has its own set of register including program counter,stack pointer 

 

What is this line in the shell script do ?#!/bin/ksh?

To invoke the shell indirectly this line is added as the first line in the file.This particular line invokes korn shell

 

 

What is use of “cut” command? Give some examples.

Cut – Utility used to cut/Strip out the required data/text from the source.

Cut can be used in three modes,

  Stripping by Character

     cut -c 1-3

  Striping by Byte length

     cut -b -1-72

Stripping by delimiter and fields.

     cut -d “|” -f1

Where   

-d “|” -> Delimiter used in input text to separate columns

-f1 -> Field/Column number  

While processing huge input files, Cut’s performance is far better than awk

 

  

thanks – shivmohan purohit