How to call a perl script from an apple script
Hi All,
How to Call a perl Script from an apple script.
Pls Give Your comments.
Thanx & Regards,
Esther
Applescript to call a perl script named "/tmp/x.pl" passing an argument "world"
do shell script "/usr/bin/perl /tmp/x.pl world"
or if the script is given the executable atttribute (chmod +x /tmp/x.pl),
do shell script "/tmp/x.pl world"
Perl script "/tmp/x.pl" that prints a string using a passed argument
#!/usr/bin/perl
print "Hello $ARGV[$1]\n";
Similar Messages
-
How to call external Perl routines from Pl/SQL - Urgent
Available software in the Test Environment:
1. Sun Unix 2.8
2. Oracle 8.1.7 ( 8i)
3. Perl 5
Iam trying to call/execute perl scripts from PL/SQL using the DEMO_RDBMS.mk. I am able to call C scripts from PL/SQL, but actually want to call Perl scripts.
The steps followed for for C are -
1. Create and compile a simple C program to execute a unix command (eg., touch a file).
2. Make a shared library of the above compiled program (object), i.e., load the compiled object module into a dynamic load library.
3. Declare the above library in Oracle using SQL*Plus.
4. Define a PL/SQL function or procedure to call the external routine.
5. Test the external routine.
The above steps run good for a C program, but step 2 fails when run for a Perl script.
When I tried to use the following command for step 2 -
make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk extproc_callback \
SHARED_LIBNAME=cmd_lib.so \
OBJS=tst_cmd.pl
got the following error -
ld: fatal: file tst_cmd.pl: unknown file type.
ld: fatal: File processing errors. No output written t cmd_lib.so
*** Error code 1
This gives me an indication that demo_rdbms.mk does not understand/interpret Perl scripts. Going through the demo_rdbms.mk suggests the same.
My questions is - How do we call external Perl scripts/routines from PL/SQL ??
Do I have to get a different version of "demo_rdbms.mk" ?
PS: The perl scripts used above (tst_cmd.pl) is error free and works as intended in the unix environment.Iam trying to call/execute perl scripts from PL/SQL using the DEMO_RDBMS.mk. I am able to call C scripts from PL/SQL, but actually want to call Perl scripts. Well, C is a "compiler" language and Perl is interpreted. In a sense, C is not "scripts".
When I tried to use the following command for step 2 -
make -f $ORACLE_HOME/rdbms/demo/demo_rdbms.mk extproc_callback \
SHARED_LIBNAME=cmd_lib.so \
OBJS=tst_cmd.pl
got the following error -
ld: fatal: file tst_cmd.pl: unknown file type.
ld: fatal: File processing errors. No output written t cmd_lib.soI guess this compiles an extproc "stub" with your object file, generating an external procedure. So the object file really needs to be an object file :-)
My questions is - How do we call external Perl scripts/routines from PL/SQL ??I'd guess you need an embedded Perl interpreter in the external procedure.
Not much help though I'm afraid :-/
Cheers
Fredrik -
How to call a perl module from Java program.
Hi,
I create a simple java program as follows
class test{
public static void main(String args[])
{try {
Runtime r = Runtime.getRuntime();
r.exec("perl test.pl");
catch(Exception e)
{e.printStackTrace();}
and test.pl is located in the same directory as the java program. The program compiles but with no return as I execute it. I am not sure what is wrong.
Thanks,I think the wrong line is here; r.exec("perl test.pl");
Usually the JVM needs the full path.If the path for either the executable or the script was wrong then, given the code posted, it would not hang.
>
To automatticaly get the path (if the file is in the
class path) use
System.getProperty("java.class.path")
That gets paths(plural).
Try this:
r.exec("perl " +
System.getProperty("java.class.path") + "\test.pl");I am rather certain that that won't work on any standard operating system. -
How to call backing bean method from java script
Hi,
I would like to know how to call backing bean method from java script.
I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
So could any please letme know how to call backing bean method from java script
Thanks
Murali
Edited by: mchepuri on Oct 24, 2009 6:17 PM
Edited by: mchepuri on Oct 24, 2009 6:20 PMHello,
May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
the problem is.
1. before loading the page a javascript comes on which i clicked ok
2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
I m trying to do this through server listener and click listener. the code is(adf jspx page)
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
<af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
<af:commandButton text="commandButton 1"
binding="#{backingBeanScope.backing_check4.cb1}"
id="cb1" action="#{beanCheck4.submit1}"/>
<af:clientListener type="click" method="delRow"/>
<af:serverListener type= "jsServerListener"
method="#{backingBeanScope.backing_check4.submit1}"/>
<f:facet name="metaContainer">
<af:resource type ="javascript">
x=confirm("hi");
// if(x){
delRow = function(event){
AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
return true;
</af:resource>
</f:facet>
</af:form>
</af:document>
</f:view>
<!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
</jsp:root>
the backing bean code is -----
public class classCheck4 {
public classCheck4() {
public String submit1() {
System.out.println("hello");
return null;
} -
How to call a .bat file from java code?
How to call a .bat file from java code? and how can i pass parameters to that .bat file?
Thanks in advancethanks for ur reply
but still i am getting the same error.
I am trying to run a .bat file of together tool, my code looks like below
import java.lang.Runtime;
import java.lang.Process;
import java.io.File;
class SysCall{
public static void main(String args[]){
String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
//String path="D://Borland//Together6.2//bin//Together.bat ";
Runtime r= Runtime.getRuntime(); //Declare the system call
try{
System.out.println("Before batch is called");
Process p=r.exec(cmd);
System.out.println(" Exit value =" + p.exitValue());
System.out.println("After batch is called");
/*can produce errors which must be caught*/
catch(Exception e) {
e.printStackTrace();
System.out.println (e.toString());
I am getting the below exception
Before batch is called
java.lang.IllegalThreadStateException: process has not exited
at java.lang.Win32Process.exitValue(Native Method)
at SysCall.main(SysCall.java:17)
java.lang.IllegalThreadStateException: process has not exited -
How to call a maintenance view from a program
Hello Abapers,
Can anybody explain with some examples. How to call a mainetenance view from a program.
Thanks
Ranjith.Use FM 'VIEW_MAINTENANCE_CALL'.
REPORT zmaintaintest.
VARIABLES / CONSTANTS
CONSTANTS:
c_action(1) TYPE c VALUE 'U', "Update
c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
c_field(6) TYPE c VALUE 'EMPNO'. "Field Name
INTERNAL TABLES
DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
v_empno TYPE zempno,
wa_rangetab TYPE vimsellist.
SELECTION SCREEN
PARAMETERS: p_empno TYPE zempno OBLIGATORY. "Emplyee ID
AT SELECTION-SCREEN
AT SELECTION-SCREEN.
Chcking the existence of the user in EMPLOYEE table
PERFORM validate_employee.
START_OF_SELECTION
START-OF-SELECTION.
This will restrict the user view so that user can only view/change
Table data corresponding to his/her Employee ID
PERFORM define_limited_data_area.
Displaying table maintenance view for a particular employee ID
PERFORM call_view_maintenance.
*& Form validate_employee
Validate plant entered in the selection screen
FORM validate_employee.
SELECT SINGLE empno u201CEmployee ID
FROM zemp_example u201CEmployee Table
INTO v_empno
WHERE empno = p_empno.
IF sy-subrc <> 0.
MESSAGE 'Not an Valid User' TYPE 'I'.
ENDIF.
ENDFORM. "validate_employee
*& Form DEFINE_LIMITED_DATA_AREA
To restrict the user view so that user can see/change table data
corresponding to his employee ID. Here one internal table is
getting populated with field name as u201CEMPNOu201D (Key field of the table)
And value as given by user in Selection Screen and this is passed as
Parameter in function module 'VIEW_MAINTENANCE_CALL'
FORM define_limited_data_area.
CLEAR wa_rangetab.
wa_rangetab-viewfield = c_field.
wa_rangetab-operator = 'EQ'.
wa_rangetab-value = p_empno.
APPEND wa_rangetab TO itab_rangetab.
ENDFORM. "define_limited_data_area
*& Form CALL_VIEW_MAINTENANCE.
Displaying table maintenance view for a particular employee ID
FORM call_view_maintenance.
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = c_action
view_name = c_viewname
TABLES
dba_sellist = itab_rangetab.
ENDFORM. "call_view_maintenance
Regards,
Joy. -
How to call a SQL function from an XSL expression
Hi
In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
1) How to call a SQL function from an XSL expression that is allowed in BI template.
If anyone ahs faced similar requirements please share your approach.
Thanks
SrimathiThank u..
but i'd seen that link wen i searched in google..
Is it possible without using any 3rd party JARs and all?
and more importantly plz tell me what should be preferred way to call a javascript function?
Do it using addLoadEvent() or Windows.Load etc
OR
Call it thru Xsl? (I donno how to do dis)
Thanks in Advance..
Edited by: ranjjose on Jun 3, 2008 8:21 AM -
How to call a web service from forms 9i
Hello all, I was trying to run the example on this website that shows how to call a webservice from forms, and I recieved an error. I am at the last step, where it tells me to create a button and add a when button pressed trigger. Here is the code I am using from the example:
DECLARE
jo ora_java.jobject;
rv ora_java.jobject;
ex ora_java.jobject;
BEGIN
jo := CurrencyExchangeServiceStub.new;
--This will get the exchange rate from US Dollars to UK Sterling.
rv := CurrencyExchangeServiceStub.getRate(jo,'USA','UK');
message (float_.floatValue(rv));
EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
message(Exception_.toString(ex));
END;
It gives me an error on"Exception_.tostring" component must be declared. Does anyone have any suggestions? I am trying to figure out how to call an external WS from a form. Thanks.IN forms Builder under Import java classes
Change the Import Classes field to java.lang.Exception and press Import. This will create a PL/SQL package for the Exception Java class. While this is not essential, it does make error reporting easier. Now press Close to dismiss the dialog. -
How to call a function module from a transformation
Hi,
Could somebody please let me know how I can call an abap function module from a transformation (abap xslt program). I know how to call the class methods from transformation, but how do i call a function module..?
Thanks,
Shashi.
Edited by: Shashi Kanth Kasam on Apr 8, 2010 12:45 PMYa. I can do that. But I don't want to use a class and a method to call that function module. Want to directly call function module from transformation. Is that possible..?
Thanks,
Shashi -
How to call a Web Api from from a Visual webpart code behind?
Hi,
I am trying to create a visual web part in sharepoint 2013 with data received from another Web API.
I followed the below steps.
1. Created a Visual Web part.
2. In the code behind(.cs) file I wrote the following code.
async private void GetResult()
using (var client = new HttpClient())
client.BaseAddress = new Uri("http://localhost:8080/");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var response = await client.GetAsync("api/Tfs/OpenEnquiriesCount");
var content = response.Content;
3. When I run the application, I get security exception in the line await
client.GetAsync()
What is the way to achieve this? How to call a web api from share point visual web part?
Thank you in advance.Hi,
Thanks for your sharing.
Cheers,
Jason
Jason Guo
TechNet Community Support -
How to call a jsp page from oaf and run in jDeveloper
Hi all,
I created sample jsp and then tried.
String temp = "sample.jsp?";
pageContext.setForwardURL(temp,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
It worked.
But when i tried with one of the custom page that i downloaded from server it is giving error.
But now i need to call that page.
Its Code is given on below link:
Re: how to call a jsp page from oaf
Please help me to do this.
Thanks in advance.
Regards,
RajRaj,
1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
(i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
4. There is no problem in the way you are calling jsp page from OAF page.
regards,
Anand -
How to call a web Service from Oracle Applications?
Hi friends,
I've posted this question on OA Framework forum , but may be it's more appropiated put it here. Sorry for do it again:
It's about how to call a web service from a Form or a .sql (via Request) in Oracle Applications:
Could you please explain here the detailed steps (with code example if it's possible) to invoke a webservice from Oracle Applications?.. how did yo do it...?
I've read differents posts here and the 33097.1 metalink note (by the way, the first recommended link in this note is broken...), but there are lots of theorical concepts and no real examples to see how/from where invoke the WS
I'll have to call one webservice (I suppose the customer will give me the interface implementation)...but I've never did it with Applications so that's why I ask you for all the detailed steps...
I work with Forms 6i, Apps 11.5.10.2 and DB 9.2.0.7.
Thanks a lot.
Jose.Hello Jose,
I did using java program to call BPEL web services in 11.5.10.
I pasted below the metalink note for your reference (Note:250964.1)
The idea is first write a java program to call the webservice (in my case it is calling an BPEL web service, so this may not help directly), test it.
Then port the java program as specified in the note, so that you could call your web service through concurrent manager scheduler.
Is this ok?
Thanks
Arun.
======================================================
Checked for relevance on 25-Apr-2007
Application Install - Version: 11.5.8 to 11.5.10
Goal
====
How to register and create a Java concurrent program for Oracle Applications
Release 11i
Solution
========
1. Create your Java Concurrent Program (JCP) , using a text editor.
/*===========================================================================+
| Concurrent Processing Sample Code |
| |
| FILENAME |
| Hello.java |
| |
| DESCRIPTION |
| Sample Java concurrent program |
| About the simplest possible program, just writes a message to the |
| logfile and output file. |
| |
| HISTORY |
| $Log$ |
| |
+===========================================================================*/
package oracle.apps.fnd.cp.sample;
import oracle.apps.fnd.cp.request.*;
public class Hello implements JavaConcurrentProgram {
public static final String RCS_ID = "$Header$";
public void runProgram(CpContext ctx) {
ctx.getLogFile().writeln("-- Hello World! --", 0);
ctx.getOutFile().writeln("-- Hello World! --");
ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
=======================================
End Sample
=======================================
2. Create a sample directory under $JAVA_TOP:
$ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
3. Copy Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample:
$ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
4. Compile your java program:
javac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java
5. Test at the command line with following syntax:
jre -Ddbcfile=$FND_TOP/secure/your_dbc_file.dbc \
-Drequest.outfile=./outfile \
oracle.apps.fnd.cp.request.Run \
oracle.apps.fnd.cp.sample.Hello
6. Register your custom java concurrent program with Oracle Applications.
a. Navigate: Concurrent > Program > Executable
b. Enter details into the form
Executable: JCPHELLO
Shortname: JCPHELLO
Application: Application Object Library
Execution Method: Java Concurrent Program
Execution File Name: Hello (Insert a name that does not contain space or period)
Execution File Path: oracle.apps.fnd.cp.sample
c. Save the details
d. Navigate: Concurrent > Program > Define
e. Enter details into the form
Program Name: JCPHELLO
Program Shortname: JCPHELLO
Application: Application Object Library
Executable: Choose JCPHELLO from LOV
Executable Options :
f. Save the details
7. Add this new concurrent request to your responsibility request group.
a. Navigate > Security > Responsiblity > Request
b. Query System Administrator
c. Add new row and choose TestJava
d. Save the changes.
8. Run your new Hello Java Concurrent Program
Navigate: Request > Run
References
~~~~~~~~~~~
Oracle Applications Developers Manual for Release 11i A75545-01
==================================================== -
How to call a stored procedure from WorkShop
Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
me .. Today I'm simply trying to find out how to call a stored procedure from
within workshop, using any of the DB Controls .. I see workshop provides a way
create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
to be entered in place of the inline query .. Perhaps I've over looked it. Any
advise on the best way to tackle this task will be appreciated.
AtahualpaAtahualpa--
Maybe this will help:
http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
Eddie
Atahualpa wrote:
Hello Everyone .. I'm quite new with WebLogic 8.1 & WorkShop, so please bare with
me .. Today I'm simply trying to find out how to call a stored procedure from
within workshop, using any of the DB Controls .. I see workshop provides a way
create a Java Control, Rowset Control, but it wont easily allow for a stored procedured
to be entered in place of the inline query .. Perhaps I've over looked it. Any
advise on the best way to tackle this task will be appreciated.
Atahualpa -
How to call a j-frame from a main frame
I use both NetBean 5.5 and Forte for Java4
i would like to know how to call a j-frame from a main jframe window when a button is clicked after
action performed or moused clicked is set
i.e Main jframe (window) has a button ---> (grades) click it
should open the sub-jframe named grades with all the grades showin in that frame
your help please thanksIt sounds as if you want the button to open a dialog that displays your data such as a JOptionPane and not a JFrame.
-
How to call a jar file from oracle forms (6i)
Hi,
I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
thanks.
dumindaI created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
then i tried to run it in application server. its still not running.
can you tell me what i have to do within my bean class? or can you suggest any solution?
thank you.
Maybe you are looking for
-
Which OAM setting for passing values in HTTP header to application
Experts, what is the setting in OAM 11gR2 that is set to pass a userid pulled from a LDAP directory (which is already configured with OAM) as a HTTP Header to an application. This is typically in cases where OAM is protecting or providing to protecte
-
Supplier balances belonging to the respective liability account.
Hi All, Can any one help us to know ,from which tables we can extract data for "supplier balances belonging to the respective liability account on an "as of date"". Standard reports are based on system date will provide the date. For example: If my s
-
File to rfc problem in the drop down button
Hi /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit Please see this URL In this scenario i have creating a message maping RESPONCE side BAPI_COMPANY_DETAIL Responc in that COMPANY_DETAIL below fields is not displayin
-
Problems with flash content (MySpace and other sites)
For the past few months I have been unable to view any media content on MySpace (videos, music) and a couple other sites. This is a real annoyance as I am a music reviewer and I can't listen to much of the music people want me to check out since it's
-
I can't update apps with my iphone in an app store, please help.
What a ****, now it happens to me too, first it was an issue in bro's iphone that he couldn't update its iP's apps which resulted to delete his all apss and install them again no matter whether those were purchased ones or feebies. That really *****,