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

Similar Messages

  • Host command on linux with forms 10g

    Dear Experts
    i have one major problem as i have made a form in forms 10g to upload .dmp files copied in application server my problem is that when i excute host command like bellow
    cmdln := './imp.sh'
    host(cmdln)
    to excute and run shell script saved on application server which runs an imp command to upload all files copied in specified location but nothing is happening when i click on button as these command are fired on when button click trigger plzzz help its urgent
    were i can make mistake

    Whoa...please don't use txt speak when posting here; it is very hard to read and right now it took me about 5 minutes to understand what you have written. Please write proper sentences; help us to help you ; )
    It is a good idea to have exact the same verison of exp / imp then your database version; Forms 10.1.2.0.2 would be compatible with a 10.1 database. If your database is e.g. 10.2 you'd need to install the 10.2 client software on your application server anyway. You wouldn't need to care about this when using datapump.
    And another thing regarding datapump: conventional export is deprecated in 11.2 so one day or another your customers will need to move to datapump; the sooner the better.
    As said: try to run your script on the shell without forms and see if this works. You would see error messages generated by your shell script too.
    cheers
    Edited by: christian erlinger on 19.05.2011 01:14
    that damn smileys don't work anymore

  • 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

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

  • 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

  • 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 does not come back

    Hi,
    I have treid to export schema by pressing a button, (form designed in Form10gR2 and excute via Application Server R2. )
    For this I have applied one by one these syntaxes
    1) host ( 'cmd /C start "" "'|| exp USERID=SYSTEM/MANAGER@ora11 OWNER=scott,hr FILE=E:\JAN10.DMP');
    2) host ( 'cmd /C exp USERID=SYSTEM/MANAGER@ora11 OWNER=scott,hr FILE=E:\JAN10.DMP');
    3) client_host('exp USERID=SYSTEM/MANAGER@ora11 OWNER=scott,hr FILE=E:\JAN10.DMP');
    4) WEBUTIL_HOST.NONBLOCKING('exp USERID=SYSTEM/MANAGER@ora11 OWNER=scott,hr FILE=E:\JAN10.DMP');
    When my client/ user executes the command, session goes hang and application screen does not come back. If I execute the exp command directly from the Application Server Command Prompt then exp works.
    Please help me, what is the syntax to get the dump wihtout hanging the session.
    Database 11g Linux
    Application Server 10R2 Window2003.
    Developer 10gR2.
    Client Windows , Explorer, FireFox etc.
    Regards.
    Priya.

    Hi Priya,
    It is always a better practice to call a batch file using the host command instead of hardcoding the command inside form. Which would help you to modify the batch file for any changes, without re-compiling the forms.
    In this case, create a batch script, which would set the ORACLE_HOME etc (to make sure the exp command is recognized, you need to add the DB ORACLE_HOME/bin to the PATH), and then call the command to export. You can also parameterize the batch script and pass the parameters from form, separated by space.
    -Arun

Maybe you are looking for

  • A/R Down Payment not posting to A/R Invoice

    We are having trouble with the a/r down payment process. We have open invoices even though we have already received payment. For example, a customer mailed in a check to order items. We added the items on a sales order. We clicked on the Money Bag (P

  • Drag and drop to iCloud drive online

    Can you or can you not drag and drop folders (with files in them) onto iCloud.com iCloud drive?  Apple's support pages say you can, but when I try, it says that "these types of files must be compressed".  So, I can drag and drop individual files but

  • ITunes synchronisation with iCloud in Switzerland

    Hello guys I can't synchronize my music from my iphone with my imac wirelessly, because this service isn't available yet in Switzerland. Now, my question is, when WILL it be available? thx for replies

  • What are ancillary files associated with trash?

    Most of the items I put in the trash now produce a window which mentions ancillary files. What is the point if this extra window?

  • Error code:201 - can't connect to DVR from ipad app, nor fiostvcentral website

    Any ideas how to fix a Error Code 201. When I try to connect to my DVR form the iPAd app, I get that message.  The TV seems to be workign fine, and the remote control function in the app works... but it's not gettgin any DVR info beyond the name of t