Executing host through a concurrent program to load data

hello all,
Dear Friends, i want to use host command in a concurrent request to load data in a table from a flat file .
for that i wrote one flat file(test_data_host.txt) , one control file(test_data_host.ctl) , one script file(test_data_host_prog.prog)
Finally i made one concurrent program BPIL_TEST_DATA_HOST and saved it as ' HOST '.
i added to my test_data_host_prog.prog file four compulsory parameters ,but during registration in sysadmin -> concurrent-> program -> define ,In parameters window, i had left all blank.(previously, same was running when i made one link from '$FND_TOP/bin/fndcpesr' file using command: ln -s $FND_TOP/bin/fndcpesr test_data_host_prog through telnet.)
During running of the concurrent program it is giving error: The executable file /dev02/CPS/apps/apps_st/appl/ja/12.0.0/bin/test_data_host_prog for this concurrent program can not be executed.
my files data is attached here with:
1) test_data_host.txt file:
Tamojit,1,history
Vishnu,2,maths
Krishna,3,HRMS
2) test_data_host.ctl file:
LOAD DATA
APPEND
INTO TABLE BPIL_TEST_CONTROL_FILE
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY'"'
TRAILING NULLCOLS
( name1,
class1,
subject,
record_status CONSTANT 'NEW')
3) test_data_host_prog.prog file:
# Parameters passed into program
ORA_USER_PASS=$1
USERID=$2
USERNAME=$3
REQUESTID=$4
#LOGON_STRING='apps/appscps@cps'
#FILENAME=$5
sqlload userid=apps/appscps@cps control=/usr/tmp/test_data_host.ctl data=/usr/tmp/test_data_host.txt log=/usr/tmp/test_data_host_log.log bad=/usr/tmp/test_data_host_bad.bad ERRORS=100000 silent=FEEDBACK <<!
RC=$?
echo "The sql loader exit code for loading Header table is :"$RC
if [$RC -eq 0 -o $RC -eq 3 |http://forums.oracle.com/forums/]
then
echo 'Loading of file table successful.'
else
echo 'Error: Loading of file table has errors. Sqlload return code is '$RC
exit 1
fi
case "$RC" in
0) echo "SQL*Loader execution successful" ;;
1) echo "SQL*Loader execution exited with failure, see logfile" ;;
2) echo "SQL*Loader execution exited with warning, see logfile" ;;
3) echo "SQL*Loader execution encountered a fatal error" ;;
*) echo "unknown return code $RC" ;;
esac
kindly help me with the same to run the concurrent request successfully to load the data .
Thanks & Regards
Vishnu Pratap Patel
([email protected])
Edited by: user649889 on Sep 2, 2008 2:01 PM

Hi Gareth,
I tried the code which you had given to me,but its not working .
Since i am not very competent enough in shell script , so i want to know that is there any other way or do spaces in that code (during writing that code in my bpil_test_data_prog .prog file) can also make the code inefficient to successfully run my concurrent request.
My .prog file is attached for your notice.
# Parameters passed into program
#ORA_USER_PASS=$1
#USERID=$2
#USERNAME=$3
#REQUESTID=$4
REQUEST_ID=`echo $*| cut -f2 -d" "|cut -c11-`
USER_ID=`echo $*| cut -f3 -d" "|cut -c11- | sed 's/\"//g'`
ORA_ID=`echo $*| cut -f4 -d" "|cut -c12-`
APPS_USERNAME=`echo $*| cut -f5 -d" "|sed 's/\"//g'|cut -c14`
#LOGON_STRING='apps/appscps@cps'
#FILENAME=$5
sqlload userid=apps/appscps@cps control=/usr/tmp/test_data_host.ctl data=/usr/tmp/test_data_host.txt log=/usr/tmp/test_data_host_log.log bad=/usr/tmp/test_data_host_bad.bad ERRORS=100000 silent=FEEDBACK <<!
RC=$?
echo "The sql loader exit code for loading Header table is :"$RC
if [ $RC -eq 0 -o $RC -eq 3 ]
then
     echo 'Loading of file table successful.'
else
     echo 'Error: Loading of file table has errors. Sqlload return code is '$RC
     exit 1
fi
case "$RC" in
0) echo "SQL*Loader execution successful" ;;
1) echo "SQL*Loader execution exited with failure, see logfile" ;;
2) echo "SQL*Loader execution exited with warning, see logfile" ;;
3) echo "SQL*Loader execution encountered a fatal error" ;;
*) echo "unknown return code $RC" ;;
esac
kindly have a look over it & help me for the same.
Thanks & Regards
Vishnu

Similar Messages

  • AP PRE_PAYMENTS custom concurrent program to load pre-payment invoices

    is there any concurrent program to load pre-payment invoices.if not how to create

    THanks for the suggestion MIke. I tried changing both the element name and the value to upper case, tthen I tried removing the..
      <property name="xml_tag_case" value="upper" />  ..line altogether, yet it still isn't returning any records..
    THanks
    Steven

  • Call a host script from concurrent program without exposing APPS password?

    My understanding is as of now I need to link $FND_TOP/bin/fndcpesr in order to launch a unix script as concurrent program. This implies that there will be 4 standard input parameters when a certain unix script is called including oracle schema and password. As I see it now APPS password is provided to such scripts.
    Is there a way to execute a unix script from under 11i without exposing APPS password?

    Many thanks.
    Protecting Your Oracle User Password
    In some cases, there are security concerns with passing your Oracle username and
    password directly to your HOST program. If you do not want the concurrent manager
    to pass your username/password to your program, you can have the manager pass it as
    an environment variable instead. Or you can pass an Oracle Applications
    username/password for a user with the System Administrator responsibility.
    Alternatively, you can not pass it at all.
    First, define your concurrent program executable as a HOST program in the Concurrent
    Program Executable form.
    To have the username/password passed as an environment variable, enter the term
    'ENCRYPT' in the Execution Options field of the Concurrent Programs window when
    defining a concurrent program using this executable. 'ENCRYPT' signals the concurrent
    manager to pass the username/password in the environment variable fcp_login. The
    argument $1 is left blank.
    If you do not want the username/password passed to the program at all, enter
    +'SECURE' in the Execution Options field. The concurrent manager will not pass the+
    username/password to the program.

  • Facing error wen running Java Concurrent Program to insert data into  table

    Hi All,
    Its first time I am wrkng on Java Concurrent Programs. I created a java class with the below code:
    import oracle.apps.fnd.cp.request.*;
    import oracle.apps.iby.scheduler.*;
    import java.sql.*;
    import java.sql.Statement;
    import java.sql.Connection;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.cp.request.CpContext;
    import oracle.apps.fnd.cp.request.JavaConcurrentProgram;
    import oracle.apps.iby.database.DBWrapper;
    import oracle.apps.iby.ecapp.OraPmt;
    import oracle.apps.iby.exception.Log;
    import oracle.apps.iby.security.SecurityUtil;
    //package oracle.apps.ibe.util.key;
    //package oracle.apps.iby.scheduler;
    // Referenced classes of package oracle.apps.iby.scheduler:
    // SchedUtils
    public class XXIBE_KeyInsert
    implements JavaConcurrentProgram
    public XXIBE_KeyInsert()
    public void runProgram(CpContext cpcontext)
    try{
    String s;
    oracle.apps.fnd.cp.request.ReqCompletion reqcompletion;
    Connection connection;
    // s = "iby.scheduler.XXIBE_keyInsert.runProgram";
    reqcompletion = cpcontext.getReqCompletion();
    connection = null;
    OraPmt.init(cpcontext);
    Log.debug("Inserting Credit Card key", 1, "XXIBE_KeyInsert.java");
    byte abyte0[] = SecurityUtil.getSystemKey();
    connection = cpcontext.getJDBCConnection();
    Statement st = connection.createStatement();
    String sql = "Insert into xxibe_scodes values ("+abyte0+")";
    st.executeUpdate(sql);
    connection.commit();
    st.close();
    connection.close();
    Log.debug("done", 1, "XXIBE_KeyInsert.java");
    reqcompletion.setCompletion(reqcompletion.NORMAL, "Request Completed Normal");
    OraPmt.end();
    SchedUtils.setSuccess(reqcompletion);
    DBWrapper.closeDBConnection(connection);
    catch(Exception e){
    e.printStackTrace();
    //reqcompletion.setCompletion(ReqCompletion.ERROR, e.toString());
    I compiled the program and in the java_top/oracle/apps/../.. (in the pkg given). Now the class files and java files are in the said location. I created an executable of type "java concurent Prog" and location same as Package name.
    Created a Program and assigned it to the responsibility. Having done this when i run the CP I find it ends with an error msg. The log files show the below exceptions: "java.lang.ClassNotFound Exception".
    We are doing it in R12.0.6 and in Unix server. Pls help me where I am missing it. It turned to be an urgent requirement frm my end.
    Thanks,
    Abhishek.

    The Exception Stack is :
    java.lang.ClassNotFoundException: oracle.apps.iby.scheduler.test.XXIBE_KeyInsert
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:152).
    Please advice me on how to proceed.

  • Sqlloader concurrent program with multiple data files

    I have a concurrent program with datafile_path/datafile_name as an input parameter registered for an Sql loader (ctl) program. My requirement is to add one more datafile_name to the control file. In that case what should be the syntax in control file? And can I just add one more datafile name to the concurrent program input? Will it pick from the control file.
    My current syntax is as follows in my .ctl file:
    LOAD DATA
    INFILE *
    APPEND
    INTO TABLE <table_name>
         abc_id     SEQUENCE(MAX,1),
         abc_type          CONSTANT 'CONSTANT_VALUE',
    Thanks,

    I have a concurrent program with datafile_path/datafile_name as an input parameter registered for an Sql loader (ctl) program. My requirement is to add one more datafile_name to the control file. In that case what should be the syntax in control file? And can I just add one more datafile name to the concurrent program input? Will it pick from the control file.
    My current syntax is as follows in my .ctl file:
    LOAD DATA
    INFILE *
    APPEND
    INTO TABLE <table_name>
         abc_id     SEQUENCE(MAX,1),
         abc_type          CONSTANT 'CONSTANT_VALUE',
    Thanks,

  • Parameter Passing from Concurrent Program to XML Data Template

    Hi All,
    I have a xml data template which is attached to a data definition. The data template contains a SQL query and some parameter definitions. One of the parameters is p_emp_id. The data type of the parameter is "number" and the where clause that uses the parameter is as follows:
    AND employee_id in (:p_emp_id,DECODE(:p_emp_id,126,130,-99).
    The data definition is attached to a concurrent program which has a parameter based on a valueset. Format type of valueset is char. Validation type is table. Inside the table definition, the table is employees. value column is emp_name type is char. meaning column is emp_name type is char. ID column is emp_id type is number.
    The above where clause condition fails when the conc program is run. In the log file I can see that the value passed is 126 from the valueset. If the query is run independently in TOAD and value passed is 126, the where clause returns rows.
    Kindly let me know what could be the possible issue. Let me know if the question is not clear enough.
    Thanks,
    Amit

    Hi Ashish,
    Thanks for replying.
    I mentioned that the Id column of the VSet is emp_id right ? Isn't the Id column value passed ?
    Moreover I also mentioned that I could see in the log file that the emp_id value is being passed and not the name. I could see in the log file p_emp_id=126. There seems to be some problem with the data types and all.
    Thanks,
    Amit

  • Report runs OK through concurrent program, but not when called through URL

    We have a custom 6i report developed that works successfully 100% of the time when run through a concurrent program.
    We are now attempting to integrate this into an OAF application. To do this, we build the necessary call to the reports server by reading different profile options, etc and come up with a URL like this:
    http://ebsd777.xxxxx.com:8000/dev60cgi/rwcgi60?d777_APPS+report=XXMFG_ESPEC_REPORT.rdf+P_SPEC_ID=43+DESFORMAT=PDF
    This report works 90% of the time when called like this, but the other 10%, we get the following error:
    "Error: The requested URL was not found, or cannot be served at this time.
    Incorrect usage."
    Trying to find what the differences are between the reports that work and those that don't - found that reports which fail seem to extend out further to the right than the reports that do work. But, these reports still fit on standard letter paper in landscape format - as we can verify through the concurrent program call.
    Is there some sort of report server setting or parameter which we can change to get this to work when called through the reports server URL?
    Any thoughts would be appreciated!
    Thanks,
    Craig

    Hi,
    Please post the application release along with the database version and OS.
    But when i call the same program through the pl/sql executable of another concurrent program , it does not print the pdf output by defaultHow do you call the program? What is the value of the number of copies profile option?
    Please see if these docs help.
    Note: 757901.1 - How To Restrict The Number Of Copies To 1?
    Note: 729117.1 - How To Specify the Number of Copies to Print by Report?
    Thanks,
    Hussein

  • Changing concurrent program,executable short names

    hi,
    i created one report and registered in apps, with some executable short name and concurrent program short name.
    now i want to create a new program with the same short names, and no need of the first report.
    how can i do it?
    can anybody plz give any clue.
    with regards
    kiran

    You can not have two concurrent programs with the same short name but you probably already know that from trying it. Since you need a new program with the same short name and you don't need the old program, simply rename the program and description of your existing program. You will have to change the executable to point to the code of your new program.

  • Concurrent program Do not Insert Data Into Interface Tables!

    Hi there:
    I am facing a problem with my concurrent program whenever I execute my stored procedure in SQL/PLUS it's work fine data load into the AP_INTERFACE/LINES.
    Whenever I try to load data through my concurrent programs it doesn't load into AP_INTERFACE/LINES and concurrent request successfully completed but don't load data.
    This is code query take a look.
    CREATE OR REPLACE PROCEDURE CINDNOTE(errbuff OUT VARCHAR2,
    retcode OUT NUMBER,
    p_org IN VARCHAR2,
    p_from_date IN VARCHAR2,
    p_to_date IN VARCHAR2)
    --p_org_id IN NUMBER,
    *Module Name AP DEBIT NOTE INTERFACE
    *Description This Package contains PL/SQL to support the
    * the DEBIT NOTE Inward Interface to AP
    *Author Zeeshan Hussain Siddiqui
    *Date 15 May, 2007
    *Modification Log
    *Developer Version Date Description
    *Zeeshan Hussain Siddiqui 1.0.0.1 15-MAY-2007 This interface integrated to AP
    AS
    ap_sequence NUMBER;
    reject_debit CHAR:='D';
    --v_invoice_lookup_code VARCHAR2(25):='Debit Memo';
    --v_negative_amt1 CHAR:='(';
    --v_negative_amt2 CHAR:=')';
    v_code VARCHAR2(250):='01.01.000.10450.00.00000';
    v_description VARCHAR2(250);
    V_rma_no VARCHAR2(10):='RMA#';
    from_date DATE;
    to_date DATE;
    CURSOR rejected_cur
    IS
    SELECT HR.full_name,ORG.organization_code InvOrg,
    ROUND(NVL((CR.unit_price*quantity_rejected*-1)+NVL(CR.gst_amount*-1,0),0),2)
    Invoice_Amt,ROUND(NVL(CR.unit_price*quantity_rejected*-1,0),2) AMT,ROUND(NVL(CR.gst_amount*-1,0),2) GST_AMT,
    POS.vendor_site_code,CR.date_of_disposition disposition_date,POS.vendor_site_id,CR.organization_id,
    (CASE WHEN CR.organization_id =305 THEN '01' WHEN CR.organization_id =304 THEN '01'
    WHEN CR.organization_id =450 THEN '07' WHEN CR.organization_id =303 THEN '02' ELSE '00' END)||'.'||
    (CASE WHEN CR.organization_id=305 THEN '02' ELSE '01' END)||'.000.'||(CASE WHEN CR.disposition=4
    THEN '10430' WHEN CR.disposition=6 THEN '10433' WHEN CR.disposition=3 THEN '10430'
    ELSE '00000' END)||'.'||'00.00000' Distribution_Code,
    PO.vendor_id,CR.reject_number,CR.disposition,CR.po_number,CR.unit_price,CR.rework_po_no,
    CR.shipping_memo, PO.vendor_name,
    CR.debit_note_number Invoice_Number,CR.account_number,CR.currency_code,
    CR.shipped_via,CR.vendor_rma,POC.first_name||' '||POC.last_name Contact,POS.phone,
    SUBSTR(POS.Fax_Area_Code,1,10)||'-'||SUBSTR(POS.Fax,1,20) Fax_Number,
    SUBSTR(POS.Address_Line1,1,100) Address,
    SUBSTR(POS.City,1,25)||' '||SUBSTR(POS.State,1,20)||' '||SUBSTR(POS.Province,1,20)"City/State/Prov"
    FROM apps.hr_employees hr,apps.mtl_system_items mtl,
    apps.org_organization_definitions ORG,
    apps.cin_rejects CR,apps.po_headers_all POH,
    apps.po_vendors PO,apps.po_vendor_contacts POC,apps.po_vendor_sites_all POS
    --WHERE TRUNC(CR.date_of_disposition) BETWEEN from_date AND to_date
    WHERE To_char(CR.date_of_disposition,'j') BETWEEN to_char(from_date,'j') AND to_char(to_date,'j')
    AND CR.organization_id =p_org_id ORG.organization_id
    AND ORG.organization_code =p_org
    AND POH.segment1 =CR.po_number
    AND HR.employee_id =MTL.buyer_id
    and CR.organization_id =MTL.organization_id
    AND CR.INVENTORY_ITEM_ID =MTL.INVENTORY_ITEM_ID
    AND PO.vendor_id =POH.vendor_id
    AND POH.vendor_contact_id =POC.vendor_contact_id
    AND POH.vendor_site_id =POS.vendor_site_id
    AND POS.invoice_currency_code =CR.currency_code
    AND CR.disposition IN(3,4,6);
    BEGIN
    from_date:=FND_CONC_DATE.STRING_TO_DATE(p_from_date);
    to_date:=FND_CONC_DATE.STRING_TO_DATE(p_to_date);
    FOR rejected_rec IN rejected_cur
    LOOP
    IF rejected_rec.vendor_rma IS NULL THEN
    v_description:=rejected_rec.shipping_memo||' '||rejected_rec.full_name;
    ELSIF rejected_rec.shipping_memo IS NULL THEN
    v_description:=v_rma_no||rejected_rec.vendor_rma||' '||rejected_rec.full_name;
    ELSIF rejected_rec.vendor_rma IS NULL AND rejected_rec.shipping_memo IS NULL THEN
    v_description:=rejected_rec.full_name;
    ELSIF rejected_rec.vendor_rma IS NOT NULL AND rejected_rec.shipping_memo IS NOT NULL
    AND rejected_rec.full_name IS NOT NULL THEN
    v_description:=v_rma_no||rejected_rec.vendor_rma||' '||rejected_rec.shipping_memo||'
    '||rejected_rec.full_name;
    END IF;
    SELECT AP_INVOICES_INTERFACE_S.NEXTVAL
    INTO ap_sequence
    FROM DUAL;
    INSERT INTO AP_INVOICES_INTERFACE
    INVOICE_ID
    ,VENDOR_ID
    ,INVOICE_CURRENCY_CODE
    ,DESCRIPTION
    ,INVOICE_NUM
    ,VENDOR_NAME
    ,VENDOR_SITE_ID
    ,VENDOR_SITE_CODE
    ,INVOICE_DATE
    ,SOURCE
    ,INVOICE_AMOUNT
    ,INVOICE_TYPE_LOOKUP_CODE
    VALUES
    ap_sequence
    ,rejected_rec.vendor_id
    ,rejected_rec.currency_code
    ,v_description
    ,reject_debit||rejected_rec.reject_number
    ,rejected_rec.vendor_name
    ,rejected_rec.vendor_site_id
    ,rejected_rec.vendor_site_code
    ,rejected_rec.disposition_date
    ,'REJECTS'
    ,rejected_rec.Invoice_Amt
    ,'CREDIT'
    IF rejected_rec.GST_AMT <0 THEN
    INSERT INTO AP_INVOICE_LINES_INTERFACE
    INVOICE_ID
    ,LINE_TYPE_LOOKUP_CODE
    ,DIST_CODE_CONCATENATED
    ,ITEM_DESCRIPTION
    ,AMOUNT
    VALUES
    ap_sequence
    ,'TAX'
    ,v_code
    ,v_description
    ,rejected_rec.GST_AMT
    END IF;
    INSERT INTO AP_INVOICE_LINES_INTERFACE
    INVOICE_ID
    ,LINE_TYPE_LOOKUP_CODE
    ,DIST_CODE_CONCATENATED
    ,ITEM_DESCRIPTION
    ,AMOUNT
    VALUES
    ap_sequence
    ,'ITEM'
    ,rejected_rec.Distribution_Code
    ,v_description
    ,rejected_rec.AMT
    COMMIT;
    END LOOP;
    END;
    Please reply me ASAP.
    Thanks,
    Zeeshan

    Hi All,
    I have created a package with a procedure. This procedure is used for inserting records into the custom tables created by me. When I am running the script in back end, it is running in reasonable time and giving back the desired output.
    But, as per requirement, I have to run this package-procedure via a concurrent program. When I am submitting the request, it is taking hours to complete. Also I am using BULK COLLECT and FORALL(Since the number of records are more than 3 lacs) and firing COMMIT after every FORALL. But when I am quering the table, after an hour or so, no rows are returned.
    Please help and reply asap.
    Thanks in Advance....!!

  • How to integrate a class with template.java - Java Concurrent Program. 11i

    Hello, I have a java class I got from a vendor. This java class needs to run through as concurrent program. As per metalink note *How To Create a Java Concurrent Program? [ID 827563.1]* it says that, we must require template.java to wrap around the custom class. I have done that in the following java code. However, being a new java guy, I really dont know how to connect these two classes and constructor.
    Any suggestions about how do I make these classes work in order to run from a concurrent program?
    package oracle.apps.fnd.cp.request;
    import oracle.apps.fnd.util.*;
    import oracle.apps.fnd.cp.request.*;
    import java.io.BufferedReader;
    import java.io.IOException;
    import javax.net.ssl.SSLSocketFactory;
    public class cyberBatch implements JavaConcurrentProgram {
        // Optionally provide class constructor without any arguments.
        // If you provide any arguments to the class constructor then while running the program will fail.
        public void runProgram(CpContext pCpContext) {
            ReqCompletion lRC = pCpContext.getReqCompletion();
            String CompletionText = "";
        // This class is to upload files but can be expanded to download files also.
        public class SSLFileTransfer {
            Properties props =
                new Properties(); // stores properties from property file
       * SSLFileTransfer(): constructor
            public SSLFileTransfer() {
       * init(): initialization (load property file)
          * @param propsFile          properties needed for file transfer
            public void init(String propsFile) {
                try {
                    props.load(new BufferedInputStream(new FileInputStream(new File(propsFile))));
                } catch (Exception e) {
                    e.printStackTrace();
                    System.exit(-1);
       * usage()
            public static void usage() {
                System.out.println("USAGE: java SSLFileTransfer <full path property file name>");
                System.exit(-1);
       * getFactory(): get factory for authentication
          * @throws IOException     if exception occurs
            private SSLSocketFactory getFactory() throws IOException {
                try {
                    SSLContext ctx;
                    KeyManagerFactory kmf;
                    KeyStore ks, ks1;
                    char[] passphrase =
                        props.getProperty("passPhrase").toCharArray();
                    ctx = SSLContext.getInstance("TLS");
                    kmf = KeyManagerFactory.getInstance("SunX509");
                    ks = KeyStore.getInstance("PKCS12", "BC");
                    ks1 = KeyStore.getInstance("JKS");
                    ks.load(new FileInputStream(props.getProperty("key")),
                            passphrase);
                    ks1.load(new FileInputStream(props.getProperty("keyStore")),
                             passphrase);
                    kmf.init(ks, passphrase);
                    TrustManagerFactory tmf =
                        TrustManagerFactory.getInstance("SunX509");
                    tmf.init(ks1);
                    ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
                    return ctx.getSocketFactory();
                } catch (Exception e) {
                    e.printStackTrace();
                    throw new IOException(e.getMessage());
       * getHost(): Get host from property file
            private String getHost() {
                return props.getProperty("host", "localhost");
       * getPort(): Get port from property file
            private int getPort() {
                return Integer.parseInt(props.getProperty("port"));
       * sendRequest(): Send request (file) to the server
          * @param out          stream to send the data to the server
          * @throws Exception     if an error occurs.
            private void sendRequest(PrintWriter out) throws Exception {
                String path = props.getProperty("path");
                out.println("POST " + path + " HTTP/1.0");
                final String BOUNDARY = "7d03135102b8";
                out.println("Content-Type: multipart/form-data; boundary=" +
                            BOUNDARY);
                String uploadFile = props.getProperty("uploadFile");
                String authString =
                    props.getProperty("bcUserName") + ":" + props.getProperty("bcPassword");
                String encodedAuthString =
                    "Basic " + new sun.misc.BASE64Encoder().encode(authString.getBytes());
                out.println("Authorization: " + encodedAuthString);
                final String CRLF = "\r\n";
                StringBuffer sbuf = new StringBuffer();
                sbuf.append("--" + BOUNDARY + CRLF);
                sbuf.append("Content-Disposition: form-data; name=\"upfile\"; filename=\"" +
                            uploadFile + "\"" + CRLF);
                sbuf.append("Content-Type: text/plain" + CRLF + CRLF);
                FileReader fi = new FileReader(uploadFile);
                char[] buf = new char[1024000];
                int cnt = fi.read(buf);
                sbuf.append(buf, 0, cnt);
                sbuf.append(CRLF);
                sbuf.append("--" + BOUNDARY + "--" + CRLF);
                int sz = sbuf.length();
                out.println("Content-Length: " + sz);
                out.println();
                out.println(sbuf);
                out.flush();
                // Make sure there were no surprises
                if (out.checkError())
                    System.out.println("SSLFileTransfer: java.io.PrintWriter error");
       * readResponse(): reads response from the server
          * @param in          stream to get the data from the server
          * @throws Exception     if an error occurs.
            private void readResponse(BufferedReader in) throws Exception {
                boolean successful = false;
                String inputLine;
                while ((inputLine = in.readLine()) != null) {
                    if (inputLine.startsWith("HTTP") &&
                        inputLine.indexOf("200") >= 0)
                        successful = true;
                    System.out.println(inputLine);
                System.out.println("UPLOAD FILE " +
                                   (successful ? "SUCCESSFUL" : "FAILED") +
                                   "!!!\n");
       * upload(): upload file to server
          * @throws Exception     if an error occurs.
            public void upload() throws Exception {
                try {
                    SSLSocketFactory factory = getFactory();
                    SSLSocket socket =
                        (SSLSocket)factory.createSocket(getHost(), getPort());
                    PrintWriter out =
                        new PrintWriter(new BufferedWriter(new OutputStreamWriter(socket.getOutputStream())));
                    BufferedReader in =
                        new BufferedReader(new InputStreamReader(socket.getInputStream()));
                    socket.startHandshake();
                    sendRequest(out);
                    readResponse(in);
                    out.close();
                    in.close();
                    socket.close();
                } catch (Exception e) {
                    e.printStackTrace();
                    throw e;
       * main(): main method to start file transfer
          * @param args          command line arguments (property file, see usage())
          * @throws Exception     if an error occurs.
            public static void main(String[] args) throws Exception {
                if (args == null || args.length != 1)
                    usage();
                SSLFileTransfer fileXfer = new SSLFileTransfer();
                fileXfer.init(args[0]);
                fileXfer.upload();
        lRC.setCompletion(ReqCompletion.NORMAL,CompletionText) ;
    }Thanks,
    R

    I believe the OP is aware of this :) -- Re: Oracle 11i - 11.5.10.2 - and Java
    Thanks,
    Hussein

  • Sourcing : Error while Running Java Concurrent Program

    Hi All,
    Navigations:
    Application: Sourcing
    Responsibility : Sourcing Buyer
    Concurrent Program : Generate and Store Sourcing response spreadsheet
    I am trying to run
    Java Concurrent Program : Generate and Store Sourcing response spreadsheet in SRS Window,
    it completed with Error status.
    Please let me know How can I run this Concurrent Program with Normal status and able to view/save the Output.
    Please provide resolution on this.

    Thanks for your reply..
    Program: Generate and Store Sourcing response spreadsheet
    ShortName: PON_EXPORT_RESPONSE
    Application: Sourcing
    Executable: ExportResponseCp
    Method: Java Concurrent Program
    Responsibility : Sourcing Buyer.
    Has this ever worked? If yes, any changes been done recently?
    => No
    Is this the seeded concurrent program or a custom one?
    => Its seeded program.
    EBS: R12.1.3
    Login as Sourcing Buyer Responsibility :
    When you create RFQ and then Close RFQ and then create Surrogate quote and after you Export the Spreadsheet in SelfService Pages it generates the output.
    But if You run the concurrent program (Generate and Store Sourcing response spreadsheet) it errors out.
    Error : Exception in thread main java .lang.stringIndexOutOfBoundException:
    Thanks..

  • No getting Report Output in OAF for java Concurrent program Method

    I am not getting report output for java Concurrent Program(Concurrent Program Executable Method), for the reports which are of type PL/SQL Stored Procedure getting the output. for some of the reports the executable method is 'java Concurrent Program', so is there any thing i need to modify in my code.
    Thanks
    Babu

    The Concurrent request is not able to generate output
    getting following error in FNDCPREQUESTVIEWPAGE
    The concurrent request 9923758 did not create an output file.
    so what may be reasons for this?
    Thanks
    Babu

  • Create child concurrent program for multi-processing

    Hi,
    I have a requirement where in I need my main concurrent program to generate child concurrent programs to process data in parallel.
    I want all the child programs to write the response in the output file of the main concurrent programs.
    Any pointers to this will be a real help.
    Thanks.
    Jujaar

    Hey Sandeep,
    Thanks for your response...
    OK, even I was thinking on those kind of solution or other possible way is to directly write in the output/log file of the parent req.
    Cause the output file is always formed at a loction with a std. naming convention o+request_id.out.
    I think it might be possible to write directly into the file. Have not tried it yet.
    And one more question, do you have an idea how to generate the child concurrent programs.
    I do see a parameter names sub_request in fnd_request.submit_request package. This is a boolean type.
    But I am kind of unsure, If I pass this parameter as TRUE, how it will find the parent request ID.
    If you some information on this as to how we can submit child concurrent request, please share. IT would be a great help.
    Thanks
    Jujaar

  • Update Supplier / Vendor name using InterfaceTables / Concurrent programs

    Hi there,
    Is there a way to update the suppliers or vendor Name?
    I am using interface tables with concurrent programs to import data in EBS.
    Can I update data using the same procedure? i.e by using Interface Tables and Concurrent program? what happens if one of the supplier changed it's name? What do I need to call for the update?
    Thanks for any help
    Regards,
    Stefan

    Duplicate thread? -- Re: Interface tables and cocurrent programes : updating vendor

  • ST03N, No System Load Data Available,  RSSTAT83, LOGDB_SSCR_NOT_FOUND

    Dear SAP Experts
    I am unable to execute "ST03N", the message is "No System Load Data Available".
    System information said that I have to schedule RSSTAT83 hourly in TCOLL table, and I did that.
    (For your information, I also already schedule RSCOLL00 hourly)
    But when the job RSSTAT83 run, it was cancelled.  The ABAP DUMP says "LOGDB_SSCR_NOT_FOUND". Error in SAP Kernel, The current ABAP "RSSTAT83" program had to be terminated because ABAP processor detected an internal system error.  Internal program table SSCR not found. I checked SSCR table through SE11 and the table exists.
    Strangely this only happen in my Production system, my Development running well with ST03N
    And Yes I have been searching through this forum and Google, but not yet found the solution. The only solution I've got is update my kernel.
    Are there any solutions for this problem?
    Regards,
    Kursteilnehmer

    Hi
    Your Database Not supported . Please check background job log.
    Run se38 and execute RSCOLL00 one by obe via debug mode.
    You get the result
    Regards
    Ravi.S

Maybe you are looking for

  • Personal Network Drives inaccessible

    Since the upgrade to Mavericks our network users are now unable to access their Personal Home Drives We have tried using the name of the server as well as the IP Address and neither are working for us. This was working before the upgrade.. ANy advice

  • Import Process Server

    Hello, I'm capturing Beta Cam tapes via Black Magic, it creates an AVI file, to a GLYPH hard drive; I'm working off the Glyph.  After a minute of plyaback Adobe Premiere CS4 crashes and explains that there is an Import Process Server crash.  This onl

  • Error GR410: characteristic cannot be combined with key figures

    Hi, My problem is in Report Painter. I need to add selection by trading partner (or by vendor) in report 6OBU-001. For this Iu2018ve modified reporting table RWCOOM, in order to make available characteristic RASSC in the library 6O2. Iu2019ve added T

  • Freezing columns and rows in Web reports

    Hi Gurus, We are trying to freeze the scrolling of first two columsns and the first row for a web report. Could you please guide me how can we do this for a analysis web item. Appreciate your help. Thanks Raj

  • Error when returning Vector from EJB Session Bean

    I am testing the EJB functionality within JDeveloper(9.0.3). I simply expanded on the tutorial that is in the documentation (departments and employees). I created a method in the stateless session bean that retrieves a Collection of employees for a d