Home » Developer & Programmer » Forms » How to execute Linux file from oracle forms
How to execute Linux file from oracle forms [message #657830] Wed, 23 November 2016 20:26 Go to next message
akskumar
Messages: 5
Registered: November 2016
Junior Member
Hi,

I want to execute .BAT file from Linux in oracle forms.

I used the below command

host(/src/TESTING.BAT','NO_SCREEN');

It seems the file not executing and when I try to capture the error it shows ora-00000: Normal Successful Completion.

Could you anyone please help how to execute Linux file from Oracle forms.

Thanks
Selvakumar
Re: How to execute Linux file from oracle forms [message #657831 is a reply to message #657830] Wed, 23 November 2016 21:10 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
akskumar wrote on Wed, 23 November 2016 18:26
Hi,

I want to execute .BAT file from Linux in oracle forms.

I used the below command

host(/src/TESTING.BAT','NO_SCREEN');

It seems the file not executing and when I try to capture the error it shows ora-00000: Normal Successful Completion.

Could you anyone please help how to execute Linux file from Oracle forms.

Thanks
Selvakumar
It did NOT run since the "host" line contains mismatched single quote marks.

I suggest that you include line below as the second line in TESTING.BAT file
env | sort -o /tmp/capture.env
then inspect file content after invoking script correctly.
Re: How to execute Linux file from oracle forms [message #657832 is a reply to message #657831] Wed, 23 November 2016 22:21 Go to previous messageGo to next message
akskumar
Messages: 5
Registered: November 2016
Junior Member
sorry I have missed single quote when I typed it.

host('/src/TESTING.BAT','NO_SCREEN');

in my TESTING.BAT file contains this 2 lines after your suggestion

cp /src/EOF.LOG /src/EOF_BK.LOG
env | sort -o /tmp/capture.env

still not working this. any suggestion please?
Re: How to execute Linux file from oracle forms [message #657833 is a reply to message #657832] Wed, 23 November 2016 22:45 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
issue OS commands below & post the results

ls -ld /src/
ls -l /src/TESTING.BAT
ls -l /src/EOF.LOG
ls -l /src/EOF_BK.LOG
ls -l /tmp/capture.env
cat /tmp/capture.env
Re: How to execute Linux file from oracle forms [message #657834 is a reply to message #657833] Wed, 23 November 2016 22:55 Go to previous messageGo to next message
akskumar
Messages: 5
Registered: November 2016
Junior Member
Hi,

I noticed that from .out file in /tmp foleder

its look reading the file and gives the below error
/src/TESTING.BAT: line 1: cp: command not found
/src/TESTING.BAT: line 2: env: command not found
/src/TESTING.BAT: line 2: sort: command not found

cp command not working in the script. But the same is working when I run in the terminal.

do we need to set PATH in the script?

Thanks


Re: How to execute Linux file from oracle forms [message #657836 is a reply to message #657834] Wed, 23 November 2016 23:18 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>do we need to set PATH in the script?
yes

or use explicit pathnames
Re: How to execute Linux file from oracle forms [message #657841 is a reply to message #657836] Thu, 24 November 2016 01:29 Go to previous messageGo to next message
akskumar
Messages: 5
Registered: November 2016
Junior Member
Its working fine after I use the command as below

/bin/cp /src/EOF.LOG /src/EOF_BK.LOG

Thanks so much for your help
Re: How to execute Linux file from oracle forms [message #657844 is a reply to message #657841] Thu, 24 November 2016 04:39 Go to previous messageGo to next message
akskumar
Messages: 5
Registered: November 2016
Junior Member
Hi,

Is it possible to open and see a text file from Linux using oracle forms?

I used the below command but its not working

host('view /src/test.txt');

can anyone help?

Thanks
Re: How to execute Linux file from oracle forms [message #657851 is a reply to message #657844] Thu, 24 November 2016 07:24 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
not possible
Previous Topic: SET_ITEM_INSTANCE_PROPERTY
Next Topic: Run forms wthout JRE
Goto Forum:
  


Current Time: Thu Mar 28 08:47:24 CDT 2024