There are basically 12 types of executable available in Oracle applications. They are
(Concurrent -> Program -> Executable)
1. Oracle Reports
2. Host
3. Immediate
4. PL/SQL Stored Procedure
5. SQL * Loader
6. SQL * Plus
7. Spawned
8. Java Concurrent Program
9. Java Stored Procedure
10. Perl Concurrent Program
11. Request Set Stage Function
12. Multi Language Function
We are going to see about HOST type of executable. Its generally used to run a Shell Script.
What is meant by Shell Script?
Shell Script is a collection of shell commands(UNIX commands) which will be executed sequentially. Using a shell script you can create a directory, move files, check the file availability, run a SQL command, etc....
Example for a shell script:
echo "This is a sample script run by bala kaarthik"
echo $1
echo $2
echo $3
echo $4
exit 0
In the above script the first line used to print a string. '
Note: I have used the word 'shell' many times. What is a shell actually? Its nothing but a compiler which is used to run a command. UNIX have different type of compilers(shells) like bash shell, C shell, etc... For more details on shell refer http://www.wikipedia.org/
How to register a HOST program?
1. Create a Shell program (VBBKSH.prog)
Use the above script and save it as VBBKSH.prog (case sensitive)
2.Move the shell program to the application top bin directory.
Find your application top XX_TOP. In that you can find bin directory ( if not create one and give 777 permission (read write executable for all) ). Move the file to that directory and give 777 permission to the file
3. Create a soft link
Its essential to create a soft link for your shell program. To create a soft link use the following shell command
ln -s $FND_TOP/bin/fndcpesr $XX_TOP/bin/VBBKSH
Where XX_TOP is your application top. Don't include the file extension (.prog) while creating the soft link. After executing the shell command a soft link will be created in the name of the shell program without any file extension.
4. Create Executable
Change your responsibility to "System Administrator" or "Application Developer"
Create a executable with "Execution method" as HOST and "Execution file name" as VBBKSH.
Don't forget to give the correct custom application name.
5.Create a Concurrent Program
Create the concurrent program and give the executable name which was created in the previous step
Parameters:
Regarding the parameters basically 4 parameters will be sent to the shell program by default. They are
$1 - database username/password
$2 - loginid
$3 - application username
$4 - concurrent request ID
If you want to send some parameters to the shell program that will be used as $5,$6,etc.... inside the shell program.
6.Register the concurrent program to the custom application's responsibility
7. Change to your application responsibility and run the concurrent program
No comments:
Post a Comment