Host command in forms 10g

hi all
i am using host command in forms 10g. but it is not executing .
is there any distinct syntax or pre-requirement for executing this command
kindly help
thanks

i am using the following code create a text file in root directory.
the textfile should contain the list of folders,files present in the root directory.
XCMD:=NULL;
XCMD:='CD\' ;
     CLIENT_HOST('CMD /C' || XCMD);
XCMD:='dir >C:foldnm.txt' ;
     CLIENT_HOST('CMD /C '|| XCMD);
but the file is creating in the specific users directory. ie.
\ documents and settings\username\desktop
kindly help

Similar Messages

  • Is there anything like HOST command in Forms in Reports ??

    Hello everybody
    Is there any command in reports like a HOST command in Forms through which I can call a system command.
    My goal is I want to invoke a shell script from my report that will run in the background, do few things and come back to the report once a button is pressed.
    Thanks in advance :-)

    You can4t use the host command, but there is a solution available if you are running 8i with java see http://technet.oracle.com:89/ubb/Forum3/HTML/003262.html
    or
    http://asktom.oracle.com/pls/ask/f?p=4950:8:102326::NO::F4950_P8_DISPLAYID,F4950_P8_B:150612348067,Y
    Hope that will help you

  • Host command in forms/reports

    Is there a host command in reports 6i? I used this in forms 6i. When I tried to use in Reports 6i, I received a compile error.
    basically all I need to do is to get directory information. This can be easily done in forms using the host command. Is there any built in package or function to achieve this in reports?
    thanks

    there is no "host" command in reports 6i (or earlier versions). you might want to consider using forms+reports combination (calling the report from within a form, in which you can execute the host command and do whatever you want to do, then pass the related parameters to the report). I am using this approach to handle some complex end user reporting requirements.
    hope this proves useful
    regards

  • HOST command and Forms 4.5

    We were using HOST command(to start SQL Plus) in one of the form of our application (forms version 4.5) and this application was running fine on Win NT. Now this application is moved onto Windows 2000. Now we noticed that once the HOST command statement is executed, the application goes into hang and has to terminated. We fixed this problem temporarily by putting a message() and pause statement before and after HOST command statement and the application is running fine. I would like a better solution to this problem. If anyone has encountered this kind of problem or any idea, please reply.

    Hi, there,
    I have the same problem with my program. Have you figured it out the solution? and if not, could you show me the code of your temporary fix? my email is: [email protected]
    Thanks
    We were using HOST command(to start SQL Plus) in one of the form of our application (forms version 4.5) and this application was running fine on Win NT. Now this application is moved onto Windows 2000. Now we noticed that once the HOST command statement is executed, the application goes into hang and has to terminated. We fixed this problem temporarily by putting a message() and pause statement before and after HOST command statement and the application is running fine. I would like a better solution to this problem. If anyone has encountered this kind of problem or any idea, please reply.

  • Call HOST command FROM FORMS 4.5 AND 6.0

    I have a problem that I found out about yesterday, and have no idea how to fixe it.
    I created a form to run on form 4.5.9.7 In this form i call up the host command, but it does not work properly, because by using the host oracle stops there until i close the application that i called with the host, it hangs there. But now it doesn't do it, once the host is executed, it continues the rest of the code that i have, which should not.
    On the same computer i created another form on forms 6.0.5.2 and call the host command again, and finally it worked perfect! I mean until the program called by host command is running forms does not continue, it hangs there.
    Could someone explains me that please, is there some patch I need on forms 4.5?
    null

    We converted forms from 4.5 to 6.0. Basically all you have to do is recompile the forms. but, the very first thing you have to do is recompile all the libraries. The forms will not work if you don't recompile the libraries first. So, open and compile the libraries in 6.0, then open and compile the forms in 6.0. They should then work fine. If they do not, try deleting and reattaching the libraries and compile again.
    Good luck.

  • Host command in forms 6i

    Hi,
    I am using host command to execute the sqlloader in windows environementand it is working fine.
    I want to display the dos prompt to the user while sqlloader operations is going on and to termiate after the task is completed.
    Please let me know how to perform this task.

    Check Here:
    Forms

  • Permissions to execute host command in AS 10g

    I'm trying to execute HOST('NET USE Y: \\192.168.1.3') in my server with a webforms to mapping a network drive in my server.
    Running with the Form Builder 10g (CTRL+R) this works fine, but when using AS 10g not.
    The server not require authentication...............
    If a try map the network drive manually, work's fine.

    Assuming your IAS is running on Windows: look up the IAS services in Windows Control Panel -> ... Click properties on service, change "logon as" from LocalSystem to a real account (local or domain).

  • 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 output how do i get in forms

    how do i read output of host command in forms.
    l_cmd := host('which rm'); -- if u run on linux it returns /bin/rm on unix /usr/bin
    l_cmd := l_cmd || ' -f '|| file_name;
    host(l_cmd,no_screen);
    command on linux look like /bin/rm -f filename.txt
    on unix -> /usr/bin/rm -f filename.txt
    how can i do this.

    I found this in the forum, which might help you
    http://forums.oracle.com/forums/thread.jspa;jsessionid=8d92200630de63aea3a17b9d4c7cb6ffc3714fdd2ce2.e34Tb34Lb34PbO0Lb3eTahiPbNyTe0?messageID=569031&#569031

  • HOST Command Equivalent In Forms 9i

    We are migrating from Forms 5.0 to 9i. The current application is using lot of HOST commands in Forms 5.0.
    As we knw HOST command is deprecated in Forms 9i, what method to be followed to recode this feature?
    Thanks in advance.

    The client_host command that ships with the WebUtil package runs the command on the client workstation in a web deployed environment.
    HOST runs the command on the machine where the Forms application/executable is running. This can a number of places:
    - When running the later versions (web deployed) this is your application server
    - When running GUI Forms in client/server mode this is the client workstation
    - When running character bases Forms this is the machine that runs Oracle Forms. That could either be the client itself or a server that you access through telnet.
    To come back to your question: client_host cannot be used to execute an operating system command at the database server. Personally, I would use DBMS_SCHEDULER for this an schedule an EXTERNAL JOB to be executed immediately. A Job of type External contains an Operating System command or script that gets executed.
    Forms 5.0 is mostly deployed as a GUI client/server application. I don't know if it still supported character mode. Forms 3.0 was a true character mode application (no GUI yet). Forms 4.0 and 4.5 supported GUI and character mode as well.
    You state that character mode Forms run on the database server, which is not necessarily true. Character mode Forms can run on whatever machine you want; a client desktop, a central Unix/Linux server or the database server itself. If it doesn't run on your local workstation you just need telnet access to the central server running Forms.
    You are correct that client_host is used when migrating from client/server to the web. If you're still running character based Forms on the same server as your database, I would advice using the DBMS_SCHEDULER approach previously described. This keeps you from writing and maintaining a Pro*C program.

  • 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 working

    Oracle AS Version 10.1.2.0.2, Oracle Forms Version 10.1.2.0.2, Windows XP.
    I am using HOST command to read a files from the directory (on the server). But HOST does not working. When i click the button to read the file, it just hangs on and no error on the console.
    Does host work on forms 10g?
    actually i was using client_host of webutil and its working fine. But it pick the directory from the client. Whereas i need to pick it from the server where AS is. That why i went for HOST command.
    Any suggestion.

    Hi,
    Try this.
    1. Create a batch file (which would first set the required variables as when you do the "set".)
    2. Add the following to the batch file.
    C:\javasoft10g\jre\bin\javaw -classpath C:\javasoft10g\jre\lib\rt.jar;C:\javasoft10g\paths;;C:\javasoft10g\paths\dusjava.jar; %1 %2 %3 %4 %5 %6 %7Save the batch file in some location (say c:\mybatchscript.bat).
    From forms, call it like
    host('cmd /c c:\mybatchscript.bat > c:\temp\testlog.log' );Now, does it work?
    -Arun
    P.S : Looks to me like, you are setting some variables (or calling another batch file - set , which sets up the variables). So, make sure you set all the required variables in the batch script itself.
    -Arun

  • Webutil_file_transfer and host command doesn't work

    I use a host command in forms to execute a sql-script, which creates a file on AS. After the host command I use webutil_file_transfer to ftp the created file to the client. If I try to do this again in the same session, the host command fails. I have to restart the application to get it working again. If I leave out the webutil_file_transfer I have no problems whatsoever. It looks like webutil is changing something perhaps in the environment. Anyone has the same problem (and a suitable solution)?

    I can remove the files on AS (so there seems to be no lock). After removal of the files, no new files wil be created, even if I change the name of the file that needs to be created. Only restarting the application helps.
    Raoul

  • 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

  • When use host command to call discoverer

    hi all
    i am using the host command in forms 6i to call open
    the discoverer by command line . its fine and works well
    but the discoverer locks the screen and i cant work with both of them so i have to close the discoverer and i cant leave it open .
    can solve this problem ?

    Use API d2kwutil
    PROCEDURE proc_call_disc IS
    declare
    nm_command varchar2(10000);
    nm_user varchar2(20);
    pw_user varchar2(20);
    cn_user varchar2(20);
    BEGIN
    nm_user := get_application_property( username );
    pw_user := get_application_property( password );
    cn_user := get_application_property( connect_string );
    nm_command := 'dis4usr /connect ' || nm_user || '/' || pw_user || '@' || cn_user||' /opendb "owner.'||v_nome_bis||'" /sheet '||v_sheet||' '||string_parametros;
    win_api_shell.winexec(nm_command, WIN_API.SW_SHOWMAXIMIZED, false);
    END;

Maybe you are looking for

  • Oracle11i AP positive Pay customized program setting

    Hi   I need to know how to set up a new customized program for Positive Pay file for payment batch where the checkbox is in actions panel so once it is clicked by the user the program will be triggered Thanks

  • Oracle Warehouse Builder 10.1.0.4 on Windows 2008 - 64 bits

    Hi Gurus. I'm currently working with a customer who wants to migrate all their database-servers to Windows 2008 on 64-bits processors. They're using Oracle Database Enterprise Edition 10g Release 2 (10.2.0.4) and Oracle Warehouse Builder (10.1.0.4).

  • Cannot print locally

    I have a dell dimension 3000 and comcast cable internet.  I installed the linksys wrt54g basically to be able to surf on the couch downstairs away from the dell.  The cable modem obviously goes to the router and then ethernet port 1 goes to the Dell.

  • My BSP redirects to a Web Dynpro for ABAP. Why?

    Hello, I am working with a BSP that issues the following command within the OnInitialization event:  navigation->goto_page( '/sap/bc/webdynpro/sap/cprojects' ). This occurs within the default.hrm.  But I can't find this Web dynpro. I have looked thru

  • How do I get my imessage to use my number instead of my apple ID?

    Since I updated to iOS7 both my iMessages and Facetime doesn't work. They say, "Waiting for activation...". Most of the people that text have iPhones, and they all have iMessaging but me. I have another concern with my apps, they aren't telling me wh