Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Run python script from bash script not works in AIX when it is executed from Oracle Forms 12c

Marcelo PNov 12 2022

Hi everyone
Environment:
1 ) I have AIX 7
2 ) over this AIX I have installe Oracle forms 12.2.1
3 ) this AIX have korn shell
4) Installed python version is 2.7
4 ) ERP clients use windows 10 to run ERP application
5 ) command which python show: /usr/bin/python
6 ) python --version show: Python 2.7.18
Then, I need run python script from Oracle App from client. I am using HOST command.
Bash script works ok if I run this bash from AIX terminal... but if run it from ERP client using command host, bash commands works ok but python script called from inside bash script not works.
Simple example:
-- test.sh
#!/bin/bash
echo " start bash " && /u02/oraApp12c/transfer/test.py
echo " after executing py script"
-- test.py
#!/usr/bin/python
with open('test.txt', 'w') as f:
f.write('test test test\n')
Both scripts have all permissions (chmod a+x) and located in /usr/oraApp12c/transfer. This directory is accessible...
Running from terminal like this $ ./text.sh works ok (file test.txt is created).... BUT if I call test.sh from WHEN-BUTTON-PRESSED in my form file test.txt not created, the part /u02/oraApp12c/transfer/test.py sees not executed ( in fact is not executed )

In my form I am executing:
.....
......
Lv_command := '/u02/oraApp12c/transfer/test.sh';
HOST(LV_command)
....
.....
I searched in google and seems python evironment is not loaded/recognized when call python from bash....
I have tried call python script directly from oracle forms when-button-pressed but not works too.
I have also tried locate like first line into python script : #!/usr/bin/python2.7 but not works
I have also tried locate like first line into python script : #!/usr/bin/env python2.7 but not works
I have also tried locate like first line into python script : #!/usr/bin/env python but not works

Summary: Python script called from bash script not works if bash script is called from oracle forms when-button-pressed BUT it works OK if it is executed from AIX terminal

Thanks in advanced.

Comments

Alex.Zaballa
Answer

Boa tarde,

Eu fiz a 1z0-060, pois já era OCP 11G, mas gostaria de indicar o seguinte link:

http://www.oraclecertificationprep.com/apex/f?p=OCPSG:EXAM_DETAILS:0::NO::P2_EXAM:1Z0-061

Você também pode dar uma olhada nos livros: OCA Oracle Database 12c SQL Fundamentals I Exam Guide (Exam 1Z0-061) (Oracle Press) e

OCA: Oracle Database 12c Administrator Certified Associate Study Guide: Exams 1Z0-061 and 1Z0-062 (SYBEX).

Boa sorte na preparação!

Marked as Answer by 2848751 · Sep 27 2020
2848751

Olá boa noite, fez a prova? Estou tentando marcar a prova online e não estou conseguindo, vc fez como??

Alex.Zaballa

Olá,

Você já possui uma conta criada em http://www.pearsonvue.com/oracle ?

Através deste site você consegue agendar a prova no local desejado.

Lembre-se que a Oracle está oferecendo uma promoção de retake para algumas provas:

http://www.pearsonvue.com/oracle/promos/retake/la_portuguese.asp

2848751

Sim, já tenho conta no site pearson vue, só que na hora de agendar, não achei a opção de fazer a prova online, no site da oracle diz que tem a prova 061 online...

Alex.Zaballa

Você deve selecionar a opção "Non-Proctored Exams" e depois "ONLINE Exams"

Depois vai aparecer "1Z0-061-ONLINE Oracle Database 12c: SQL Fundamentals"

1 - 5

Post Details

Added on Nov 12 2022
3 comments
692 views