Host command

Hi Guyz,

Development of a menu for our IT Department.

I have two points on a list item a canvas where the user choose the command and then executes the command.

I use the below example code when the user pressed the button it opens the command prompt and run the command and I have to show the result in one: block.txt_item instead of a command prompt.

WHEN KEY PRESSED ON THE TRIGGER.

IF :BLOCK2.E_CMD='Command Prompt' THEN
  HOST('CMD');
ELSIF
  :BLOCK2.E_CMD='Tracert' THEN
  HOST('CMD /C Tracert' ||' '||:BLOCK2.R_CMD);
ELSIF
  :BLOCK2.E_CMD='Ping' THEN
  HOST('CMD /C Ping' ||' '||:BLOCK2.R_CMD);
END IF;

There are many commands I want to save the result of the command prompt in the text_item form. IM using forms 6i. Oracle 9i DB.

any help is appreciate.

Concerning

You replace the results in each loop iteration. Concat the results:

:block2.result:=:block2.result|| vcbuffer;

Add a lrtf between

:block2.res:block2.result:=:block2.result || CHR(10) || vcbuffer;

BTW. You should not create the file in the root directory, because it is often writing preserved by the operating system.

Tags: Oracle Development

Similar Questions

  • RADIUS-server host command problem

    Hi all

    I have cisco 4506 e - 8 L - e sup with the latest IOS image, but host X.X.X.X command radius server is not available, I've heard that this order has been changed now, can someone tell me the new syntax of this command because I'm setting this switch to cisco ISE...

    Kind regards

    The syntax is:

    radius server A-NAME-FOR-THE-SERVER address ipv4 10.10.10.10 auth-port 1812 acct-port 1813 key YOUR-KEY
  • Host command change NLS_LANG

    I'm using Oracle 11 g 11.2.0.2.0.

    I want to insert e chacater but have inserted as. My NLS_CHARACTERSET is WE8MSWIN1252.

    Sqlplus in Sun OS, when I run
    + ! echo $NLS_LANG +.
    It returns null.

    Definition of client variable Street by issuing the command below solves the problem
    Export NLS_LANG = AMERICAN_AMERICA. WE8MSWIN1252

    However, I have to issue permission to change the NLS_LANG variable in superior environments. I tried licensing
    Host or! command of in sqlplus as HOST export NLS_LANG = AMERICAN_AMERICA. WE8MSWIN1252 of in SQLPLUS but he isn't setting NLS_LANG variabe. I don't get any errors either.

    Please let me how can know I set NLS_LANG in sqlplus or any other method to insert correctly the character e?

    Thank you.

    spur230 wrote:
    I have no doubt how to determine NLS_LANG.

    In the documentation I read "+ the character set specified by the parameter NLS_LANG must reflect the setting for the client operating system.

    It's true, if the source is from client os (IE direct entry keypad). For example, Windows has tank separated two together-one in mode console (command line) and the other in mode 'gui' or 'ansi '.

    The tank was part of NLS_LANG (the part after or starting with a point), should really be set to match the source, which could be local environment of os i.e. the client os, virtual terminal setting, file encoding (for example loading files).

    It may also not be not of importance, depending on the application and configuration allowing to insert data of type character. For example with Oracle SQL Developer, due to slot the api cover used or 3rd party app.

    >

    For the unix shell environment find setting for the client operating system of value LANG?

    Thus, in the light of what I tried to say and convey above, exactly how linking you and insert the data?

    If LANG is say en_US. ISO8859-1, the NLS_LANG is AMERICAN_AMERICA. WE8ISO8859P1?

    Yes, if the regional settings operating system/shell determines the source of which is its encoding character data.

    Again, use Oracle SQL Developer, if possible. (It may already be installed on the server of db House.)

    Published by: orafad on January 11, 2012 01:18

    Published by: orafad on January 11, 2012 01:19

    Published by: orafad on January 11, 2012 01:22

  • Opening a file using the Webutil_Host.Host command

    Dear gurus
    I am opening a file using command behind a button on my next form:

    Webutil_Host.host('x:\03\03\39920000023.gif');

    I was waiting for this command to open the file given in default, gif image viewer, but it does nothing when I press the button. So should I try something else?

    Try this

    Order Webutil_host

  • Unable to create the external procedure Oracle to run host commands

    Trying to follow this article
    http://timarcher.com/node/9
    His associates to
    Oracle external procedure to run commands from the host
    measures
    (1) mkdir-p/u01/app/usfapp/oracle_external_procs/oracle_host
    2)
    Author suggests to create a file
    but the header file is missing from the first line... may be not not sure... it's < stdio.h >
    create a file named oracle_host.c. The contents of this file will be:

    #include

    int RunCmd(char *cmd)
    {
    (System (cmd)) return;
    }


    (4) create the file called makefile. The contents of this file will be:

    ORACLE_HOST: oracle_host.o
    GCC-shared o oracle_host.so oracle_host.o

    $ cat makefile
    ORACLE_HOST: oracle_host.o
    GCC-shared o oracle_host.so oracle_host.o

    5)
    Now, run the make command
    The output on my server looks like:

    [u01/app/usfapp/oracle_external_procs/oracle_host]
    Banner@usfbannerte [TRNG] > make
    GCC-shared o oracle_host.so oracle_host.o

    here, I stuck... [Not able to run this step
    ] $ make
    GCC-shared o oracle_host.so oracle_host.o
    / usr/bin/LD: oracle_host.o: relocation R_X86_64_32 against 'a local symbol' can not be used when an object shared; Recompile with - fPIC
    ORACLE_HOST.o: could not read symbols: bad value
    collect2: ld returned 1 exit status
    make: * [oracle_host] error 1


    One has an idea of what went wrong

    Other links related to this is more welcomed.

    Please suggest...

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:934029542973

  • check the existnace file before using the HOST command

    Dear all:

    We use the version of forms 6i 6.0.8.22.1

    I wrote after encoding to move a local system file to another location: following coding works to move the file.


    DECLARE

    in_file_name VARCHAR2 (100);
    in_file_path VARCHAR2 (100);
    out_file_path VARCHAR2 (100);
    the_command VARCHAR2 (2000);
    BEGIN
    in_file_name: = pk_parameter.setting('IMGSFILE');
    in_file_path: = pk_parameter.setting('IMGSPATH');
    out_file_path: = pk_parameter.setting('IMGTPATH');

    the_command: = 'move' | in_file_path | in_file_name |
    ' '|| out_file_path | out_file_name;

    Synchronize;
    Host (the_command, NO_SCREEN);
    IF this is Form_Success THEN
    Message ('error - file is not moved');
    ON THE OTHER
    Message ("file moved successfully");
    END IF;
    END;


    above code returns TRUE in stand conditions if the file is exist in the given folder or not? I checked it twice.

    1: place the file in the folder source and then run the coding, it returned message like "file moved successfully.

    2nd: the source folder is empty, when I have executed the coding, it returned message like "file moved successfully.

    Now I want to check before running the command move, if the source files exist in the source folder, if yes, then move on the other on-screen message and raise form_trigger_failure;

    any idea of guru?

    Kind regards

    Hassan Raza

    You must use the command line to do:

    host('cmd /c move '||in_file_path||in_file_name||' '||out_file_path||out_file_name, no_screen);
    

    to check if the file has been properly moved, you can use text_io:

    declare
      xfile text_io.file_type;
    begin
      xFile := text_io.fopen(out_file_path||out_file_name, 'R');
      text_io.fclose(xFile);
      --file exists
    exception
      when others then
        if text_io.is_open(xFile) then
          text_io.fclose(xFile);
        end if;
        -- file does not exist, so moving was not successful
    end;
    

    concerning

  • HOST command in the form of developers

    Hello

    I use the formula of 6 developers. When I use HOST function to rename the file in form then system does not execute the rename command and file does'nt renamed. Can someone help me to identify the cause of this.
    Thank you

    What is the exact syntax that you use?

  • Any host command to force a virtual computer to suspend?

    Given the title of the virtual machine window, it should be possible to close the window with a command or a script and therefore suspend the virtual machine.  Is there a windows command or software for that?

    If you download the VIX API 1.8.1 (http://www.vmware.com/support/developer/vix-api/), it will include vmrun with support for VMware Player 3.0.

  • PlSQL Host command

    Hi all

    It should read a subdirectory in the database and each time a new subdirectory is created in a particular directory, we need an alarm triggered in the database. Alert can be one, even an insert into a table with all the relevant details on the new directory created is sufficient.

    If there is a way to achieve the above requirement without using the methods below please suggest those before correction has first of all the code below

    We tried with the utility given in this link.

    [Oracle base |]  http://www.Oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php]

    and using the command of particular operating system below * / bin/ls - alrtd * / tmp *.

    This command when running the operating system lists the directories created under/tmp is understood/tmp. While on the run from the below program does not behave this way. I don't know why and where I am wrong.
    DECLARE
         L_OUTPUT DBMS_OUTPUT.CHARARR;
         L_LINES  INTEGER := 1000;
       BEGIN
         DBMS_OUTPUT.ENABLE(1000000);
         DBMS_JAVA.SET_OUTPUT(1000000);
         HOST_COMMAND(' /bin/ls -alrtd */ /tmp ');
         DBMS_OUTPUT.GET_LINES(L_OUTPUT, L_LINES);
         FOR I IN 1 .. L_LINES LOOP
            DBMS_OUTPUT.put_line(L_OUTPUT(I));
           -- DO SOMETHING WITH THE LINE.
           -- DATA IN THE COLLECTION - L_OUTPUT(I)
           NULL;
         END LOOP;
       END;
    Can the PRO clarify and help me out of this.

    Thanks in advance.

    Hello
    Perhaps this 11 GR 2 can help - I don't know if he manages inventories well or just "files".

    http://www.Oracle-base.com/articles/11g/SchedulerEnhancements_11gR2.php#file_watcher

    See you soon,.
    Harry

    http://dbaharrison.blogspot.com/

  • Command Host shows does not exit

    Hello
    I am not able to view the output of the host of sqlplus command (I use a windows XP OS).

    The commands I tried:

    SQL > $whoami


    SQL > host whoami

    SQL >! whoami

    -Thank you
    Moulay abdelhafid Verreault

    Solomon Yakobson says:
    And keep in mind, SQL * more host command will open a command window, run the command, and close the command window

    To avoid this, you can use:

    host cmd /k %username% echo

    or

    host cmd /k %USERDOMAIN%\%USERNAME% echo

    Then SQL * more will open the command window, run the echo command and will not command windows close (because/k has been used). You have to manually issue the exit command in the command window to close.

    SY.

  • which host webutil command to use for cooking the OAS 10g control system

    Dear Sir
    I've updated on 6i to 10g form in which the click on the button that I need to run a Proc program that I used to do with the host() command when this form was in 6i

    but on 10g application server on the linux host does not work so I configured webutil but when I run webutil host controls
    as

    client_host()
    webutil_host. Host()

    I think all orders host webutil works on browsers (client) machine, but my ProC files (which must be run) exists on the application server,

    Please provide me with the suggestion that what I can do in this matter

    Published by: 839880 on June 24, 2011 11:09

    Just use HOST, because that runs on the SERVER.

    Please note that note this normal host() command does not work on my server to oracle 10g R2 Linux applications

    Yes it works. If you upgrade 6i, the application was probably on Windows first. You can not run a Windows Linux command, so you start by re - write your HOST command to run on Linux (and recompile your program of proC on Linux if you have not already done so).

    Published by: InoL on June 24, 2011 09:01

  • 10g host imp.exe command does not

    Hello

    Just create a simple form that uses the host command.

    I create a sql script with text_io to create a new user.
    I then use the host to run this script on the application server.
    It all works very well.

    Then I use the host command to try and import in the db. This is when he does nothing.

    I've cut to the bone to bear and a button with the command:
    host('D:\oracle\database\BIN\imp.exe LOG=D:\test.log');
    It's not even create the journal 'test.log '.

    If I copy and paste this into the dialog box run on the application server, the log is created?

    Any ideas?

    Thank you

    now created file newspaper but empty!

    OK, so it's working. It's just that the PMI cannot continue. Probably because of the same question as the log file: specify a directory for QUEUE = test.dmp.

  • ASA 5505 host under license limit has been exceeded

    I'm receive syslog message 450001 - host license limit has been exceeded.

    To see the version on my ASA 5505 (8.0.2), inside hosts are limited to 10. The limit of 10 corresponds to the limit (10) syslog error message.

    How is this calculated number of hosts? Show arp represents 6 addresses glued to the inside interface.

    Hello

    Don't use "show arp", use "local host" instead.

    Excerpt from http://www.cisco.com/en/US/docs/security/asa/asa72/configuration/guide/specs.pdf

    In routed mode, hosts inside (business and home VLAN) account in the limit only when communicating with the outside (Internet, VLAN).

    Internet hosts are not counted toward the limit. Also, guests who initiates the traffic between businesses and home are not counted toward the limit. The interface

    partner with the value default route is considered to be the Internet interface. If there is no default route, hosts on all interfaces are taken into account in the limit.

    In transparent mode, the interface with the smallest number of hosts is counted within the limits of the host. See the show local-host command to view the host

    limits.

    Kind regards

    Dandy

  • Need to convert vmdk using pRDM vmkfstools command

    Need to convert to pRDM vmdk format command. tried to convert using cold migration that it stuck at 23 percent. Are there vmkfstools or powercli to convert?

    You can try the host command line is:

    vmkfstools -i /vmfs/volumes/source-ds/source-vm/source.vmdk/vmfs/volumes/target-ds/target-vm/target. VMDK

    You can optionally add thin d in case you want to that thin target to be configured.

    What you need to do - before running the command - is to ensure that the size of the disk in the hard file corresponds to the actual size of the LUN in case the LUN has been resized / increased at some point.

    André

  • ESXi 5.5: Enhanced Capture packets at the host level

    Can someone explain how to use this new feature?

    Capture packets of improved host-level

    Network troubleshooting requires various sets of tools. In the environment vSphere VDS

    offers standard of monitoring and troubleshooting tools, including NetFlow, Analyzer SPAN (Switched Port).

    Remote Switched Port Analyzer (RSPAN) and encapsulated remote Switched Port Analyzer (ERSPAN). In the present

    release, an improved host-level packet capture tool is introduced. Packet capture tool is equivalent to the

    tcpdump command line tool available on the Linux platform.

    Here are some of the key features of the packet capture tool:

    • Available as part of the vSphere platform and can be accessed through the vSphere host command prompt

    • Can capture traffic on VSS and VDS

    • Captures packets at the following levels

    -Uplink

    -Virtual switch port

    -- vNIC

    • Can capture packets ignored

    • Can follow the path of a packet with details of time stamp

    Cannot find documentation for this tool and tcpdump-uw is exactly the same as in 5.1.

    The new command is run on the host computer and is called pktcap-uw, I just finished writing a blog post about it here

Maybe you are looking for