Host command issue

hi,
i am using forms 6i and OS is windows XP. i have generated a file using text_io and file is generated successfully. the file is then processed and needs to be deleted. i am trying to use host command to delete it by using the file name which was genrated earlier but the file deletion does not take place.
file_name := 'abc.txt';
host('del C:\'||file_name);
but when hardcoding and running the following command it deletes
host('del C:\abc.txt');
kindly suggest what can be done.
thanks in advance
Regards,
RBL

hi,
@francis: i have checked the output and tested it and there seems no issue. i did think of the same possiblity but it is having an issue somewhere.
@ahmmad : i did check that out too. same output.
weird issue and sure that that the name of the file must be getting corruptted or disotred during the process.
regards,
RBL

Similar Messages

  • Oracle9i Host and Text_IO Command Issues

    We are currently attempting to migrate from Forms6i to Oracle9i Forms. I understand that the current Host and Text_IO commands execute on the application server tier and NOT on the client. To counter the Host command issue the migration documentation suggests using the 'Client Host Command PJC' demo which can be incorporated into a form. However, the only Host command that seems to respond is the 'Notepad' command. I need to use other Host commands. Has anyone actually used the aforementioned 'Client Host PJC' in an Oracle9i form?
    Also, I am aware of a utility being developed by Oracle called 'WebUtil' which is suppose to simplify this process. Any idea when this utility will be launched and made available to developers? Thanks in advance for your help.

    Hello:
    Robin Zimmermann, [email protected] g feng and every one:
    I want to integrate a third party report (it is brio's sqr), so i must run sqr from form with host command.
    first i install 9i as on window 2000,sqr .manually run sqr on 2000,then call sqr from form
    with host command ,it is just work well.then i use web.showdocument push the report to end-user,my goal has get
    But when i do the same on aix 5l,host command seems not response .i can only run this command:
    echo hello > /tmp/hello.log.
    other system command ,such as " chmod 777 /tmp/hello.log " can't execute ,who can help me or some other ideas?
    lixz

  • Issues with host command

    Hi All
    We are running Forms 10gR2 under linux. We are having issues with the host command. We use host command to call ProC* modules in the appsvr. It used to work in Forms 6i. Host commnd no longer works in forms10g. Do we need to any setup to run commands using host.
    We need to resolve this issue immediately.
    any help is appreciated.
    Rgds
    Arvind Balaraman

    Arvind has said the command needs to run on the app server so HOST is correct, not CLIENT_HOST.
    I noticed when I installed 10g (on solaris) that the default.env file has a setting for PATH which does not include /usr/bin so HOST would not be able to find standard unix commands, so I added it in:
    PATH=/usr/bin:/home/oracle/product/AS101202/bin
    Alternatively you could include the full path on any unix commands run by HOST.
    Surpisingly I have not seen this documented anywhere. Could this be the problem ?
    I have a related problem I have not solved yet. I have one particular HOST command which works OK until after I run reports from forms, then it just stops working without producing any error.

  • Forms HOST command no longer works after database upgrade from 10g to 11g

    Hi,
    After upgrading the database 10g to 11g the forms HOST command no longer works on Unix server. The form used to work fine prior the upgrade. I read all the threads I could find and did not see any solutions. Adding PATH and LD_LIBRARY_PATH does not work because it does not even run a basic shell script. (I saw this solution, adding PATH and LD_LIBRARY_PATH, in many questions / threads).
    1. I wouldn't expect the database upgrade to be an issue, but it is the only change we had.
    2. Note, 11g is Oracle Fusion Middleware which is quite a bit different than 10g.
    I even tried the most basic commands like "echo" which is a build-in Unix command and there is no directory for it (ie. no /usr/bin - so variable PATH is irrelvent). i.e HOST('echo hi'); and HOST('echo "hi" '); and even HOST ('echo hi > /my_file.txt'); all returns FORMS_FAILURE (actually the if is IF FORM_SUCCESS THEN ... else ... and the else part always runs now - whereas it didn't before.).
    Or basic commands like /usr/bin/ls as in HOST(/usr/bin/ls). At that point I was just testing the Unix command would return FORM_SUCCESS even though I could not see the results (because they weren't writing to a log file). Notice that I'm using the direct path /usr/bin so no Unix environment variables were needed.
    The form does use webutil but that part works. For example, we have webutil_file_transfer( ....) The file shows up on the application server and in the expected directory.
    Here's the main goal. Upload a file from clients local PC to the datebase server. The form uploads the file to the Application server, then we have a Unix script to scp (secure copy) the file from the application server to the database server. IF webutil, or any other Oracle functions could put the file on the database server that would be better. But, I don't know of any procedures that do that - or would have done it cleanly (i.e. storing to database and write back to server and then using a blob etc. )
    Anyway, I was hoping someone would help with either of these.
    1) Get the HOST command to work. - If we can get that to work then I wouldn't need any more help. We can just call the already existing Unix script to copy the file from the application server to the database.
    2) OR be able to upload directly to the database server - wanted to do that originally
    Any help would be appreciated

    Solution for those interested and for anyone else searching this forum for a solution
    I found this on My Oracle Support:
    <h3>Host Command from Forms Not Working in 11g in Sun Solaris Sparc OS [ID 1157346.1]</h3>
    Applies To: Oracle Forms - Version 11.1.1.1.0 and later
    Sun SPARC Sun OS
    Symptoms:
    When trying to execute a Shell script or any OS command using the host() Built-in from Forms 11g, the host()command is not getting executed. The same functionality works on other operating systems and in previous versions like 10gR2.
    Steps to be followed:
    1) Take a backup and edit the $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config/default.env or any custom environment file.
    2) Locate the following environment variable:
    LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) Comment out this variable. After the changes, it will look like the following:
    #LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) a) Instead of LD_PRELOAD, kindly use LD_PRELOAD_64 as given below :
    LD_PRELOAD_64=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    (This makes HOST AND RUN_REPORT_OBJECT work fine).
    4) Save the file and execute your forms. The Host() built-in will work as expected
    The LD_PRELOAD setting in default.env is only required for the working of signal chaining facility in JVM version 1.5 and later. If you are not using theSignal chaining facility, this variable is not required. For more information, refer to the following documentation
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14772/forms.htm#CJAJGAFF

  • Host command is not working on linux

    Hi
    I m using linux for application server n windows for client. I need to create folder from client machine by cliking a button of forms10g runtime.HOST command is not working which was working fine in windows.
    Any help is appriciateable.
    kazi mokarem

    Hi
    I had the same issue on linux a few weeks back. What tuned out was, when you install the Oracle app svr it does not include the system paths by default.
    The path where mkdir is located may not be visible to the app.
    Try to hardcode the path for mkdir as /bin/mkdir .... and seee if that works.
    If the above statement works then add that path in the paths variable in default.env file located in $ORACLE_HOME/forms/server directory
    HTH
    Arvind

  • WEBUTIL problems importing a file with the HOST command.

    We are investigating a problem where the users are trying to import a file in from the webserver to be used by the application. The users have successfully moved the file from their local PC to the application server. But, when we perform a HOST command to have the form moved to the UNIX directory, the form hangs. The very last statement of the .BAT file used in the HOST command does the move of the file. And, we can see the entire file in the UNIX directory, we just don't get return back to the form.
    I added displays before and after the HOST command in the form. I see the display before the command but don't receive anything after. The weird thing is this is only happening in our development server. The same issue is not happening in production. Also, if I run the form in client server mode, it works fine also. So, it has to be something on the development application server.
    If anyone has any advice, I would appreciate their help.
    Thanks.

    On the server (assuming Windows since you mention a batch file), locate the Oracle Process Manager Service (for mid tier) on the MS Services Console. Open the properties for this service and click on the "Log on" tab. Check the box labeled "Allow service to interact with desktop".
    That said, if you are executing a batch file on the Windows server to transfer another file to a Unix machine, the above likely won't work either. This is because Windows will not allow a service permission to access network resources (for security purposes). In this case, rather than the above, you will need to change the same setting so a real domain user and not the "Local System" account.

  • How to run a script from Oracle Form (Beside using HOST command)

    I would like to run a script from Forms 6.0. I know that we can actually issue this command :
    host('plus80.exe' username/password@connect_string @c:\scriptname);
    BUT, is there any other alternative ?

    Sqlplus is a different program, so one way or the other you have to leave Forms to run sqlplus. What is you objection against HOST?
    You can also run sqlplus from the database, but again you need a stored java procedure to call sqlplus (sort of HOST command that runs in the database).
    Francois' solution works if your script just has a query to run, but if you have specific sqlplus commands (spool etc.) forms_ddl is probably not a solution.

  • Host Command Problem

    hi,
    I'm running on OpenVMS 7.2-1 (no unix in this shop) trying to get the HOST command to return status. In desperation I created a dummy form with 1 button that when pressed issues:
    HOST('lalala');
    if not form_success then
    message ('bad status returned');
    else message ('good status returned');
    end if;
    Form_Status always returns success, even for totally bogus commands (like 'lalala'). I've put the test_cmd into a varchar2 in the pl/sql, I've put it in a dummy.com file then had the host file call dummy.com... I can't get anything except a successful status to return. What's up. That's what all the ora docs say to do. Any hints?
    thanks
    Sandy

    (2nd try. 404 on 1st reply)
    I would agree that the form is behaving as though it never sees the OS error.
    I tried both w/ & w/o no-screen and the results back to the form are the same (form_success = true), however w/o no-screen at least displays on the os cmd line the error.
    I tried tool_env.getvar returning '$status' returns blank.
    My form calls host('@dummy.com') where dummy.com does "exit $status". Show symbol $status does show an error but the form is not getting it.
    sg

  • Using the Host command

    Hi,
    I'm running windows 2000 O/S on my desktop to connect to an IBM AIX server to run Forms6. If you call the host command from within forms, does it go to the my desktop (client) or to AIX (server). Also, if I need a username and password to log onto AIX will I be prompted to for the username and password by the OS after issuing the host command? Please provide example if you can.
    Thanks,
    Leonard905

    When you execute a HOST command the code is executed on the machine on which your Forms engine is running.
    In client server this will be the client.
    In Web deployed Forms this will be the middle tier application server.
    Regards
    Grant Ronald
    FOrms Product Management

  • Host Command : Urgent

    Hi,
    I am trying to print a file on Unix server by using a 'HOST' command through form 6.0
    Actually the user can see the form through citrix (sitting on windows NT) and through the form we are trying to create a file on a Unix server and print that file.
    The file creation is ok but while printing Host command fails.
    Here is the example of codes that I am using.
    the_command := 'lp -dprpw1160 /lms/lmls_d3/las_qa/iris/ifile/LOT_CREATE_MANUAL.dat';
    host(the_command, NO_SCREEN);
    Any suggestion or comments will be greatly appreciated.
    Thanks
    Anurag

    It may just be a forum formatting issue, but I should think you would want a space between the destination flag and the printer name, viz:
    -d prpw1160 cheers, APC

  • Host command in oracle forms

    can anyone any one help me on this issue
    i am trying to use host command in a.s which is running in unix o.s to rename one of the file i am using the below command but its not working . can any one tell me whats worng or how to perform this
    the_command := 'mv /dir/filename1 /dir/filename2' ;     
         HOST(the_command,NO_SCREEN);

    I don't think you can do this with host like you did.
    You can create a script which accepts filename1 and filename2 as parameters and call this
    move.sh:
    mv $1 $2
    then call the script
    host('/home/oracle/move.sh /dir/filename1 /dir/filename2', no_screen);
    or if this doesn't work (in windows it works in 6i to call .cmd files without prefixing cmd /c don't know if this is also in unix, but you can try), you can call bash to do this
    host('/bin/bash /home/oracle/and_so_on
    regards
    christian

  • Running a Host Command on OEM Grid Control 11g

    Hello,
    I am trying to execute a host command on a remote windows server but I'm not exactly sure of the syntax of the Command Statement. I am attempting to run the following:
    tasklist /FI "IMAGENAME eq myApplication.exe" | grep myApplication.exe
    I can run this without issue on the server itself but once I attempt to execute in the host command window I get the following error:
    ERROR: Invalid argument option - 'eq'
    I am assuming that I need to place an escape character before the quotes but when I place a / before each of the quotes I get the same error. I looked so many place online but have not found anything. Anyone have any ideas? TIA!!!!
    -Todd

    hmm, not so sure this will work, try it on a small directory folder first. If it works great, if not youll have to have some downtime while you move the directory structure to new mount point
    stop all GC services.
    mv /gc_inst /gc_inst_temp
    edit the fstab, create new mount point /gc_inst and mount
    mv -R /gc_inst_temp/* /gc_inst
    why is gc_inst at 28gb? Seems quite large to me.

  • Forms HOST command on WebLogic not working.

    I am attempting to issue a HOST command from Forms 11g on a WebLogic Application Server (running on Solaris) to execute a server-side shell script.
    I previously had no problem doing this using OAS10g (also running on Solaris), but all attempts on WebLogic set FORM_FAILURE to TRUE, and I do not know how to trace the error or cause of the problem.
    To recreate, create a simple Form with a Text Item (ITEM4) and Command Button (ITEM5).
    When-Button-Pressed trigger on ITEM5 contains the following code:
    HOST(:item4);
    IF FORM_FAILURE THEN
      message('Form Failure occurred');
    END IF;Transfer to Form server, and compile.
    Even supplying '/bin/ls' as a command produces the error message.
    As I mentioned, this was previously working without a problem on OAS10g on Solaris, so I am unsure if WebLogic requires some sort of different Security or privileges to be specified for the Forms Application component.
    Cheers,
    Marc.
    Edited (code formatted) by: sirmarc on Oct 11, 2011 4:41 PM

    The problem is most often caused as a result of not having the necessary environment variables available to execute the command in question. When the shell is launched using HOST, most of the typical variables are stripped. Specifically PATH and LD_LIBRARY_PATH. As a result, you need to create your own script to call and not call the command directly. The script would include the setting of the necessary environment variable before calling the wanted command.
    You can try adding the needed variables to the default.env. In many cases, these will be picked up, it will just depend on exactly what it is you are trying to execute. So for example in default.env add to the existing PATH entry something like this or whatever is appropriate for your system> /usr/bin:/usr/ucb:/etc:.
    Do not delete any of the existing entries in default.env and most importantly, do not use variable references. You must fully qualify your entries. Variables like $PATH are not permitted.

  • Host command not executing Excel File

    Hi,
    I am trying to open a Excel file through a bat file.
    And calling this bat file from Oracle Forms 10g - Forms [32 Bit] Version 9.0.4.0.19 (Production).
    But some how nothing is happening.
    But if I issue - host("echo hello > c:\hello.txt"); --> this works fine.
    Host command is as - host('cmd.exe /c c:\temp_dir\File_test.bat');
    and the bat file contains following lines -
    File_test.bat
    cd c:\temp_dir
    PATH c:\Program Files\Microsoft Office\Office11\
    EXCEL Book2.xls
    Can anyone please provide some guidance in this regard?
    Thanks in advance!
    Avinash.
    Pune- India.

    Hey Guys,
    Thanks for your replies,
    But it seems I couldn't communicate my point to you.
    I want to execute the command on application server and not on client machine.
    I guess by using WEBUTIL_HOST it will execute the the command on client side and not on application server.
    I hope i made my point clear.
    Thanks for your help, looking forward to get more help!
    Thanks again!
    Avinash.
    Pune - India.

  • Host command not showing the output

    Hi,
    I am not able to view the host command's output from sqlplus(i am using an windows XP OS).
    The commands i tried:
    SQL> $whoami
    SQL> host whoami
    SQL> !whoami
    -Thanks
    Boopathy Vasagam

    Solomon Yakobson wrote:
    And keep in mind, SQL*Plus command host will open a command window, execute command and will close command window To avoid this you can use:
    host cmd /k echo %USERNAME%or
    host cmd /k echo %USERDOMAIN%\%USERNAME%Then SQL*Plus will open command window, execute echo command and will not close command windows (since /k was used). You will have to manually issue exit command in command window to close it.
    SY.

Maybe you are looking for