Webutil client_host

I'm using webutil(client_host).
e.g.
CLIENT_HOST( 'CMD.EXE /C START '||NAME_IN( 'block_name.item_name' ) );
The value acquired using CLIENT_GET_FILE_NAME goes into 'block_name.item_name'.
In 'C:\Documents and Settings' e.g. becomes an error when a folder with a blank is specified.
If there is the solution method, please let me know.

Hi Duncan.
If so, you just need to alter your command
a little to enclose the path in quotes. e.g)Unfortunately It may not work. START will think that the parameter is a title of a window, not a command.
C:>START /?
Starts a separate window to run a specified program or command.
START ["title"] [Dpath]  [MIN] [MAX] [SEPARATE | /SHARED]
[LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[WAIT]  [command/program]
[parameters]
"title" Title to display in window title bar.
path Starting directory
etc...

Similar Messages

  • How to run multiple DOS commands from a single Webutil Client_Host session?

    Hello all,
    I have a requirement where I need to create an interface with SVN from Forms for basic checkin-checkout of files.
    So, I've been trying to use webutil client_host to open a command line session and issue svn commands.
    For svn, sometimes I need to give multiple commands like change to a particular directory and then run an svn command.
    But client_host takes in only one command at a time and I'm unable to issue a series of DOS commands to perform
    a particular task.
    Is there a way to do this?
    Pls suggest.
    Regards,
    Sam

    First your original question... You can put more than one DOS command on a single line, simply separate each command with an ampersand (&). For example:
    mkdir c:\abc & cd abc & dir*
    Regarding your concerns about performance, well that would depend on exactly what you mean. Using CLIENT_HOST (or HOST on the server) simply opens a shell (DOS in this case) then passes your command to it. The performance of performing this action really isn't measurable. Basically you are just pressing a button and you should get a near immediate action. As for the performance of executing each command, that has nothing to do with Forms. Once the command is passed to the shell, the rest is a function of the shell and whatever command you passed.
    Having said that, if you were to write something sloppy like a loop (in pl/sql) which called CLIENT_HOST lots of times repeatedly, then yes there would be a performance problem because the pushing of the button will cause an exchange to and from the server and each cycle in the loop will do the same.
    So the answer to how performance is impacted will depend on what exactly you need to accomplish. If it is a single call to CLIENT_HOST, this should be fine.

  • WEBUTILS CLIENT_HOST

    I am using the webutil client_host functionality.
    The following command calls the program correctly but the tabs have been ignored or replaced by spaces.
    CLIENT_HOST('creditcarddonations.exe '||:global.connum||CHR(9)||v_name||CHR(9)||RTRIM(v_address, CHR(9)));
    Any Ideas?
    Works fine using host in Forms 6i
    Nigel

    On further investigation the tabs exist in the command string up to the SET_CUSTOM_PROPERTY in the webutil_core.set_item_property procedure

  • Webutil - Client_host not working

    Hi all,
    I have installed/configured Webutil along with Jacob.jar and signed them. Also compiled the webutil.pll. Attached this to a form and when I used the client_host command to call any exe file, I get a please acknowledge message and the thereafter no processing.
    I am using Oracle Forms 9.0.4.
    sample command
    client_host('CMD /C cp c:\abc.txt c:\a.txt');
    Is this could be configuration issue of webutil?
    An exe on Application server should be opened in the client system.
    Is there any other way to access this?
    Please suggest.
    Regards,
    Gopal.

    Hello,
    I tested with Webutil 1.0.5 and Forms 9.0.4 on Windows 2000:
    It worked for me with:
    client_host('CMD /C cp c:\abc.txt c:\a.txt');
    What OS do you have?
    You should check to see if it does work in CMD promt in order to see if this is an OS issue or an WebUtil issue.
    Best Regards,
    Eugen

  • Webutil client_host problem executing pkzip pkunzip commands

    Hi,
    I configured webutil with Developer 10g (9.0.4).
    I used webutil_106.zip and jacob_18.zip.
    The execution of this statements (example) are successfully:
    CLIENT_HOST('notepad');
    CLIENT_HOST('tnsping db');
    However, when I issue this ones (in order to zip/unzip files):
    CLIENT_HOST('pkunzip d:\arch.zip d:\tmp');
    or
    CLIENT_HOST('pkzip....');
    I got this error:
    100501 non-OracleException
    What do I have to configure in order to execute this commands????
    Regards, Santiago

    I find the solution in metalink.
    Execute the commands like this:
    client_host('cmd /c start c:\pkzip .....');

  • WebUtil: CLIENT_HOST arg #2

    According to the PROCEDURE BODY of CLIENT_HOST WebUtil's attached library, there is a second argument (KWD in number).
    Does anyone know what this does? The Oracle documentation I have seen does not address this argument.
    Also: Is there a way to launch a client-side application asynchronously so that the user does not have to exit the client app in order to free-up the oracle screen which launched it?
    Thanks for any insight.

    Hello,
    The Webutil HOST package contains all you need:
      FUNCTION  Host(cmd in VARCHAR2) return PLS_INTEGER;
      PROCEDURE Host(cmd in VARCHAR2);    
      FUNCTION  Blocking(cmd in VARCHAR2) return PROCESS_ID; 
      PROCEDURE Blocking(cmd in VARCHAR2);  
      FUNCTION  NonBlocking(cmd in VARCHAR2)return PROCESS_ID;
      PROCEDURE NonBlocking(cmd in VARCHAR2);
      FUNCTION  NonBlocking_With_Callback(cmd in VARCHAR2, callbackTrigger in VARCHAR2)return PROCESS_ID;As you can see, it contains a NonBlocking function ;o)
    Francois

  • Problems with Webutil Client_Host

    Hi,
    We are working on Forms10g on Win XP Environment. I have installed Webutil on m/c. On When Button Pressed trigger I am trying to use Client_Host command to execute a batch file. Upon hitting the button it displays message saying " Please Acknowledge " and then it displays Error Message " 40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503". Any help in this regard is highly appreciated.
    Regards

    ORA-06503: PL/SQL: Function returned without value
    Cause: A call to a PL/SQL function completed, but no RETURN statement
    was executed.
    Just a wild guess, but maybe this will help:
    DECLARE
    pid WEBUTIL_HOST.PROCESS_ID;
    BEGIN
    pid := WEBUTIL_HOST.NONBLOCKING_WITH_CALLBACK('CMD /C NOTEPAD '||fname,'HOST_CALLBACK');
    END;

  • Webutil.client_host relative path

    Hi, I'm upgrading an old 6i client application. There are some calls to host commands that contain relative paths.
    ..\import\start.batFrom 10G using client_host these files are not found. Probably the paths are not relative to the location of the fmx file?
    Edited by: Rene W. on Jan 29, 2009 1:07 AM
    Solved, should have left "host' instead of client_host in this particular instance.

    Hi, yes I realized that after posting my question. We start a couple of conversion tools before loading data into the database. Advantage of the webforms is that files can be uploaded to the AS and conversion can run from there. No need to have the conversion tools on all the clients anymore.

  • Webutil client_host question

    Hello,
    I have
    CLIENT_HOST('cmd /c START "" "fisier.bat" ');but if that file is located oln C:\forms\4.1.1\imp_ret, how can i specify this path in that command?
    Thanks

    try something like this:
    cmd /c cd /d <your_working_directory>&&<your_command>the +&&+ simply tells the cmd that it needs to execute another command; so the first it does is to change into your working directory ( /d is used if it is on another drive) and after changing the directory it executes your second command.
    cheers

  • With webutil-client_host, send txt file to client printer

    hi,
    I wanna to learn how to send a txt file to client default printer(local or network),
    I created txt file at client disk, and try to send printer directly,
    just try some statement looks like below;
    a.client_host('cmd /c start print C:\TEMP399899.txt /d:lpt1');
    b.client_host('cmd /c start copy C:\TEMP399899.txt lpt1');
    I do not know the command prompt syntax, please help me, reference me,
    thanks

    Hi,
    on a command line type
    print /?
    for the help of how to print documents. On XP this help is
    PRINT [D:device] [[drive:][path]filename[...]]
    /D:device Specifies a print device.
    Frank

  • Webutil CLIENT_HOST problem

    Hi,
    I am trying to use Webutil_host.NonBlocking_With_Callback.
    When I invoke a txt document via notepad, it works fine but not for doc file
    This is for Notepad:
    V_PROCESS_ID := WebUtil_Host.NonBlocking_With_Callback('NOTEPAD '||C:\Test.txt, 'CALL_BACK');
    This works absolutely fine,it opens the txt file and my code in Call_Back trigger gets fired when I close the 'Notepad Application'
    But when I want to open word doc I cannot use above code. so I have to use
    v_cmd := 'cmd /c C:\Test.doc';
    V_PROCESS_ID := WebUtil_Host.NonBlocking_With_Callback(v_cmd , 'CALL_BACK');
    This works fine upto opening the document, but also immediately fires the code in Call_Back trigger not waiting for the 'Word Application' to be closed.
    Is there a way to get around this???

    Hi Manohar.
    Could you please post the text of the metalink note 290130.1 for someone that has not access to metalink???
    Thanks,
    Fabrizio

  • Oracle.forms.webutil.browser.BrowserFunctions bean not found [SOLVED]

    Hi. We develop our 10g forms on the Windows side and then deploy then on our UNIX server.
    I have an application that compiles and runs fine when deployed on the UNIX-side of things, but when I attempt to run it on the Windows-side of things I get the error:
    oracle.forms.webutil.browser.BrowserFunctions bean not found. WEBUTIL_SEPARATEFRAME. IsSeparateFrame will not work.
    If I acknowledge this message then the form continues to run, but if it attempts to execute the WebUtil Client_Host functionality then I get the error:
    oracle.forms.webutil.browser.BrowserFunctions bean not found. WEBUTIL.HOST.Execute will not work.
    Any suggestions as to what I might have messed up configuration-wise on the Windows-side of things? Any help would be greatly appreciated!

    Ugh. I wasn't pointing to the WebUtil configuration. All good now.

  • Client_host('D:\ipconfig.bat');

    Hi dear All
    Hope that you all will be at the best of your health and knowlege...
    i am facing a problem while running the oracle forms on the web... i want to execute a .bat file through Client_Host command...
    while i run the form locally and use the HOST command . it works ...
    but when i run it through server and use Client_host ... it does not work..
    kindly help me out to solve this problem... Please
    i will be very thankfull to you....
    My .bat file :
    @echo off
    echo ipconfig /all
    dir d:\test_ip
    Pause
    I want to show all info. when ipconfig/ all...but its doesnt show.
    I take a button on that button , i wriete code
    host('D:\ipconfig.bat');

    Two things; first, your batch file has to exist on the client in order to execute it on the client. Rather than install the batch file on each client, you could test if the file exists and if not, then transfer the batch file to the client and then execute it.
    Second, your post states you are using *"host('D:\ipconfig.bat'):"* but yet you say you are using the WebUtil Client_Host procedure. Your code sample doesn't match your statement. ;) Are you using Client_HOST and if so, did you configure WebUtil on your Application Server? Also, as spilgrim asked, are you getting any errors in the Java Console?
    As spilgrim pointed out, in order to use CLIENT_HOST, you must have configured your application server to use the WebUtil Library. Also, typical Host calls will execute and terminate. If you want the Host call to keep the Host session active, I recommend you use the following:
      Client_Host('cmd /k d:\ipconfig.bat');Again, assuming that the D:\ipconfig.bat exists on each client computer. The */k* parameter to the CMD.exe program instructs CMD to remain active; where the */c* instructs the CMD.exe program to execute and then terminate. Google CMD.exe or open a CMD window and type CMD /? to see more information on the CMD.exe parameters.
    A suggestion, you might want to consider changing your batch file so it writes the output to a text file. Then read the text file into your form and present the data to your user in the Form rather than in the command window. This is a much cleaner presentation and it enables you to perform a little error checking. If the output file doesn't exist, you can display a message to your user to indiate the command failed.
    Change your batch file as follows:@echo off
    ipconfig /all > d:\test_ip\your_file.txtThen change your code to:
    DECLARE
      b_file_exists  BOOLEAN := FALSE;
      ft_handle      Client_Text_IO.FILE_TYPE;
      CRLF           CONSTANT VARCHAR2(15) := CHR(13)||CHR(10);
      v_line         VARCHAR2(1000);
    BEGIN
      Client_Host('cmd.exe /c ipconfig.bat');
      b_file_exists := WebUtil_File.File_Exists('D:\test_ip\ipconfig_output.txt');
      IF ( b_file_exits ) THEN
        --Read the contents of the file and display in the multi-line text_item.
        ft_handle := Client_Text_IO.FOpen('D:\test_ip\ipconfig_output.txt','R');
        LOOP
          BEGIN
            --Read Line from File
            Client_Text_IO.Get_Line(ft_handle, v_line);
            :YOUR_BLOCK.YOUR_ITEM := v_line||CRLF;
          EXCEPTION WHEN NO_DATA_FOUND THEN
            EXIT;
          END;
        END LOOP;
      ELSE
        MESSAGE('Command failed - File doesn''t exits');
        Message(' ');
      END IF;
    END;Note: This is just sample code, it has not been tested. You will need to modify the code to suit your needs.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Weird WebUtil Error.

    I am attempting to test WebUtil "client_host" on an HP-UX 9iAS install. I have created a form that has a command line that I can enter the command I want to run and a button to run it. I have sucessfully tested this form on both a Windows 9iDS and 9iAS installs (No problems, runs the command as expected). When I run this same form off of the HP-UX 9iAS I get the following error:
    FRM-40735: WHEN-CUSTOM-ITEM-EVENT trigger raised unhandled exception ORA-06508.
    I get this error when the form starts up. When I enter my command and attempt to run it I get the following error:
    FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled excpetion ORA-06508.
    I get no WUC-(whatever) error codes and my command does not run. Any ideas?
    Thanks in advance.
    Steve.

    Here is the entire console log contents from the time I start the app to when I attempt to run my command (in this case - notepad.exe):
    (******************Begin attachment)
    Oracle JInitiator: Version 1.3.1.13
    Using JRE version 1.3.1.13-internal Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\stpeters.GG
    Proxy Configuration: no proxy
    JAR cache enabled
    Location: C:\Documents and Settings\stpeters.GG\Oracle Jar Cache
    Maximum size: 50 MB
    Compression level: 0
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    Loading http://mis_sf.gg:7780/forms90/java/f90all_jinit.jar from JAR cache
    Loading http://mis_sf.gg:7780/forms90/webutil/webutil.jar from JAR cache
    RegisterWebUtil - Loading Webutil Version 1.0.2 Beta
    Loading http://mis_sf.gg:7780/forms90/webutil/jacob.jar from JAR cache
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 902122
    (******************End Attachment)
    That's all there is. Do you need any other info?
    Steve.

  • Return code from Client_host command

    Hi,
    Is it possible to get the return code from the os when I issue the webutil Client_Host procedure?
    Thanks,
    Mary

    Mary
    You can use the WEBUTIL_HOST.HOST method instead of CLIENT_HOST. It is overloaded as both a Procedure and a function; the latter returns the client return code.
    Cheers, APC

Maybe you are looking for