We're running a script using several employee API's which is failing..

Hello.
Hopefully, one of you gurus will have xome across this before...
Our script has been created to take both NEW & CHANGED employee details into ORACLE Financials via a temporary table directly loaded in from our HR system. It has been working thus far for any new employees but is now failing now that we're trying to incorporate existing employees.
The error message given is:
ORACLE error occurred processing record.. ORA-20001: PAY_7599_SYS_SUP_DT_OUTDAT
The official description behind the error is:
ORA-20001: Supervisor is not valid for the duration of the assignment
Metalink states “Using UPDATE_EMP_ASG API to update the supervisor on a person's assignment when the supervisor is hired after the Employee”. To get around this the DATETRACK mode needs to be set to UPDATE. However Shared HR users are only allowed to use the mode of CORRECTION for this API. We are, unfortunately, a Shared HR User.
Basically, as I understand it, it is because we're trying to load in employees who have a start date BEFORE that of the Supervisor that we’re attaching it to.
Please could you suggest/supply a workaround for users in this type of situation.
/* Formatted on 2009/04/29 11:52 (Formatter Plus v4.8.7) */
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
-- Debugging/error handling
-- Work variables
   location_code_errors  exception;
--   emp_status_errors1   exception;
--   emp_status_errors2   exception;
  v_emp_no number;
   l_employ_start_date        DATE:= TO_DATE ('01-APR-1999', 'DD-MON-YYYY');
   v_ora_loc_code number                     := 0;
   p_emp_number                     VARCHAR2 (14);
   v_rec_cnt                        NUMBER                          := 0;
   insert_flag                      VARCHAR2 (8);
   err_num                          NUMBER;
   err_msg                          VARCHAR2 (150);
   err_line                         VARCHAR2 (350);
   err_seq                          NUMBER                          := 0;
   l_validate                       BOOLEAN                     DEFAULT FALSE;
   l_std_business_group_id          NUMBER                          := '0';
   l_default_code_comb_id           NUMBER                        := '218048';
   l_organization_id                NUMBER                          := '0';
   l_set_of_books_id                NUMBER                          := '1';
   l_job_id                         NUMBER                          := '10';
   l_obj                            NUMBER;
   l_datetrack_update_mode          VARCHAR2 (30)             := 'CORRECTION';
   l_assignment_sequence            NUMBER;
   l_name_combination_warning       BOOLEAN                         := FALSE;
   l_assign_payroll_warning         BOOLEAN                         := FALSE;
   l_org_now_no_manager_warning     BOOLEAN;
   l_other_manager_warning          BOOLEAN;
   l_spp_delete_warning             BOOLEAN;
   l_entries_changed_warning        VARCHAR2 (30);
   l_tax_district_changed_warning   BOOLEAN;
   l_person_id                      NUMBER;
   l_assignment_id                  NUMBER;
   l_assignment_id2           NUMBER;  -- := '28262';
   l_special_ceiling_step_id        NUMBER;
   l_per_effective_end_date         DATE:= TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
   l_people_group_id                NUMBER;
   l_group_name                     VARCHAR2 (30);
   l_assignment_number              VARCHAR2 (35);
   l_effective_end_date             DATE := TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
   l_date                           DATE                           := SYSDATE;
   ip_p_address_id                  per_addresses.address_id%TYPE;
   ip_p_object_version_number       NUMBER;
   ip_p_party_id                    per_addresses.party_id%TYPE;
   l_per_object_version_number      NUMBER;
   l_asg_object_version_number      NUMBER;
   l_full_name                      VARCHAR2 (240);
   l_per_comment_id                 NUMBER;
   l_per_effective_start_date       DATE;
   l_concatenated_segments          VARCHAR2 (240);
   l_soft_coding_keyflex_id         NUMBER;
   l_comment_id                     NUMBER;
   l_no_managers_warning            BOOLEAN;
-- Get employee details info from work table
   CURSOR get_employee_details
   IS
      SELECT std_hire_date, std_last_name, std_sex, std_date_of_birth,
             std_email_address, std_emp_status,
             LPAD (std_employee_number, 8, '0') std_employee_number,
             std_first_name, std_marital_status, std_middle_names,
             std_nationality, std_title, std_national_identifier,
             std_address_line1, std_address_line2, std_address_line3,
             std_address_line4, std_post_code, std_telephone_1, std_country, --std_region,
             std_location_id, --std_organization_id,
             lpad(std_supervisor_id,8,'0') std_supervisor_id
     --, std_person_id, std_position_id
        FROM SU_TEMPLOYEE_DETAILS     
     WHERE std_employee_number IS NOT NULL AND std_national_identifier IS NOT NULL;
-- checks employee details info from PER_ALL_PEOPLE_F table
   CURSOR c_check_employee (p_emp_number VARCHAR2, p_NI_number Varchar2)
   IS
      SELECT per.person_id, per.business_group_id, per.last_name,
             per.start_date, per.date_of_birth, per.email_address,
             per.employee_number, per.first_name, per.marital_status,
             per.middle_names, per.nationality, per.national_identifier,
             per.sex, per.title, padd.address_id, padd.primary_flag,
             padd.address_line1, padd.address_line2, padd.address_line3,
             padd.town_or_city, padd.postal_code, padd.telephone_number_1, paas.assignment_id,
             paas.assignment_number, paas.object_version_number, paas.EFFECTIVE_START_DATE,
     paas.job_id, paas.position_id, paas.location_id, paas.organization_id, paas.assignment_type, paas.supervisor_id,
             paas.default_code_comb_id, paas.set_of_books_id, paas.period_of_service_id
      FROM   per_all_people_f per,
             per_all_assignments_f paas,
             per_addresses padd
       WHERE padd.person_id = per.person_id
       AND paas.person_id(+) = per.person_id
     AND per.employee_number = p_emp_number
     AND per.national_identifier = p_NI_number;
   emp_rec                          c_check_employee%ROWTYPE;
-- Cursor retrieves latest Object Version Number from per_assignments_f table..
--   CURSOR csr_ovn (cp_person_id IN per_all_people_f.person_id%TYPE)
     CURSOR csr_ovn (cp_person_emp_no IN per_all_people_f.EMPLOYEE_NUMBER%TYPE)
    IS
      SELECT MAX (paas.object_version_number)
        FROM per_assignments_f paas, per_all_people_f per
       WHERE paas.person_id = per.person_id
         AND per.employee_number = paas.assignment_number
        -- AND per.person_id = cp_person_id;
        AND employee_number = cp_person_emp_no;
-- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable..
CURSOR csr_ora_loc_code (cp_location_id IN SU_TEMPLOYEE_DETAILS.std_location_id%TYPE)
IS
      SELECT sil.ORACLE_LOC_CODE
     FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
     WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code
     AND std.STD_LOCATION_ID = cp_location_id;
BEGIN
-- Process each record in the work table
   FOR v_emp IN get_employee_details
   LOOP
-- Obtain the most recent Object Version Number..
       OPEN csr_ovn (v_emp.std_employee_number);
      FETCH csr_ovn
       INTO l_obj;
      IF csr_ovn%NOTFOUND     THEN        RAISE NO_DATA_FOUND;   END IF;
      CLOSE csr_ovn;
-- determine whether customer already exists
      OPEN c_check_employee (v_emp.std_employee_number, v_emp.std_national_identifier);
      FETCH c_check_employee
       INTO emp_rec;
       v_emp_no :=  LPAD (v_emp.std_employee_number, 8, '0');
       l_assignment_id2 := emp_rec.assignment_id;
      IF v_emp.std_emp_status = 'N'  and c_check_employee%NOTFOUND
      THEN
      insert_flag := 'I';
          DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number);
          DBMS_OUTPUT.PUT (CHR (10));
       END IF;
     --If Chris21 status is New but Employee exists in Finance make it a changed record
      IF v_emp.std_emp_status = 'N'  and c_check_employee%FOUND
      THEN
      insert_flag := 'C';
          DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number);
          DBMS_OUTPUT.PUT (CHR (10));
       END IF;
      IF  v_emp.std_emp_status = 'C' and c_check_employee%NOTFOUND
      THEN
      insert_flag := 'I';
      DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number || ' doesnt exist but            theyre goin in anyway.. ');
       DBMS_OUTPUT.PUT (CHR (10));
      END IF;
       IF v_emp.std_emp_status = 'C' and c_check_employee%FOUND
      THEN    
       insert_flag := 'C';
        END IF;
--==================================================
--===== Left this out as this was predominantly for testing purposes.. ======
--==================================================
       --    IF l_assignment_id2 is null then   raise emp_status_errors1;     END IF;
       --    IF l_obj is null then  raise emp_status_errors2;    END  IF;
      --     IF l_job_id is null AND v_emp.std_emp_status = 'C'  THEN l_job_id = '10';
        -- END IF;
        -- END IF;
      CLOSE c_check_employee;
-- Open Oracle Location Code cursor
OPEN csr_ora_loc_code(v_emp.std_location_id); 
      FETCH csr_ora_loc_code
       INTO v_ora_loc_code;
       IF csr_ora_loc_code%NOTFOUND  THEN    RAISE   location_code_errors; END IF;
      CLOSE csr_ora_loc_code;
-- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from
--            info in  table record
      IF insert_flag = 'I'
      THEN
--                      -- Importing Employee Procedure --
         Hr_Employee_Api.create_gb_employee
                 (p_validate                       => l_validate,
                  p_hire_date                      => l_employ_start_date,
                  p_business_group_id              => l_std_business_group_id,
                  p_date_of_birth                  => v_emp.std_date_of_birth,
                  p_email_address                  => v_emp.std_email_address,
                  p_first_name                     => v_emp.std_first_name,
                  p_middle_names                   => v_emp.std_middle_names,
                  p_last_name                      => v_emp.std_last_name,
                  p_sex                            => v_emp.std_sex,
                  p_ni_number                      => v_emp.std_national_identifier,
                  p_employee_number                => v_emp.std_employee_number,
                  p_person_id                      => l_person_id,
                  p_title                          => v_emp.std_title,
                  p_assignment_id                  => l_assignment_id,
                  p_per_object_version_number      => l_per_object_version_number,
                  p_asg_object_version_number      => l_asg_object_version_number,
                  p_per_effective_start_date       => l_per_effective_start_date,
                  p_per_effective_end_date         => l_per_effective_end_date,
                  p_full_name                      => l_full_name,
                  p_per_comment_id                 => l_per_comment_id,
                  p_assignment_sequence            => l_assignment_sequence,
                  p_assignment_number              => l_assignment_number,
                  p_name_combination_warning       => l_name_combination_warning,
                  p_assign_payroll_warning         => l_assign_payroll_warning
         Hr_Person_Address_Api.create_person_address
                                  (p_validate                     => l_validate,
                    --            p_effective_date               => v_emp.std_hire_date,
                                   p_effective_date              =>  l_employ_start_date,
                                   p_pradd_ovlapval_override      => NULL,
                                   p_validate_county              => NULL,
                                   p_person_id                    => l_person_id,
                                   p_primary_flag                 => 'Y',
                                   p_style                        => 'GB_GLB',
                                   p_date_from                    => SYSDATE,
                                   p_date_to                      => NULL,
                                   p_address_type                 => NULL,
                                   p_comments                     => NULL,
                                   p_address_line1                => v_emp.std_address_line1,
                                   p_address_line2                => v_emp.std_address_line2,
                                   p_address_line3                => v_emp.std_address_line3,
                                   p_town_or_city                 => v_emp.std_address_line4,
                                   p_region_1                     => NULL,
                                   p_region_2                     => NULL,
                                   p_region_3                     => NULL,
                                   p_postal_code                  => v_emp.std_post_code,
                                   p_country                      => v_emp.std_nationality,
                                   p_telephone_number_1           => NULL,
                                   p_telephone_number_2           => NULL,
                                   p_telephone_number_3           => NULL,
                                   p_party_id                     => ip_p_party_id,
                                   p_address_id                   => ip_p_address_id,
                                   p_object_version_number        => l_obj
         Hr_Assignment_Api.update_emp_asg
                        (p_validate                    => l_validate,
                         p_effective_date              => SYSDATE,  -- l_date,
                         p_datetrack_update_mode       => l_datetrack_update_mode,
                         p_assignment_id               => l_assignment_id,
                         p_object_version_number       => l_obj,
                         p_supervisor_id               => v_emp.std_supervisor_id,
                         p_default_code_comb_id        => l_default_code_comb_id,
                         p_set_of_books_id             => l_set_of_books_id,
                         p_concatenated_segments       => l_concatenated_segments,
                         --IN/OUT
                         p_soft_coding_keyflex_id      => l_soft_coding_keyflex_id,
                         --IN/OUT
                         p_comment_id                  => l_comment_id,
                         --IN/OUT
                         p_effective_start_date        => l_date,     --IN/OUT
                         p_effective_end_date          => l_effective_end_date,
                         --IN/OUT
                         p_no_managers_warning         => l_no_managers_warning,
                         --IN/OUT
                         p_other_manager_warning       => l_other_manager_warning
                        --IN/OUT
         Hr_Assignment_Api.update_emp_asg_criteria
             (p_validate                          => l_validate,
              p_effective_date                    => SYSDATE,       -- l_date,
              p_datetrack_update_mode             => l_datetrack_update_mode,
              p_assignment_id                     => l_assignment_id,
              p_object_version_number             => l_obj,
              p_organization_id                   => l_organization_id,
              p_location_id                       => v_ora_loc_code,
              p_job_id                            => l_job_id,
--              p_position_id                       => v_emp.std_position_id,
              p_special_ceiling_step_id           => l_special_ceiling_step_id,
              p_effective_start_date              => l_date,
              --per_effective_start_date,
              p_effective_end_date                => l_effective_end_date,
              --IN/OUT
              p_people_group_id                   => l_people_group_id,
              --IN/OUT
              p_group_name                        => l_group_name,    --IN/OUT
              p_org_now_no_manager_warning        => l_org_now_no_manager_warning,
              --IN/OUT
              p_other_manager_warning             => l_other_manager_warning,
              --IN/OUT
              p_spp_delete_warning                => l_spp_delete_warning,
              --IN/OUT
              p_entries_changed_warning           => l_entries_changed_warning,
              --IN/OUT
              p_tax_district_changed_warning      => l_tax_district_changed_warning
             --IN/OUT
         v_rec_cnt := v_rec_cnt + 1;
         DBMS_OUTPUT.PUT (CHR (10));
         DBMS_OUTPUT.PUT_LINE (   'There were '
                               || v_rec_cnt
                               || '  records read in..'
-- Updating PER_ALL_PEOPLE_F and PER_ADDRESSES record from
--            info in  table record
   ELSE IF insert_flag = 'C'
      THEN
          DBMS_OUTPUT.PUT (CHR (10));
         DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number ||  '  is about to be updated.. '   );
          DBMS_OUTPUT.PUT (CHR (10));
-- ===================================================
-- these next 6 lines is for the initial mass update of existing employee records only     
-- ===================================================
/*IF emp_rec.default_code_comb_id is NULL THEN
     l_default_code_comb_id = 218048;
     END IF;     
     IF emp_rec.job_id is NULL THEN
     l_job_id = 10;
     END IF;      */
-- =========
-- Section end
-- =========
         Hr_Assignment_Api.update_emp_asg
                        (p_validate                    => l_validate,
                         p_effective_date           => emp_rec.EFFECTIVE_START_DATE, --SYSDATE,
                         p_datetrack_update_mode       => l_datetrack_update_mode,
                         p_assignment_id               => l_assignment_id2,
                         p_object_version_number       => l_obj,
                         p_supervisor_id               => v_emp.std_supervisor_id,
                          p_default_code_comb_id        => l_default_code_comb_id,
           --            p_default_code_comb_id        => emp_rec.default_code_comb_id,
                         p_set_of_books_id             => emp_rec.set_of_books_id,
                         p_concatenated_segments       => l_concatenated_segments,
                         --IN/OUT
                         p_soft_coding_keyflex_id      => l_soft_coding_keyflex_id,
                         --IN/OUT
                         p_comment_id                  => l_comment_id,
                         --IN/OUT
                         p_effective_start_date        => l_date,     --IN/OUT
                         p_effective_end_date          => l_effective_end_date,
                         --IN/OUT
                         p_no_managers_warning         => l_no_managers_warning,
                         --IN/OUT
                         p_other_manager_warning       => l_other_manager_warning
                        --IN/OUT
         Hr_Assignment_Api.update_emp_asg_criteria
             (p_validate                          => l_validate,
              p_effective_date                    => emp_rec.EFFECTIVE_START_DATE,
              --p_effective_date                    => SYSDATE,
              p_datetrack_update_mode             => l_datetrack_update_mode,
              p_assignment_id                     => l_assignment_id2,
              p_object_version_number             => l_obj,
--              p_organization_id                   => emp_rec.organization_id,
              p_organization_id                   => l_organization_id,
              p_location_id                       => v_ora_loc_code,
              p_job_id                            => emp_rec.job_id,
--              p_position_id                       => emp_rec.position_id,
              p_special_ceiling_step_id           => l_special_ceiling_step_id,
              p_effective_start_date              => emp_rec.EFFECTIVE_START_DATE,
              p_effective_end_date                => l_effective_end_date,
              --IN/OUT
              p_people_group_id                   => l_people_group_id,
              --IN/OUT
              p_group_name                        => l_group_name,    --IN/OUT
              p_org_now_no_manager_warning        => l_org_now_no_manager_warning,
              --IN/OUT
              p_other_manager_warning             => l_other_manager_warning,
              --IN/OUT
              p_spp_delete_warning                => l_spp_delete_warning,
              --IN/OUT
              p_entries_changed_warning           => l_entries_changed_warning,
              --IN/OUT
              p_tax_district_changed_warning      => l_tax_district_changed_warning
             --IN/OUT
         v_rec_cnt := v_rec_cnt + 1;
         DBMS_OUTPUT.PUT (CHR (10));
         DBMS_OUTPUT.PUT_LINE (   'There were '
                               || v_rec_cnt
                               || ' records read in..'
         DBMS_OUTPUT.PUT (CHR (10));
-- End of customer related details
      END IF;
      END IF;
--      END IF;
   END   LOOP;
   COMMIT;
EXCEPTION
WHEN  location_code_errors THEN  ROLLBACK;
dbms_output.put_line  ('Location ID unknown or not found, please check..');
/* WHEN  emp_status_errors1 THEN  ROLLBACK;
dbms_output.put_line  ( 'Employee No: ' || v_emp_no || ' has been found but has no assignment id2!') ;
WHEN  emp_status_errors2 THEN  ROLLBACK;
dbms_output.put_line  ( 'Employee No: ' || v_emp_no  || ' Assgnmnt Obj Vers No is not being passed!');
   WHEN NO_DATA_FOUND     THEN     ROLLBACK;
      err_num := TO_CHAR (SQLCODE);
      err_msg := SUBSTR (SQLERRM, 1, 150);
      err_line :=   'ORACLE error occurred processing record.. ' ||  err_msg;
      DBMS_OUTPUT.PUT_LINE (err_line);
      INSERT INTO SU_ERROR_LOG  VALUES (err_msg, 'TEMPLOYEE_DTLS.sql', SYSTIMESTAMP);
    WHEN OTHERS    THEN       ROLLBACK;
      err_num := TO_CHAR (SQLCODE);
      err_msg := SUBSTR (SQLERRM, 1, 150);
      err_line :=   'ORACLE error occurred processing record.. ' ||  err_msg;
      DBMS_OUTPUT.PUT_LINE (err_line);
      INSERT INTO SU_ERROR_LOG  VALUES (err_msg, 'TEMPLOYEE_DTLS.sql', SYSTIMESTAMP);
END;
EXIT;Many thanks..
Steven

many thanks for your help user11181328 but because its just a SQL script I thought an alternative was to create 2 cursors in the same script to get the date..:
1st cursor to -- 1. First get the assignment id of the subordinate. (emp_rec.assignment_id)
..and then 2nd to: get the start date of the supervisor's record (v_emp.std_supervisor_id)
-- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable..
CURSOR csr_ora_loc_code (cp_location_id IN SU_TEMPLOYEE_DETAILS.std_location_id%TYPE)
IS
      SELECT sil.ORACLE_LOC_CODE
     FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
     WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code
     AND std.STD_LOCATION_ID = cp_location_id;
-- Cursor to get the start date of the supervisor's record based
-- on the assignment id of the subordinate (employee)
-- 1. First get the assignment id of the subordinate. (emp_rec.assignment_id)
CURSOR c_sprvsrid_ofemp (p_emp_number VARCHAR2)
IS
SELECT paas.assignment_id --  per.EMPLOYEE_NUMBER
FROM per_all_people_f per, per_assignments_f paas
WHERE
paas.person_id = per.person_id
AND per.employee_number = p_emp_number;
   sprvsr_rec                          c_sprvsrid_ofemp%ROWTYPE;
-- 2. from this get the start date of the supervisor's record (v_emp.std_supervisor_id)
CURSOR c_sprvsr_strt_dte (p_emp_number VARCHAR2)
IS
SELECT   paas.effective_start_date 
FROM per_all_people_f per, per_assignments_f paas
WHERE
paas.person_id = per.person_id
AND per.employee_number = paas.assignment_number
--AND paas.assignment_id = sprvsr_rec.SUPERVISOR_ID;
AND paas.assignment_id = sprvsr_rec.assignment_id;
   ssdate_rec                          c_sprvsr_strt_dte%ROWTYPE;
-- 3. then take this start date in [2] and give it to the start date of the assignment for the subordinate....then in the main section..
-- Get that bloody Supervisors start date!!
OPEN c_sprvsrid_ofemp (emp_rec.employee_number);
      FETCH c_sprvsrid_ofemp        INTO sprvsrid_ofemp;
    --  IF c_sprvsrid_ofemp%NOTFOUND     THEN        RAISE NO_DATA_FOUND;   END IF;
     CLOSE c_sprvsrid_ofemp;
OPEN c_sprvsr_strt_dte (emp_rec.employee_number);
    FETCH c_sprvsr_strt_dte INTO v_sprvsr_strt_dte;     
-- IF c_sprvsr_strt_dte%NOTFOUND     THEN        RAISE NO_DATA_FOUND;   END IF;
   CLOSE c_sprvsr_strt_dte;Alas, although it seemed written out to work, the same error message was generated when ran. I have honestly no idea how to get around this. Metalink acknowledge its a problem but have placed it as an 'Enhancement Request', meaning of course, don't wait up for a fix anytime this year..
Steven

Similar Messages

  • Why MicroSoft 2000 SR needed while running the script using test manager???

    hi all,
    whenever I trying to run a script using test manager,one POP-UP comes which starts installing MICROSOFT 2000 SR.
    and in few seconds it complaining for some missing component,
    can any body tell me why it is happening.
    what is the need of Microsoft 2000 SR while running the script in test manager.
    tnx
    USOni

    USoni
    I have seen that problem happening before, even that i was never able to figure out why, something that you can try is changing the service log in credentials for both:
    Oracle Application Testing Suite Agent Service
    Oracle Application Testing Suite Application Service
    and use a proper user with admin rights.
    let me know if that helped
    Regards
    Alex

  • How to run WLST scripts using getopt in Eclipse, usin PyDev?

    There's probably several questions here, but perhaps they're all related.
    I have Eclipse 3.3.2, and the PyDev plugin, and WebLogic 9.2.2.
    I was able to create a simple PyDev project and "hello world" module, and execute it in Eclipse. I put "weblogic.jar" in the Jython interpreter list.
    Although I haven't tried any WLST functionality yet, I want to try loading the "getopt" module. I tried doing this on another project, way back in the 8.1.4 timeframe, and I even discovered a question I had asked about this ( [http://forums.bea.com/thread.jspa?threadID=600008087&start=0] ).
    The workaround Satyam describes there doesn't appear to apply in WL 9.2.2, and I'm also running on Windows, which apparently didn't have this problem back then.
    When I just try to do "import getopt", it just says there's no module by that name.

    Well, I've actually gotten past this. It was easy enough to append "$BEA_HOME/weblogic92/common/wlst/modules/jython-modules.jar/Lib" to sys.path. I've now got other problems, however. Running the scripts in Eclipse doesn't load the core WebLogic objects and methods, like "connect()". I can at least use PyDev to edit my code, but I have to run it outside of Eclipse.

  • How to run expect script using SGD?

    Does any one know how I can run an expect script using the same executable SGD uses? I think the executable is /opt/tarantella/bin/bin/ttatcl, but it seems to be looking for an init file that I cannot find.
    Anyone tried this before?
    Thanks

    ttatcl is a TCL interpreter, the expect functionality is embedded into ttaexecpe and can't be used externally.
    Linux distributions usually include expect and you can find expect for Solaris here :
    http://www.sun.com/software/solaris/freeware/index.xml

  • How to run shell script using External Process in Process Flow?

    Hi,
    We can run external process using Process flow.
    I would like to run shell script as external process in Process flow.
    Could any one please explain it?
    Thanks and regards
    Gowtham Sen.

    HI,
    As you said I tried this case. I got the following error. The script is running successfully while I tested at unix command prompt.
    The error is as follows..
    tarting Execution PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: wc: command not found
    /SOURCE_FILES/CollectFiles.sh: line 1: ls: command not found
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS
    Starting Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Sep 29 22:57:39 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] | /
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    Completing Task PFPS_SMPL_RUNSHELL:EXTERNALPROCESS_1
    Completing Task PFPS_SMPL_RUNSHELL
    Completing Execution PFPS_SMPL_RUNSHELL
    My scenario is---
    I am trying to return a file name from one shell script. I created a external process for that. After completion of this process, I am running another script which takes that file name and trying to create a external table. The both scripts are runnning successfully. But while I am trying to run using process flow, its not coming.
    And I am not getting the way to catch the output of external process and pass it as parameter as another external process.
    Any suggestions are welcome.
    Thanks and regards
    Gowtham Sen.

  • How to run bash script using Calendar

    Hi folks.
    How can I run a bash script using Calendar?  I thought I had to park it in an AppleScript script which I could call, but that isn't really working.
    Any suggestions appreciated.
    Cheers

    Hi there.  Thanks for the reply.
    Some notes for the replies:
    - The shell script has no environment issues.  It's a straight mysqldump for a single database.
    - The AppleScript has the do shell script "path/to/script.sh" user name "root" password "wobblyhead" with administrator privileges
    - Calendar application can only recognize the .scptd and .scpt files, and not .app files.  Upon choosing my original .scpt file with the do shell script instruction, it just opens the file in AppleScript Editor. 
    So the file gets called, but for some reason, it just opens the file and won't run the file.  No options for choosing a format where it's actually run. 
    Not sure how to go about this. 
    Cheers

  • Run shell script using Host Command

    How do I run Unix Shell Script using Host command?
    Please help me......

    Are you running the shell script from the same box as the forms are deployed in? If not, then HOST call will try to execute on the machine where the forms are hosted(App server).

  • Error when running a script using upsshell.exe

    I have a simple custom script which is
    Sub Test1()
    Set fso=  CreateObject("Scripting.filesystemobject")
    Set ts = fso.CreateTextFile("D:\DATA\****\Outbox\Templates\Test.txt")
    ts.writeline "hi"
    End sub
    When I am running it manually in workbench, the script runs fine but when I try to run it using upsshell.exe(command provided below)
    D:\Oracle\MIDDLE~1\EPMSYS~1\products\FINANC~2\SHARED~1\upsShell.exe CustomScriptEx=****~admin~****~~****~D:\DATA\test\Outbox\Logs~Test1~1033~0
    i get the following error
      ERROR:
        Code............ 438
        Description..... [Script failure caused error]: Object doesn't support this property or method
        Procedure....... modupsShell.ExecuteCustomScriptEx
        Component....... upsShell
        Version......... 1112
        Process ID...... 292496
        Thread.......... 290292
      IDENTIFICATION:
        User............ admin
        Domain..........
        Computer Name... *******
        App Name........ ****
      PROCEDURE STEPS:
        1-Split Arguments
        2-Create Load balancer=*******
        3-Authenticate
        4-Get Next App Server
        5-Open App Server=*******
        6-Execute the script=Test1
        7-Step was not reached, a previous step failed
    Any ideas on the error?

    Hello Verdulken,
    I have a few additional questions:
    Does your application function correctly when running the LabVIEW operator interface you have created as a VI in the LabVIEW development environment (i.e. does this problem only occur when the LabVIEW operator interface is run as an executable)?
    What is the error that you are receiving?
    Regarding the VI that you open programmatically, do you open it in a visible manner (i.e. use the Show front panel when called option from VI Properties)?If so, do you also close this VI after it finishes (i.e. use the Close if originally closed option from VI Properties)?
    Does the error occur on the step that calls this very same VI again later in the sequence?
    Does your application function correctly if you use the development adapter for all of your calls?
    Thank you in advance for this information,
    Matt G.
    National Instruments
    Applications Engineering

  • Running 2 scripts using the browser simultaneously

    I was wondering,
    Is there a way to run two different AppleScripts using Safari at the same time, so that e.g. one would operate in one tab and the other in a different tab? How do I go about that? How do I avoid conflicts? (I should add that my knowledge of applescripting is rather limmited, so more information is better than less )
    Also, both scripts would be using the curl command and shell script to download or save files, etc. What would happen, if both scripts tired to call the curl command at the same time? Would that cause a conflict, or would the scripts just be put in a queue?
    Any ideas?

    but how do I know which document is which? Is there any way  to tell safari to set the index of a document?
    There are numerous ways of identifying/tracking objects within AppleScript - and that's generally true for any object in any app.
    In this case 'index' is really front-to-back order, so 'document 1' (or 'window 1') is the frontmost, and therefore the inverse of how you created the documents in the first place. Of course that gets messy as you open new windows, move them around, etc.
    You can change the index of the windows, though, which changes their relative order:
    tell application "Safari"
              set index of window 2 to 1
    end tell
    There are other ways, though. For example, each window has an associated ID, which is persistent, therefore you could store the ID of each newly-created window and use that as your target:
    tell application "Safari"
              make new document with properties {URL:"http://www.apple.com/"}
              set appleID to id of window 1 -- store the window ID
      -- later on you can reference that same ID:
      delay 5
              set s to source of document of window id appleID
    end tell
    Other options include the name of the document, as well as relative options. Each application and object class has its own terms, so you'll need to explore the dictionary to determine what's appropriate for any given task.

  • Trying to run external script using Runtime.exec

    Hey,
    I am trying to use Runtime.exec(cmd, evnp, dir) to execute a fortran program and get back its output, however it seems to always be hanging. Here is my code snippet :
                Process process = Runtime.getRuntime().exec(
                      "./fortranCodeName > inputFile.txt" , null, new File("/home/myRunDir/"));
                InputStream stream = new InputStream(process.getInputStream());
                InputStream error = new InputStreamr(process.getErrorStream());
                BufferedReader stdoutReader = new BufferedReader(new InputStreamReader(stream));
                BufferedReader erroutReader = new BufferedReader(new InputStreamReader(error));
                System.out.println(stream.available());  //returns 0
                System.out.println(error.available());     //returns 0
                while (true) {
                    String line1 = stdoutReader.readLine();  //hangs here
                    String line2 = erroutReader.readLine();
                    if (line1 == null) {
                        break;
                    System.out.println(line1);
                    System.out.println(line2);
                }I know for a fact that this fortran code prints out stuff when run it in terminal, but I don't know if I have even set up my Runtime.exec statement properly. I think I am clearing out my error and input streams with the whole reader.readLine bit I have above, but I am not sure. If you replace the command with something like "echo helloWorld" or "pwd", it prints out everything properly. I also am fairly confident that I have no environmental variables that are used in the fortran code, as I received it from another computer and haven't set up any in my bash profile.
    Any Ideas?

    Okay, so I implemented the changes from that website (thanks by the way for that link, it helps me understand this a little better). However, my problem is still occuring. Here is my new code:
                class StreamThread extends Thread {
                InputStream is;
                String type;
                StreamThread(InputStream is, String type)
                    this.is = is;
                    this.type = type;
                public void run()
                    try
                        InputStreamReader isr = new InputStreamReader(is); //never gets called
                        BufferedReader br = new BufferedReader(isr);
                        String line=null;
                        while ( (line = br.readLine()) != null)
                            System.out.println(type  +">"+  line);
                        } catch (IOException ioe)
                            ioe.printStackTrace();
            try {
                Process process = Runtime.getRuntime().exec(
                      "./fortranCodeName" , null, new File("/home/myRunDir/"));
                StreamThread stream = new StreamThread(process.getInputStream(), "OUTPUT");
                StreamThread errorStream = new StreamThread(process.getInputStream(), "ERROR");
                stream.start();
                errorStream.start();
                int exitVal = process.waitFor(); //hangs here
                System.out.println("ExitValue: " + exitVal);

  • How to run sql scripts using batch file for a web dynpro data dictionary

    Hi,
    I want to develop a sql script to be executed on the server alongwith the installation of a product to pre-populate web dynpro data dictionary tables required for the application.
    I further require to make the scripts independent of the database name,so that it can be run at any client environment.
    Your help will be appreciated and rewarded.

    See shoblock's answer
    call sql script from unix
    masterfile.sql:
    @file1 &1
    @file2 &2
    @file3 &3
    @file4 &4
    then just call the master script:
    sqlplus userid/password @masterfile <p1> <p2> <p3> <p4>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • To run sqlplus script using forms6i

    hi forum members!
    SQLPLUS>connect username/password;
    SQLPLUS> spool d:\mydata.dat;
    SQLPLUS> select * from table1;
    SQLPLUS> spool off;
    when i check the d:\ , i found the mydata.dat file. which is the required result for me.
    now how can i get the required result using forms6i.
    all suggestions will be appreciated.
    regards.
    mustafa ghulam
    pakistan.

    hi baig.
    my form ver: Forms [32 Bit] Version 6.0.8.8.0 (Production)
    i have tried a lot of options. most of them are comment now.
    i am also pasting my bat file for you.
    in form: when-button-pressed
    DECLARE
    tmp_job varchar2(2000);     
    BEGIN     
    tmp_job := 'd:\my_data.bat';
    --HOST( 'cmd /c' || tmp_msg, no_screen);
    --HOST( 'D:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe' || tmp_job, no_screen);
    --HOST( 'D:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe' || tmp_job);
    --HOST('CMD /C <file_full_path>', NO_SCREEN);
    --HOST('CMD /d:\my_data.bat', NO_SCREEN);
    HOST(tmp_job);
    END;
    my_data.bat
    HOST( 'D:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe';
    connect username/password;
    spool d:\mydata.dat;
    set linesize 10000;
    select * from vehicles;
    spool off;
    mustafa ghulam (teefu)
    Edited by: user_teefu on Feb 5, 2010 2:34 PM

  • Executing a script using full path in ODT 11.1.0.5.10 beta?

    Using a query window from ODT 10x, I used to be able to run a script using '@' and the path to the script. For example: '@D:\Documents\CAL.MB\Oracle\Create Scripts\Applicant\APPLICANT_TB.sql'.
    Now I get the following error:
    Command '@D:\Documents\CAL.MB\Oracle\Create Scripts\Applicant\APPLICANT_TB.sql' is not supported in query window.
    I checked the documentation, but I couldn't find an alternative way to do this. Anyone know of any alternatives?

    Use VS.NET Tools menu->Run SQL*Plus Script->Specify the full path of your filename ->Select the connection->Hit the ok button.

  • Running long scripts

    Hi,
    I'm trying to run long scripts from SQL*Plus.
    If I paste the script directly - the script stops in the middle.
    If I run with @ file_name - SQL*Plus closes.
    What settings affect the buffer?
    Thx,

    open a command prompt and run sqlpus, then run your script using @filename.
    what do you see on the screen?
    if you are using the GUI SQL*Plus (sqlplusw.exe), stop using that.
    remove the exit in your script, if you have one, and try again.

  • Perl script using perldap under unix

    Hi,
    I've got a perl script (used by a UTC instance) which runs on windows NT and which use the perldap API.
    I'm trying to install it on Solaris with the Directory Server 5.1 SP2 and the Meta Directory 5.1 installed.
    When i use the nsperl located in ../iplanet/servers/lib/nsPerl5.005_03, the script works.
    But when i use it with the nsperl located in sunone/servers/bin/utc50/admin/bin (which is used by the UTC instance) it doesn't work.
    The error message is :
    Can't locate loadable object for module Mozilla::LDAP::API in @INC (@INC contains: /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib/sun4-solaris /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib/site_perl/sun4-solaris /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib/site_perl . /LOCAL/nsPerl5.004_04/lib/sun4-solaris /LOCAL/nsPerl5.004_04/lib /LOCAL/nsPerl5.004_04/lib/site_perl/sun4-solaris /LOCAL/nsPerl5.004_04/lib/site_perl .) at /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib/sun4-solaris/Mozilla/LDAP/Utils.pm line 29
    BEGIN failed--compilation aborted at /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib/sun4-solaris/Mozilla/LDAP/Utils.pm line 29, <GEN0> chunk 26.
    BEGIN failed--compilation aborted at /var/cyril/sunone/servers/lib/nsPerl5.004_04/lib/sun4-solaris/Mozilla/LDAP/Conn.pm line 32, <GEN0> chunk 26.
    Does anybody know how to do to avoid this problem ?
    Thanks a lot.

    The message indicates PerLDAP is not installed into that Perl library. You could install, but do you need to really? If you need to run PerLDAP Metadirectory scripts, then maybe this would be the only way. But I would check with support - this may not be supported - changing the Perl install with Metadirectory. But they should be able to tell you how. If you don't need to run the PerLDAP Meta-scripts, then just use a seperate Perl install from the ones that come with the Sun servers. We use #!/usr/local/bin/perl.

Maybe you are looking for

  • Upload and display image in webside

    Hello Friends, I am developing an auction web site ,and facing some problem so I need your help. There is some confusion about uploading and displaying images in website .In web based application if I want to upload images than where have to store th

  • Error message when trying to convert video

    Help! Whenever i want to try to convert a video for my iPod, an 'unknown error' (-3000) message appears. Can anyone help me? Thx

  • IMac 21.5 slow after updating to Mac OS X Lion 10.7.5

    About a year ago I updated my iMac 21.5 from mountain lion to OS X Lion 10.7.5. Since I did that, it has really been slow. For example - it takes around 5 minutes to start my Mac! And not just that, when I start it (after 2 minutes) the login pops up

  • Bad initial encoding of report after WEB.SHOW_DOCUMENT(MyURL,'_blank')

    Hi, I use Developer9iDS 9.0.2 with installed Patch1 on Win2000 with IE 6.0. I need an HTMLCSS report in lithuanian language and want to prewiev them in new window in browser with Baltic(Windows) encoding. When I produce my report with RUN_REPORT_OBJE

  • Temp tables not dropped SQL Server 2012

    I have a server that houses a database application that makes heavy use of temp tables. It appears that temp tables are not getting dropped from the tempdb.  In perfmon the temp table count is hanging around 1000 and is not going down over time. Even