Calling SQL Loader using HOST command from Developer Forms 4.5

I want to execute a set of code from D2K Forms 4.5 which has interfface with Client - OS ( In my case Windows NT/XP). I want to execute SQL Loader from Forms using Host Command and then after completion of that process, I want to do next transcations ( depending upond success of HOST/SQL Loader).
How to achive this?
I tried writing code like this ...
l_vc_command := 'sqlldr73'
                    ||' USERID='||l_vc_username||'/'||l_vc_password||'@'||l_vc_connect_string
                    ||' CONTROL='||l_vc_filepath||'Upload.ctl'
                    ||' DATA='||LTRIM(RTRIM(l_vc_fileloc))
                    ||' LOG='||l_vc_filepath|| l_vc_log_file || '_' || l_dt_sysdate_str ||'.log'                    
                    ||' BAD='||l_vc_filepath|| l_vc_bad_file || '_' || l_dt_sysdate_str ||'.bad'
                    ||' DISCARD='||l_vc_filepath|| l_vc_discard_file || '_' || l_dt_sysdate_str ||'.dsc';
HOST(l_vc_command,NO_PROMPT);
After this command i want to do some other code execution. so even if it fails or success, next code is executed. How to control this?
Please help..
Regards,
Milind

Forms6i running on W2000, Rdbms 8.1.7
in Forms I added a button TEST,
Trigger when-button-pressed : host('test.bat') ;
in directory .......\frm I added file test.bat :
REM ===============
cd /d C:\........\ldr
pause
sqlldr parfile=test.par
pause
type test.log
pause
exit
REM ================
now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

Similar Messages

  • Host command from D2K Forms

    Am calling the sql loader (sqlldr73) using HOST command from D2K Forms 4.5.
    my code has following sequence,
    <sequence of stmts 1>
    Host(....);
    <sequence of stmts 2>
    the stmts(<sequence of stmts 2>) following the call to HOST commant should be executed only after successful execution of the sql loader.
    curently the sql loader and stmts(<sequence of stmts 2>) are running parallely
    Is there any work around?

    Hi,
    Better way to do it would be to write a batch / shell script with the sequence of statements you want to execute and call the batch file using the host command.
    Regards,
    Arun

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

  • Calling SQL Loader from Forms 4.5 using HOST command in Win2000

    One of my forms calls SQL Loader 7.3 using HOST command to load a csv file onto the database(Oracle 7.3) under Windows 2000 platform.
    Only after sql loader finishes its operation the control should come to my form i.e. synchronous execution.
    As of now its running asynchronously.
    Is there any way to make it synchronous. If Not any other work arounds?
    Environment Details
    Forms [32 Bit] Version 4.5.10.6.0 (Production)
    Windows 2000 Operating System
    Oracle7 Release 7.3.2.3.2

    Forms6i running on W2000, Rdbms 8.1.7
    in Forms I added a button TEST,
    Trigger when-button-pressed : host('test.bat') ;
    in directory .......\frm I added file test.bat :
    REM ===============
    cd /d C:\........\ldr
    pause
    sqlldr parfile=test.par
    pause
    type test.log
    pause
    exit
    REM ================
    now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
    Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
    Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

  • Issues in calling Sql Loader through forms developer (10g)

    Hi,
    I am developing a form(in 10g) ,in which I am calling sql loader for loading data onto a oracle database table from external source (e.g. data file is a .CSV file).
    But , somehow the sql loader is not getting executed.
    Here , I am giving the environment settings , approach i am taking;
    This is a distributed system , both the application server,and database server are mounted on two different servers.
    The form is delpoyed on the application server.
    The database table , and the sql loader are configured on the databse side.
    I am using host(<sql loader command>) command to invoke the Operating System command through forms.
    The sql loader is working ok , and the data is getting loaded successfully onto the required database table when I am executing the sql loader command on Unix prompt , but through the forms , it's not working.
    Do I need to change some environmental setting to make this work...
    Any quick help in this regard is highly appreciated.
    Thanks.

    Hi Craig,
    I have already tried out the option of calling sql loader through stored procedure,but this is not working ...
    could you please share any examples to do so ...
    code snippet i am using in forms:
    declare
    usid get_application_property(userid);
    pwd get_application_property(password);
    db get_application_property(host);
    msqlldr varchar2(250);
    begin
    msqlldr:='/u01/oracle/formss/bin/sqlldr' username=<uid/pwd@db> control=<control file name> data=<data file name> log=<log file name>
    hosts(msqlldr);
    end;
    Note that sqlldr command ,for that matter any unix shell command is not working through the hosts() command ...
    could you please suggest any way out ...
    Thanks.

  • Calling SQL*Loader from Forms

    Hi,
    I was wondering if anyone has called SQL*Loader from Forms?
    What I am wanting to do is use Oracle Forms as the interface where you can specify a file that you can import into the database and it will use a set control file. Push the import button and SQL*Loader does the rest.
    Is using Java code to call SQL*Loader from Forms a viable option, or is there an easier way to achieve the desired outcome.
    Any ideas or guidance will be much appreciated.
    Thanks,
    Scott.

    Scott,
    In forms, there's a HOST built-in command which is supposed to execute any o/s commands.
    What you have to do is :
    1. Bult up the string exacltly in the fashion which you will run in o/s
    2. Call the HOST Built-in and pass in the string
    Here's a example :
    Declare
    lOsCmd Varchar2(1000) := Null;
    Begin
    lOsCmd := 'sqlldr user-id=userid/passwd@connectStr '
    || ' control=c:\temp\abc.ctl log=c:\temp\abc.log '
    || ' bad = c:\temp\abc.log';
    Host (lOsCmd, No_Screen);
    End;
    -- Shailender Mehta --

  • Calling Sql*Loader from oracle Form builder

    How do i call sql* loader from my forms to import the external data in different formats into my existing database?
    Specify the flexibility of sql* loader to import external data from .txt files or .xls files.
    Would be thankful if certain examples are given along with the answer.

    Hi,
    1. First you have to create seperate ctl (Control files) which maps to different file formats
    2. Using Oracle Forms,
    2a) You can use the 'HOST' command to execute the command line ie. In this case executing
    SQL*Loader script
    2b) You also have the feature in ORACLE forms to read text files and load the data into
    ORACLE db.
    This can be achieved by using TEXT_IO package which comes with ORACLE Forms.
    Hope this helps
    Ta
    Shailender

  • How to Call SQL Loader from Java ( servlet )?

    We need to call SQL Loader command from Java Servlets? Any suggestions how this can be done?
    Thanks
    Rahul

    Probably not the best way, but you could try using JNI to call a C function which then invokes SQL Loader via system() or exec(). I haven't done this myself though...

  • Calling Sql-loader from PL/SQL

    What is the command(s) to call Sql-Loader from inside a PL/SQL procedure?
    Regards,
    Ahmad.

    I don't think it is possible ...

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

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

  • Calling sql loader in sqlplus

    Hi all, i am trying to load a file called text1.txt using sql loader. I am using sqlplus but i dont know how to call sql loader in sql plus.
    can someone provide syntax assumming data file is text1.txt and control file is txt.clt
    thanks

    Why on earth? Though you forgot to include version info, assuming you are not using 9i or older, you can and should use the external table facility and you don't need this unstable and resource consuming procedure.
    If you would have thought even one second about solving your own problem, you would have realized sqlloader is a separate O/S utility, which requires the host command, and username/password on the commandline.
    That alone is a reason not to do it.
    Sybrand Bakker
    Senior Oracle DBA

  • Sql*loader using JSP

    wht is the way of using sqlldr in JSP script to load data Oracle DB from a csv file.
    i know how we do sqlldr in cmd.
    can we provide the sqlldr command to system by using jsp if yes how?

    SQL*Loader is a command-line utility. In theory, since Java can call out to the operating system, you could invoke SQL*Loader on the application server to load data into Oracle. It would probably be more appropriate, though, to copy the CSV to the database server and make use of an external table in the database to do the load.
    Justin

  • Could I call SQL Loader in PHP?

    Hi.
    I a newer using oracle with PHP. I want to import data to database.
    I am using SQL Loader tool. It is good for import data.
    Now, I want to call command from PHP. Can I call it from PHP or Not?
    Thank for your help.
    Rac

    Hi,
    Yes. You can invoke SQL*Loader using php exec. function: http://pl.php.net/manual/en/function.exec.php
    Please read all security warnings related to this function.
    Regards, Paweł

  • Calling VB Executable using HOST to Slow....

    Hello Friends,
    I have one form containg one program unit, Program unit has one cursor,which contains Employee Id and Email Id, Based on Employee ID Report is generated in HTML Format.Next I am Calling VB Executable using HOST which Sends generated report through mail based on EmailId. I am passing Report File and EmailId using Command line arguments.
    But,It takes too much time to return back to Form from VB application ? It quickly exits VB applications but then it takes too much time to return back to Oracle Forms ?
    What can be the reason ?
    Adi

    There is a JNI forum, you may have better luck there.

Maybe you are looking for

  • How do I let other users on my MacBook Pro update apps that I've downloaded?

    I recently left a position as an IT at a school district where I was put in charge of all Mac products district wide. Most of the important apps, such as Apple Configurator or Remote Desktop, were downloaded using a district Apple ID, but many of the

  • Confirmation Idoc failed

    Hi The Idoc related to Goods confirmation has got failed with error "Account xxxxx requires Trading partner", we checked the trading partner settings of the relavent GL account, it was not maintained. But for those Idocs which were sucessful also the

  • Can't we use GUI_UPLOAD and scshedule in background

    Hi, I have a program which uploads a comma delimted text file and updates custom table. .It works fine in when I run online but when I schedule it background it fails. I used GUI_UPLOAD to upload the text file. FORM file_upload.   CALL FUNCTION 'GUI_

  • Ipad and Outlook Sync messages?

    My boss is using his Ipad more and more. In outlook he has many subfolders that he has generated over the years of importiant messages, contracts ect. Is there anyway to sync the folders and info in them that are in outlook to the Ipad? We are using

  • Mail su iphone 3gs

    ho configurato l'account mail di libero sull'iphone ma riesco solo ad inviare posta mentre non riesco a vedere quella in entrata perchè mi dice che l'account o la password sono errati ma li ho controllati bene 100 volte e sono inseriti correttamente