Calling startrfc.exe from within a vbs script

Hello, can someone help me please
I am trying to process xml idocs into SAP on a Windows 2008 server. I have written a vbs script to process the file and am trying to call STARTRFC.EXE from within the vbs script. However I keep getting an error that it cannot open the file. The code is shown below. I have changed the server name and gateway and user/passwd for security. I'm passing the filename as a variable (str_expfile) but it does not seem to be able to extract the actual file name from the variable. I know from past experience that you can pass it variables if its running on a unix box and in a shell. But for some reason it not decipering the variable name in the vbs script
Set objShell = CreateObject("Wscript.Shell")
str_startrfc = "D:\usr\sap\SID\SYS\exe\uc\NTAMD64\startrfc.exe -d SID -3 -h hostname -s 00 -g hostname -x sapgw00 -u user -p passwd -c 100 -l EN -t -F EDI_DATA_INCOMING -E PORT=MYPORT -E PATHNAME=str_expfile"
objShell.Run str_startrfc, ,True
The error I'm getting is shown below:
ERROR file opened at 20110510 134219 GMT Daylight Time, SAP-REL 700,0,278 RFC-VER 3 1200864 MT-SL
T:2584 Error in program 'startrfc': ======> Error at OPEN 'str_expfile' (check file)
T:2584 Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
T:2584 Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
Thanks
Regards
Steve

Hi Markus
Unfortunately I can't do that because I need it to process hundreds of files one after another and I would have to hard code the file path each time. That's why I need it automated.
Can startrfc.exe not take a variable for the pathname in a vb script? It works fine in a unix shell. We are migrating from unix to windows and I need to convert all my unix scripts into vb scripts.
I notice there is a nother rfc type program available, can I use rfcexec.exe instead of startrfc.exe and would it take variables?
Thanks
Regards
Steve

Similar Messages

  • Calling a webservice from within Bex Web Application Designer

    Hi
    I have a web-template built with BEx web application designer which also contains textboxes. This text should be stored by calling a webservice (standard BI-documents are not an option).
    Can anyone tell me how I could call a webservice from within the BEx web template to store the text contained in the textbox? The webservice-call should include some of the filter-varialbes of the web application.
    Is this only possible by the use of a JavaScript WebItem? If so - does anyone have an example of such a JavaScript.
    Thanks a lot in advance.
    Kind regards.
    Christoph

    Thanks for your response. The BSP page would work out fine if I only needed to save the data.
    But the next time I call the webtemplate, the textarea should be filled by another webservice call with the stored text (so the text can be modified und saved again). This will not be possible by calling a BSP page.
    Do yoiu have any suggestions how to integrate the text (return value from the webservice call) into the textbox in the webtemplate?
    Kind regards.
    Christoph

  • What is the best way to call a report from within a report

    What is the best way to call a report from within a report(master / Detail concept)
    A type of drill down report
    Oracle Database 10g
    Forms 10.1.2.0.2
    Report Builder 10.1.2.0.2

    Hi
    Have a look in this link, certainly you will get fix, if not just post a comment on blog, will get reply soon
    http://windows7bugs.wordpress.com/?s=oracle+10g+bug

  • Calling ORACLE Functions from within CF Builder report

    Hi, I have an ORACLE function that I would like to call from within my CF REPORT.
    I know there is a section in the report builder where you can write coldfusion code to perform tasks, but I would rather simply call the ORACLE function for each detail row in the report
    I do not want to call this function from within my main ORACLE query that I use for the report, so please don't suggest that.
    Thanks so much.
    -Jim

    6.0.5 is not certified against 10g database, so I suggest to upgrade to 6.0.8.26 (6i patch 17) first to see if the problem is gone.

  • Is it possible, when i call a vi from within my code, to pass to it parameters as input and to return some values too?

    Hi There!
    I am currently calling a vi from within my code. However, what i would like to do, is to pass it 2 int values when i call it and for it to return 2 int values when it is done!
    Any advice on how i can do this please.
    Thanks.
    Regards,

    Hi Matrix,
    is there a reason you do it this way? By Ref (it is called dynamically loading)
    If you place the VI directly on the BD of a VI you can just wire things up.
    Now if you need dynamically loading. hoover the open VI-ref function and right click on the type specifier and select create constant. Then right click browse, browse to your VI. Now you have the connector pane.
    But if I were you I just use VI directly, because you'll keep connections active between the two VI's
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Calling  r25con32.exe  from the command prompt

    how to call r25con32.exe from the run prompt.

    Duplicate:
    Calling  r25con32.exe  from the command prompt
    :)

  • How to call a package from within a package

    How would I call a package from within a package and pass variables to it. For instance I am trying to pass variables to a log package from another package when a user inserts or updates a table

    First, technical questions need to be addressed to one of the technical forums. Products | Database | SQL & PL/SQL would be appropriate for this question. Please direct any followup to that forum.
    Second, you cannot call a package; a package is a collection of stored procedures and functions. You can call a packaged function or procedure from another package simply by specifying the package name and the procedure
    CREATE OR REPLACE PACKAGE pkgA
    AS
      PROCEDURE callPkgB;
    END;
    CREATE OR REPLACE PACKAGE BODY pkgA
    AS
      CREATE PROCEDURE callPkgB
      AS
      BEGIN
        pkgB.someProcedure( 'Some argument' );
      END callPkgB;
    END pkgA;In general, any packaged procedure can be called by specifying the schema, package, and procedure name, i.e.
    EXEC mySchema.myPackage.myProcedurethough the schema and package can be omitted if the calling procedure is in the same schema or package.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to call a procedure from within another procedure?

    What's the syntax to call a procedure from within a procedure.
    I have a procedure z(user_id IN number, ....)
    then
    procedure a (user_id IN number, ....)
    procedure b (user_id IN number, ....)
    procedure c (user_id IN number, ....)
    I want to call procedure a, b, c from inside procedure z.
    How would I do that?

    Same way :
    SCOTT@db102 SQL> create or replace procedure a (p1 in varchar2) is
      2  begin
      3     dbms_output.put_line (p1);
      4* end;
    SCOTT@db102 SQL> /
    Procedure created.
    SCOTT@db102 SQL> create or replace procedure z (par1 in number) is
      2  begin
      3     if par1 != 0 then
      4             a ('This is proc a');
      5     end if;
      6* end;
    SCOTT@db102 SQL> /
    Procedure created.
    SCOTT@db102 SQL> set serveroutput on
    SCOTT@db102 SQL> exec z (1);
    This is proc a
    PL/SQL procedure successfully completed.
    SCOTT@db102 SQL>                                                    

  • Starting notepad.exe from within Java app?

    Is it possible to start notepad.exe from within a java app to display a log file (for instance)?

    search the forum for Runtime.getRuntime()

  • Calling an EXE from Forms 4.5

    How do i call a windows Exe from forms. Whats the exact syntax to do that? Code sample would help.
    Thanks!

    Client/server mode calling an EXE from Forms 4.5
    The following is a Foreign Function Interface that I employed to launch an outside program in its own asynchronous window. It was a great alternative to the HOST command.
    The disadvantage to the HOST command was that the launched program would have to be closed before you could return to the form. With this method the the launched program
    could be minimized etc. and you could switch back and forth between forms and it.
    ===============================================================
    PACKAGE fp_winexec IS
    FUNCTION run(p_cmd IN OUT VARCHAR2)
    RETURN BOOLEAN;
    END;
    PACKAGE BODY fp_winexec IS
    dll_handle ORA_FFI.LIBHANDLETYPE;
    winexec_handle ORA_FFI.FUNCHANDLETYPE;
    FUNCTION RunICD(
    handle IN ORA_FFI.FUNCHANDLETYPE;
    cmd IN OUT VARCHAR2;
    disp_mode IN PLS_INTEGER)
    RETURN PLS_INTEGER;
    PRAGMA INTERFACE(C, RunICD, 11265);
    FUNCTION run(p_cmd IN OUT VARCHAR2)
    RETURN BOOLEAN IS
    v_tmp PLS_INTEGER;
    v_cmd VARCHAR2(2000) := p_cmd;
    v_retval BOOLEAN := TRUE;
    BEGIN
    v_tmp := RunICD(winexec_handle, v_cmd, 1);
    IF v_tmp = 2
    THEN
    MESSAGE('Cannot find '||v_cmd||' or one of its components);
    v_retval := FALSE;
    END IF;
    return(v_retval);
    END run;
    BEGIN
    dll_handle := ORA_FFI.REGISTER_LIBRARY
    (NULL, 'krn386.exe');
    winexec_handle := ORA_FFI.REGISTER_FUNCTION(dll_handle, 'WinExec', ORA_FFI.PASCAL_STD);
    ORA_FFI.REGISTER_RETURN(winexec_handle, ORA_FFI.C_INT);
    ORA_FFI.REGISTER_PARAMETER(winexec_handle, ORA_FFI.C_CHAR_PTR);
    ORA_FFI_REGISTER_PARAMETER(winexec_handle, ORA_FFI.C_INT);
    END;
    ====================================================================
    -- To call the program from forms
    DECLARE
    v_retval BOOLEAN;
    BEGIN
    v_retval := fp_winexec.run(:control_block.program_to_run);
    END;

  • Calling external programs from within a Tomcat application

    I've got a fairly complex existing Tomcat application (which is packaged and built as a .war file) which I'm trying to edit so that it calls a Perl script part way through the processing, which will generate an XML file used later on. I think I've worked out how to call external scripts from within Java, but at the moment when I try and access the application via Tomcat the application either hangs or bails out (I don't know which, as the log files unhelpfully don't give any error messages).
    The code which is causing the problem looks like this:
    System.err.println("Calling runtime...");
    Runtime runtime = Runtime.getRuntime();
    System.err.println("Executing process...");
    Process process = runtime.exec("/path/to/ysearch.pl 'News' '\"search query\"' 'file");
    System.err.println("Waiting for process...");
    int exitVal = process.waitFor();
    System.out.println("Exited with error code: " + exitVal);The code gets as far as "Executing process..", beyond that there is nothing in the log file so I presume the runtime.exec() call is where the problem is. I'm not interested in reading the output from the script (there shouldn't be any), so that's not an issue, and the permissions on it allow anyone to read or execute ysearch.pl so I don't think there's a problem in that area.
    Does anyone have any suggestions which I could try to get this to work? I've only been using Tomcat for a week (I'm picking up on someone else's code) so I might have made a beginner's mistake. I'm using Tomcat 5 on Fedora Core 7, and Java 1.5.0_01 (I can't easily change any of those).

    I'm not sure, but I thing that overhead caused by calling du cannot be big enough to matter even on older machines.
    But, when calling du from Perl script you are also invoking shell, and this can be a little bit more 'heavy'.

  • Running an exe from within Oracle WebLogic 10g R3 does not find dll

    Hi,
    I am facing a strange issue with Oracle WebLogic 10g R3.
    I use the code as shown in Listing 1 below to run a windows based application exe (batch job) from within my web application hosted on Oracle WebLogic 10g Release 3.
    Note that this code woks fine on Tomcat 6.x and OC4J (JDeveloper TP4).
    The exec gets executed but the log of the exe program shows it could not load certain DLLs.
    Note that these DLLs are in the same directoy as the Batch program and this directory is in the PATH.
    Running through simple Java Program Successful*
    When I run the same program from a java program it runs successfully. So this means some WebLogic environment does not get set properly.
    Running directly BatchProg.exe rather than cmd.exe fails*
    Also note that when I run the exe directly e.g. BatchProg.exe rather than through cmd.exe it gives me a error the system did not find the file specified.
    CreateProcess error=2, The system cannot find the file specified with cause java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    Listing 1:*
    String[] commandArgs = new String[|http://forums.oracle.com/forums/] { "cmd.exe", "/C", "BatchProg.exe \"param1\" \"param2\" " },null , l_workingDir)
    Runtime rt = Runtime.getRuntime();
    Process proc;
    proc = rt.exec( commandArgs, envParams, workingDir );
    ProcessIO errStream = new ProcessIO( proc.getErrorStream(), "ERROR");
    ProcessIO outStream = new ProcessIO( proc.getInputStream(), "OUTPUT");
    errStream.start(); // process any errors from the command
    outStream.start(); // process any output from the command
    System.out.println("Error=" +errStream);
    System.out.println("Out" + outStream);
    return (p_waitToFinish ? proc.waitFor() : this.SUCCESS);

    OK.
    I have posted this on the WebLogic Forum.
    Thanx.

  • EJB 3.1 @Asynchronous and calling other methods from within

    Hey all,
    I am helping a friend set up a test framework, and I've turned him on to using JEE6 for the task. I am decently familiar with entity beans, session beans, and such. One of the new features is @Asynchronous, allowing a method to be ran on a separate thread. The test framework generally needs to spawn potentially 1000's of threads to simulate multiple users at once. Originally I was doing this using the Executor classes, but I've since learned that for some reason, spawning your own threads within a JEE container is "not allowed" or bad to do. I honestly don't quite know why this is.. from what I've read the main concern is that the container maintains threads and your own threads could mess up the container somehow. I can only guess that this might be possible if your threads use the container services in some way.. but if anyone could enlighten me on the details as to why this is bad, that would be great.
    None the less, EJB 3.1 adds the async capability and I am now looking to use this. From my servlet I use @EJB to access the session bean, and call an async method. My servlet returns right away as it should. From the async method I do some work and using an entity bean store results, so I don't need to return a Future object. In fact, my ejb then makes an HttpClient call to another servlet to notify it that the result is ready.
    My main question though, is if it's ok to call other methods from the async method that are not declared @Asynchronous. I presume it is ok, as the @Asynchronous just enables the container to spawn a thread to execute that method in. But I can't dig up any limitations on the code within an async method.. whether or not it has restrictions on the container services, is there anything wrong with using HttpClient to make a request from the method.. and making calls to helper methods within the bean that are not async.
    Thanks.

    851827 wrote:
    Hey all,.. from what I've read the main concern is that the container maintains threads and your own threads could mess up the container somehow. I can only guess that this might be possible if your threads use the container services in some way.. but if anyone could enlighten me on the details as to why this is bad, that would be great.
    Yes since the EE spec delegated thread management to conatiners, the container might assume that some info is available in the thread context that you may not have made available to your threads.
    Also threading is a technical implementation detail and the drive with the EE spec is that you should concentrate on business requirements and let the container do the plumbing part.
    If you were managing your own threads spawned from EJBs, you'd have to be managing your EJBs' lifecycle as well. This would just add to more plumbing code by the developer and typically requires writting platform specific routines which the containers already do anyway.
    >
    None the less, EJB 3.1 adds the async capability and I am now looking to use this. From my servlet I use @EJB to access the session bean, and call an async method. My servlet returns right away as it should. From the async method I do some work and using an entity bean store results, so I don't need to return a Future object. In fact, my ejb then makes an HttpClient call to another servlet to notify it that the result is ready.
    My main question though, is if it's ok to call other methods from the async method that are not declared @Asynchronous. I presume it is ok, as the @Asynchronous just enables the container to spawn a thread to execute that method in. But I can't dig up any limitations on the code within an async method.. whether or not it has restrictions on the container services, is there anything wrong with using HttpClient to make a request from the method.. and making calls to helper methods within the bean that are not async.
    Thanks.If you want to be asynchronous without caring about a return value then just use MDBs.
    The async methods have no restrictions on container services and there is nothing wrong with calling other non async methods. Once the async method is reached those annotations don't matter anyway (unless if you call thhose methods from a new reference of the EJB that you look up) as they only make sense in a client context.
    Why do you need to make the call to the servlet from the EJB? Makes it difficult to know who is the client here. Better use the Future objects and let the initial caller delegate to the other client components as needed.

  • Trying to run an .exe from within pdf

    I am trying to run an executable file from within a pdf.  I get the error "This file is set to be launched by this pdf file.  This is currently disallowed by your administrator."  Error box is labeled "acrobat.exe"
    Using:  Adobe Acrobat 9 pro
    Windows 7
    This has worked with previous versions of Acrobat, is it still possible to do?

    This is disallowed for security reasons.
    See the "attachment configuration" section at : http://learn.adobe.com/wiki/display/security/Application+Security+Library to change this behavior.

  • Calling stored procedure from within container TX

    Hi
    I am calling a stored procedure that resides locally (Oracle) from within a session
    bean after updating a number of ejb's. The stored procedure works fine if it performs
    a simple delete. However, the stored procedure is in turn calling another stored
    procedure that may reside in a different db. In such a case the update to the
    ejb's in not reflected at all. Is this possible to do this within one tx? BTW
    there is a reason I'm not calling the remote SP directly.
    Thanks

    Hi,
    I am not sure if I fully understand your question, but here is a list of points which you
    should check:
    - transaction boundaries
    - transaction isolation level
    - XA datasources and drivers
    - are the changes from the SP commited properly to the database ?
    - also note that WLS5.1 (if you are using it ?) supports 2 phase commit only with a
    single datasource
    Regards,
    Christian Buchegger
    Developer Relations Engineer
    BEA Support
    Michael schrieb:
    Hi
    I am calling a stored procedure that resides locally (Oracle) from within a session
    bean after updating a number of ejb's. The stored procedure works fine if it performs
    a simple delete. However, the stored procedure is in turn calling another stored
    procedure that may reside in a different db. In such a case the update to the
    ejb's in not reflected at all. Is this possible to do this within one tx? BTW
    there is a reason I'm not calling the remote SP directly.
    Thanks

Maybe you are looking for

  • Recently Reinstalled; No iLife?!

    I recently reinstalled OSX due to a problem with Pro Tools and GarageBand. Upon reinstallation I realized that iLife was no longer installed on my computer. It had come with it installed, so I figured it was on the OSX install disc. I looked through

  • Profile customized attribute is not working?

    Hi, I downloaded ‘WCSpacesExtensions’ project from Oracle because I want to add some customize attributes to Profile. I added ‘project’ to ExtendedProfileAttributes.java, and created getter and setter methods. In a jsff, this is my EL #{wcProfileCust

  • How do I download a previously purchased PSE to a new PC?

    How do I download a previously purchased PSE to a new PC?

  • Why in the SAP SRM  books inforecord is not a  source of supply in classic

    Hi All i have read many SAP Press books and materials but no where officially mentioned INFORECORD as source of supply but we could use INFORECORD as source of supply in the classic. Why SAP did not agree inforecord is a valid source of supply in any

  • Move old time machine data

    Hi all I want to move a large amount (about 150GB) of old time machine data from one external hard drive to another so I can use the hard drive for other things. The time machine data is not part of my current time machine backup but an old one (from