host command not working properly [message #501414] |
Mon, 28 March 2011 23:52 |
trichyselva
Messages: 6 Registered: February 2006 Location: chennai
|
Junior Member |
|
|
Hi,
I am using oracle forms 10.1.2.0.2.
In my form, I need to call a unix shell script.
{ Oracle forms will run on application server.
Unix will run in a development server.
(Both the servers are different)
From forms, if I click a button, it should call the unix shell script in a specified path.
Internally, the unix script will call oracle to generate a file.
In the file, some manipulations are done using unix.
After doing some manipulations, the file is stored in a specified path in the unix box. }
To achieve the above, I did the below things.
To execute a unix shell script from my oracle forms (10g),
1) the below configuration i added in the webutil.cfg file
install.syslib.0.user.1=ffisamp.dll|40960|1.0|true
transfer.database.enabled=TRUE
transfer.appsrv.enabled=TRUE
transfer.appsrv.workAreaRoot=c:\temp
transfer.appsrv.accessControl=TRUE
#List transfer.appsrv.read.<n> directories
transfer.appsrv.read.1=c:\temp
#List transfer.appsrv.write.<n> directories
transfer.appsrv.write.1=c:\temp
2) I have attached webutil.pll library to my form
3) I have subclassed object group from webutil.olb to my form.
4) The host command i used is (these code are present in when-button-pressed trigger of a button)
host('rsh selvas -l administrator sh <foldername>/if_csv.ksh');
pause;
if form_failure then
emessage('hi selva');
emessage(SQLERRM);
else
emessage('failure selva');
end if;
when I click the button, I am getting the below messages,
I got the below messages
PLEASE ACKNOWLEDGE
-- when i clicked ok,
it showed me failure selva
but still the shell script has not executed.
Note:
In /tmp directory, no log files are available.
Can any one help me, where I am missing.
Thanks,
Selvaraj
|
|
|
|
|
|
|
Re: host command not working properly [message #501507 is a reply to message #501505] |
Tue, 29 March 2011 08:42 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
trichyselva wrote on Tue, 29 March 2011 09:36no, the script is not executing and in the log file also it is not showing any errors.
I don't think you understood the question. cookiemonster is asking you if you execute the shell script at a command prompt, outside of oracle, will it execute?
If not, does it have the right execute permissions?
You either have to give rsh it's full path or set the environment in the shell script. There is no environment set in the shell script when you call it from a Form.
|
|
|