Home » Developer & Programmer » Forms » host command not working properly (oracle forms 10g)
host command not working properly [message #501414] Mon, 28 March 2011 23:52 Go to next message
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 #501418 is a reply to message #501414] Tue, 29 March 2011 00:48 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
HOST executes a program that is located on an application server; reading your message, I *think* that your IF_CSV.KSH is on the IAS, isn't it? (so that probably isn't a problem).

On the other hand, I don't know UNIX so I can't tell whether 'RSH SELVAS ...' is the way to do that.
Re: host command not working properly [message #501454 is a reply to message #501418] Tue, 29 March 2011 05:06 Go to previous messageGo to next message
trichyselva
Messages: 6
Registered: February 2006
Location: chennai
Junior Member
Hi,

My form resides in application server and my shell script resides in development server. Both servers are different.

Thanks,
Selvaraj
Re: host command not working properly [message #501460 is a reply to message #501454] Tue, 29 March 2011 05:41 Go to previous messageGo to next message
cookiemonster
Messages: 13938
Registered: September 2008
Location: Rainy Manchester
Senior Member
So if you run the rsh command from the command prompt on the app server does it work?
Re: host command not working properly [message #501505 is a reply to message #501460] Tue, 29 March 2011 08:36 Go to previous messageGo to next message
trichyselva
Messages: 6
Registered: February 2006
Location: chennai
Junior Member
no, the script is not executing and in the log file also it is not showing any errors.

[Updated on: Tue, 29 March 2011 08:36]

Report message to a moderator

Re: host command not working properly [message #501507 is a reply to message #501505] Tue, 29 March 2011 08:42 Go to previous message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
trichyselva wrote on Tue, 29 March 2011 09:36
no, 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.
Previous Topic: How to store Word/Excel documents to BLOB Column(merged)
Next Topic: How to force user to enter exactly 3 digits in to a number field
Goto Forum:
  


Current Time: Tue Sep 17 05:00:31 CDT 2024