Posted on June 18th, 2007 by Sanjit Anand |
Print This Post
|
Email This Post
These are the few steps which is required to make a host based Concurrent Program.
The first steps would be , you have to create a script and save as .prog extension and put into your application top bin folder.
If your custom application is XX then the scripts should goes to $XX_TOP/bin
For example, call the script CUSTOM.prog and place it under
Step 2
Now,you have understood , the execution of unix program is bit different in oracle application. The only things you have to notice is you need to pass 4 mandatory parameter to execute host program.
The other way around is ,you can use fndcpesr and link with your host program.It means the fndcpesr will take care of your 4 mandatory parameter.
You have to simply create a soft link with $XX_TOP/bin folder.
ln -s $FND_TOP/bin/fndcpesr <script>
This link should be named the same as your script without the .prog extension.
Step 3
Next you have to make into system administrator responsibly follow 3 steps from these menu
- sysadmin -> concurrent-> program -> executable
- sysadmin -> concurrent-> program -> define
- sysadmin ->security -> responsibility -> request
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.
Step 4
Your script will be passed at least 4 parameters, between $1 and $4.
These are:
orauser/pwd,
userid,
username,
and request_id
Any other parameters you define will be passed in $5 and higher.
Make sure your script returns an exit status also.
What additional piece need to incorporate in code
you need to simply
ORA_USER_PASS=$1
USERID=$2
USERNAME=$3
REQUESTID=$4
With or without extn ‘.prog’
You can register an host application without the prog extension. Your script will not have any extension. However in order to make this work you must have logic in your host application that parses the parameter string passed to it and extract the individual parameters out of it. This is required because the Concurrent manager passes 1 string containing all the parameters, to the host program. In programs linked to the fndcpesr
program, the fndcpesr parses it into the individual parameters.
How can you return an error status of the concurrent programs?
Yes, By default, a shell script returns success (status code 0). In case of error script traps an error, use the UNIX exit command ‘exit 1′ to return
failure (status code 1) to the concurrent manager running the program.”
Final Note of ‘fndcpesr’
fndcpesr is a standard utility available in $FND_TOP directory. Its mainly used by the application to parse arguments for shell scripts.


July 1st, 2007 at 12:21 pm
hi,
what if i require to run the shell scripti from another responsibility other than sys admin
Ranjith
July 2nd, 2007 at 1:14 am
Ranjith,
could you elaborate more….in term of clarity of the quetsion.
If you are trying to run from other responsiblity , simply attach that requset to requset group under which you are looking for.
take a note, Respoisblity is tied up with Requset group and menu, more over userid is tied with Resposniblity. There is only exception of not having requset group, when you will take alternate approch like FND_SUBMIT API’or submitting through CONCSUB..ie directly from host.
November 18th, 2007 at 11:07 pm
I am calling pl/sql procedure,from my shell method concurrent prog.
can i use fnd_file.put_line to log message ?
February 20th, 2008 at 12:58 am
As log file for Host concurent program contains output whichs is sent to stout from the shell script, I think you have to use for example dbms_output.putline to write log messages. have to check
April 1st, 2008 at 2:57 pm
I use a shell script without extension and I have two custom parameters defined in the concurrent manager. I’m able to get the values through my shell script, by reading the whole parameter list and parsing it. However, the parameters are encolosed with double quotes which is causing issues. How do I get rid of the double quotes surrounding my parameters?
Help is greatly appreciated.
April 1st, 2008 at 11:30 pm
Hi,
I want to pass 7 parameters to my Shell Script program by using Concurrent Program in Oracle Apps. While i try to Run the program. it didn’t pick the parameters correctly. I use the code in my Shell Scripts are:
l_to_mail_id=$5
l_cc_mail_id=$6
l_file1_path=$7
l_file1_name=$8
l_file2_path=&9
l_file2_name=&10
l_subject=$11
But its not working fine. Please help me to correct this.
Thanks in Advance.
Regards,
Senthil Kumar.K
April 2nd, 2008 at 3:40 am
there should be no problem ….as far as you attached with fndcpesr by mean of soft line…
additionally you can pass as many parameter as you can….the more over you need to check the corresponding mapping..
I will check my script, will send you offline
April 6th, 2008 at 8:16 am
Senthil,
I guess u have problems catching $10, $11 values.
These should be ${10}, ${11} and so on.
Try it.
regards,
Rajkiran.
May 15th, 2008 at 8:19 pm
How to get program status or “WARNING” in host method concurrent program?
June 1st, 2008 at 5:50 am
Hi,
We have two servers, database node and application node. Concurrent Service is installed on Database Node. I want to write a program to Load the data using SQLLOADER, which I am invoking using Host File. For this program, data file will be residing on Application Node. But as Concurrent Service is on Database Node, I want to know, if I can still run host executable file from application node.
Regards,
Martand Joshi
July 15th, 2008 at 12:43 pm
I have similar problem as Amresh.
Can some one shed some light on
how to get program status or “WARNING” in host method concurrent program?
Regards,
Raj.