Host command in forms6i

I used the command Host(mycmd, No_Screen) to export my data in dmp file.
This command works fine but my code (plsql) continue while the command is running.
I want that the next command (pl/sql) wait till the host command terminate.
How to do that ?
In fomrs5 this works perfectly !
My config is : WIN98/Forms6i
Thanks

Hi Sonia!
Another, but maybe a dirty, solution is
to create an ms dos bat file, let's say 1.bat, with the
following lines:
del c:\test.txt
exp pp/pp ...
echo 1 > c:\test.txt
Then use host command to call it and loop
after it. This loop will be checking if
1.bat finished and if it created file
c:\test.txt:
declare
in_file Text_IO.File_Type;
begin
host( '1.bat', no_screen );
loop
in_file := Text_IO.Fopen('c:\test.txt', 'r');
if form_success then
exit;
end if;
end loop;
end;
Hope, this will help.
Andrew Velichko
Brainbench MVP for Oracle Developer 2000 http://www.brainbench.com
null

Similar Messages

  • Error Excuting Host command in Forms6i

    Hi,
    Can anybody help me? I have a statement that runs a sqlscrip at DOS. But I it doesn't work, I can't see the error,
    This is the statement
    host('\\ccsclapp\developer$\PLUS33W.EXE prod/prod@prod
    @\\ccsclapp\developer$\fs_reposicion.sql &:control.trf_desde
    &:control.trf_hasta',NO_SCREEN);
    and this is de script:
    set feedback off
    set termout off
    set echo off
    set verify off
    set heading off
    set linesize 200
    set pagesize 0
    SPOOL c:\reposicion.csv
    SELECT ' SKU'||'|'||
    'SLOT'||'|'||
    'Distr.'||'|'||
    'Unid.'||'|'||
    'BulDesp'||'|'||
    'Existencia'||'|'
    FROM DUAL
    UNION
    SELECT RTRIM(P.PRD_LVL_NUMBER)||'|'||
    RTRIM(A.DET_SLOT)||'|'||
    NVL(W.TRF_DIST_PAK,1)||'|'||
    RTRIM(SUM(B.DET_QTY_UPC))||'|'||
    RTRIM(ROUND((SUM(B.DET_QTY_UPC)/C.VPC_CASE_QTY),1))||'|'||
    RTRIM(I.ON_HAND_QTY)||'|'
    FROM DETMSTEE A, DETTRFEE B, VPCPRDEE C, PRDMSTEE P, INVBALEE I,
    WHSPRDEE W
    WHERE A.PRD_LVL_CHILD = B.PRD_LVL_CHILD
    AND A.PRD_LVL_CHILD = C.PRD_LVL_CHILD
    AND I.PRD_LVL_CHILD = P.PRD_LVL_CHILD
    AND P.PRD_LVL_CHILD = A.PRD_LVL_CHILD
    AND A.PRD_LVL_CHILD = W.PRD_LVL_CHILD(+)
    AND C.VPC_ACTIVE_FLAG = 'T'
    AND C.VPC_PRIMARY_FLAG = 'T'
    AND NVL(C.VPC_CP_DSD,'F') = 'F'
    AND I.ORG_LVL_CHILD = 105
    AND I.INV_TYPE_CODE = '01'
    AND TO_CHAR(B.DET_TRF_NUMBER) > &V_1
    AND TO_CHAR(B.DET_TRF_NUMBER) < &V_2
    GROUP BY A.DET_SLOT, P.PRD_LVL_NUMBER, I.ON_HAND_QTY, C.VPC_CASE_QTY,
    NVL(W.TRF_DIST_PAK,1)
    ORDER BY 1;
    SPOOL OFF;
    EXIT;
    Enter value for v_1:
    User requested Interrupt or EOF detected.

    Get rid of the NO_SCREEN to test it. This will show yu the dos screen and you might find out why it is failing.

  • Use Host command in Oracle forms 6i

    hi
    all
    i use Oracle forms 6i i run in a web and in that i have connect one server so,
    i have to use Host Command and i have to fire this command
    host (' net use \\windchillsvr\e\jyotionline /user:dwg_users dwg_users');
    But it's Not Connect
    My Forms in run in Web
    so help

    JavaBean does d othe job for you but it requires signing process; I used it when I was working on forms6i for our project.
    I could use another approach that is the file type command executable which it stays in client's PC to do it and it does not requires signing at all since I am now working on the Java EE project for downloading and launching the third party tool in client's PC.
    I plan to write a article for forms use, which could do all the heavy WebUtil can do, but not need to go thru the signing process.

  • 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

  • How to simulate HOST command from DB Procedure

    Hi,
    I'm using Oracle 9.2 database on Win2000 PC.
    I need to start .bat file from a database procedure. More generaly how to simulate HOST command that I'm using from Forms6i.
    Thanks,

    Thanks for the reply,
    But, I am able to successffuly execute HOST from SQL+
    only from the PC where the database is, not from the client. My .bat file is on the server side.
    From the procedure I was not able to run it in either cases
    Procedure TEST
    IS
    BEGIN
    EXECUTE IMMEDIATE 'host C:\MYBATCHFILE.BAT'
    END;
    returns ORA-00900 INVALID SQL STATMENT
    with EXECUTE IMMEDIATE '$ C:\MYBATCHFILE.BAT' returns Invalid Character Error.
    BR,

  • HOST command in Forms9.0.4 versions with 10g

    Hi,
    We are currently running forms6i(character based) on a unix m/c . While trying to upgrade to forms9i (web based) , we find that the HOST command used to call shell script is not wrking and also it doen't shows any errors during compilation or runtime ..Pls suggest how to use HOST command in 9i web based to call a shell script.
    Would appreciate an early response..
    Thanks and regrds ,
    Pooja

    Hi Arun ,
    Thanks for ur response . But when i use client_host , i m getting compile time error as Client_host must be declared . I m using the command as client_host('/ics/users/ics/test.sh') , where test.sh is the script i want to execute . In our developer suite , there is a forms folder which in turn contains webutil folder ..Am i suppose to put shell script there so that it can be called from there ?
    Pls suggest me as how to go abt it..
    Thanks n Regards ,
    Pooja

  • 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

  • How to run a HOST command from Report 2.5

    Hello everybody,
    I want to pass an unix command from a Report. I am running the report (Report 2.5) on an Unix server and I want to pass a unix host command inside the Before Report Trigger of the report. But Report2.5 is not recognising the HOST built-in. Is there is any way around?
    Thank in advance.
    Samujjwal Basu

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • 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

  • HOST command not working in forms 10g

    Hi,
    I have migrated forms 6i to forms 10g, and having a requirement to open sqlplus prompt using a form menu. I have used the below command: -
    "host('sqlplus '||user_name||'/'||pass||'@'||sid, no_screen);"
    But I am not able to get the sqlplus window, and the main form is still in process for long time, till i bounce the server.
    The forms are deployed on Oracle Applications Server 10g and i want to run it on server side.
    Please help me with the problem.
    Thanks,
    Ankit

    The deployment architecture is different between forms 10g and forms 6i.
    In Forms 6i HOST built-in command will run on the client machine since you are running as client/server, but in WebForms (Forms10g) the HOST built-in command will run on the middle tier which is your application server machine.
    In order to run hosts commands in WebForms you need to use webutil and use CLIENT_HOST in the webutil.
    check the [Forms 10g R2 Demo|http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip] for sample codes of webutil.
    You are using NO_SCREEN in your example, this will hide the window.
    Tony
    Edited by: Tony Garabedian on Nov 26, 2009 2:43 PM

  • How can I use variable name as a prameter value in HOST Command ???

    Hi All,
    How can it possible to use variable value in parameter in HOST command ??
    Following in my code:
    host('rwclient server=reptest report=c:\cust_print.rdf p_1= s_sam_cust_id userid=wh1/wh1@dwh desformat=pdf desty=file desname=c:/temp/'||v_sam_cust_id||'.pdf');
    Regards

    Hello,
    The Syntax of the builtin HOST is :
    SyntaxPROCEDURE HOST
    (system_command_string VARCHAR2);
    PROCEDURE HOST
    (system_command_string VARCHAR2,
    screen_action NUMBER);
    So , you can build the system_command_string as any VARCHAR2
    Example are provided in online help :
    http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builth_m/host.html?tp=true
    Regards

  • How to execute host command in trigger

    dear professional:
    i'm trying to create a trigger that when a certain value inserts into a table , it fires some UNIX command to do the job following
    here is what i tried ,create a trigger that gives host command , but when i tried insert , it fails to work
    i also tried dbms_pipe ,but seems same when using dynamic sql to do the job
    any idea of how to accomplish this task ?
    many thanks ~
    br/ricky
    SQL> CREATE OR REPLACE TRIGGER price_exec
    2 BEFORE INSERT ON omc.price_test
    FOR EACH ROW
    BEGIN
    IF :NEW.price = 4 THEN
    execute immediate 'host ll';
    END IF;
    END price_exec;
    / 3 4 5 6 7 8 9
    Trigger created.
    SQL> insert into price values ('test',4);
    insert into price values ('test',4)
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> insert into price_test values ('test',4);
    insert into price_test values ('test',4)
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at "OMC.PRICE_EXEC", line 3
    ORA-04088: error during execution of trigger 'OMC.PRICE_EXEC'

    hi,
    my db is 9.2
    i'm aware of schedule you mentioned , but if it's up to the task , you don't know when a row with certain value is inserted
    simple way :
    when a row inserted into a table with value "catch me" you want to know who inserted this test value
    so you tried to create a trigger to catch program, machine, module ,and terminal info from v$session
    so you can figure out where it is coming from
    and i want to go a step further , by executing some os command to digging out more
    and i come up with this , when value 4 is inserted i exec a procedure host to execute command,
    the problem is it's not working as i exepcted , so spare me the lecture of reading docs and just tell me what to do
    i'd really appreciate it , thanks
    CREATE OR REPLACE TRIGGER price_exec
    BEFORE INSERT ON omc.price_test
    FOR EACH ROW
    BEGIN
    IF :NEW.price = 4 THEN
    execute immediate 'host('echo')';
    END IF;
    END;
    Warning: Trigger created with compilation errors.
    SQL> show errors
    Errors for TRIGGER PRICE_EXEC:
    LINE/COL ERROR
    3/30 PLS-00103: Encountered the symbol "ECHO" when expecting one of
    the following:
    . ( * @ % & = - + ; < / > at in is mod not rem return
    returning <an exponent (**)> <> or != or ~= >= <= <> and or
    like between into using || bulk
    The symbol ". was inserted before "ECHO" to continue.

  • HOST command does not seem to work in deployment system

    I am developing forms software for a SUSE Linux system, but the HOST command does not seem to operate correctly when used in conjunction with Application Server.
    All I am trying to do is launch Adobe Acrobat reader as a background job using the command :-
    HOST('/opt/Adobe/Reader8/bin/acroread &');
    but nothing seems to happen.
    If I enter the command :-
    */opt/Adobe/Reader8/bin/acroread &*
    directly from a shell window (using the same login account) the command works correctly.
    I have tried other commands e.g. directory listings etc and all seem to have the same problem.
    Furthermore when the same form is run from the development environment using "Internet Developer Suite" it operates correctly with no problems.
    I am running on a deployment system where all three tiers of oracle are on the same machine (i.e. Database, AS and web front end).
    Can anybody suggest any possible causes or anything I can try to help resolve this problem ?

    brian_a_j wrote:
    Although I still dont understand why HOST would not work given my configuration (the Application Server and Web Browser operate on the same machine).One little test, put the execution command in a shell script and try to execute the script with the HOST command instead of the command itself.
    Using HOST the script will be executed on the AS machine no matter from where it is executed.
    Tony

  • 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

Maybe you are looking for

  • 9.1.2 Update Fails in Acrobat Pro 9

    I am running a standalone version of Acrobat Pro 9 on an iMac running Mac OS X 10.5.8. I am trying to update Acrobat Pro 9 from 9.1.1 to 9.1.2 without success. I have had problems with EVERY SINGLE update from 9.0.0 whether from help>check for update

  • Solution Directory

    Hi all Could you please assist. I want to make sure that my Landscape is setup correctly for the "graphical" display to work in the Solution directory. i have used SMSY to create everything. I have a DEV, QAS and PRD on ECC6. When I run SOLUTION_MANA

  • Appset not appearing after import

    Hi Friends, We are on bpc75nw sp04. Custom appset(A) is correctly imported into target system. I'm able to see in backend(BW), but in fron-end(BPC admin/BPC excel) not appearing. Could any one suggest, what might be reason? How to know install user i

  • Live discussion on "EJB Performance Verification"

    Empirix, the maker of the Bean-test EJB testing tool, is offering a free one hour web event presentation called "Enterprise JavaBeans Performance Verification". This event will be held this Friday November 16th at 2pm EST. To register for this web ev

  • Can I change the Stocks displayed in teh Stocks App?

    The Stocks App comes with six default displays.  I want to change the three single stocks to the DAX, Nikki and FST100.  Can this be done?