Hebrew is inverted after using utl_file

Hi,
I'm trying to load a text file downloaded from a IBM mainframe system to Oracle 8.1.6 on AIX, NLS_LANG is HEBREW_ISRAEL.IW8MSWIN1255, but the Hebrew characters are inverted (like a mirror), I'm using Oracle UTL_FILE package to do so.
Using MSDOS type command the file looks ok.
I'll appreciate any help.
10x

Please read the FAQ, upper right, and learn to use tags to format your listings so others can read them.                                                                                                                                                                                                                               

Similar Messages

  • How do I use UTL_FILE to insert a large number of fields to a file?

    Hi
    I am trying to use UTL_FILE for the first time in a Stored Procedure. I need to run a complex query to select 50 fields from various tables. I need these to be inserted into one line in the output file for all rows. Is this possible? My procedure so far is like the following
    CREATE OR REPLACE PROCEDURE PROC_TEST IS
    output_file UTL_FILE.FILE_TYPE;
    BEGIN
    FOR query in (SELECT FIELD1, FIELD2, ..........FIELD50)
    FROM TABLE A, TABLE B
    WHERE A.ID = B.ID
    ETC
    LOOP
    UTL_FILE.PUT_LINE(output_file, <put all 50 fields for all records into file> );
    END LOOP;               
    UTL_FILE.FCLOSE (output_file);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
         UTL_FILE.FCLOSE_ALL;
    RAISE;
    END PROC_TEST;
    Do I need to define 'query' (after the FOR) anywhere, also please advise with how I put all of the fields into the file.
    Thanks
    GB

    Thanks Steve,
    I have the UTL_FILE working fine now.
    I have other queries to run and conditions to apply in the same procedure, and I need to schedule via Enterprise Manager, therefore using UTL_FILE in a procedure seemed the best option. I looked up Data-pump but this seems to be an 11g feature, and we are still on 10g therefore I will not be able to use it.
    Thanks for your help.
    GB

  • How to read a specific value or a portion of text using utl_file.

    hi,
    I have a small requirement which goes as follows. I have a text file which is a resultof the sql query and it contains 16 columns as PIPE delimited text . I am using the UTL_FILE package concept to read the data. In general when we use the UTL_FILE.GET_LINE we read the entire line of text. But i need to read the 10th column of the query or the PIPE delimited text .
    Please advice.
    My query goes something like this:
    declare
    f utl_file.file_type;
    s long;
    c number := 0;
    begin
    f := utl_file.fopen('ABC_EXTRACTS','sample1.txt','R');
    loop
    utl_file.get_line(f,s);
    insert into s values (s);
    c := c + 1;
    end loop;
    exception
    when NO_DATA_FOUND then
    utl_file.fclose(f);
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;

    Why don't you use varchar2 instead of long data type. I doubt you can read a portion from a file using utl_file but after doing the fetch you can do substring over the varchar2 variable and retrieve just the 10th column.
    sample sql:
    If your DB is 10g or higher, you can use the below regular expression to retrieve value based on your need.
    PRAZY@11gR1> select regexp_substr('111|222|333|444|555|666|777|888|999|000|aaa|bbb|','[^|]+',1,10) from dual;
    REG
    000
    Elapsed: 00:00:00.00Btwn, if the text file has fixed number of columns at all time, why don't you use a external table instead?
    Regards,
    Prazy
    Edited by: Prazy on Mar 22, 2010 4:11 PM

  • Issue while accessing a file using UTL_FILE

    Hi,
    My requirement is to check for the existence of a file in the file system(apps tier) and then launch a conc program to load the data.
    There is a separate DB tier.
    I am trying to use UTL_FILE.fopen to indirectly see if the file exists
    and then proceed and I am trying to use UTL_FILE.fopen for that.
    The file is placed in the apps tier. I have created a directory in the database with the path and using that in the UTL_FILE.FOPEN call.
    However I am getting the following error. ORA-29283 - An attempt was made to read from a file or directory that does not exist, or file or directory access was denied by the operating system.
    What could be the issue here? Is there anything that I need to do after creating the directory?.
    Thanks,
    Balaji

    /Pl post details of OS, database and EBS versions.
    Are the Apps and DB servers physically separate ? If so, the directory on the Apps server where the file resides will have to be visible/updateable to the DB server in order for UTL_FILE to be able to read/write to it.
    HTH
    Srini/
    The apps and db servers are separate. EBS version is 11.5.10.2 and the OS is unix.
    How do I make the directory in apps server visible/updateable to the DB server?. I have created a directory in the database with the location of the file in apps tier.
    Thanks for your quick reply
    Regards
    Balaji

  • Using UTL_FILE in NT with network drive

    I want to use utl_file for file handling and try to use util_file.fopen for opening file from a mapping network drive (say F with error "Invalid Operation".
    I've got no error when I handling file in local drive.
    Can anyone help ?
    Rgds,
    Edward
    (ps I've already set the parameter utl_file_dir=*)
    null

    Hello,
    In december an Edward TSE had a same kind of problem. I replied to him the following solution after which I was helped.
    Instead of using:
    declare
    fh_lis utl_file.file_type;
    begin
    fh_lis := utl_file.fopen(
    location => '\\caghk8\vtfp2\transfer\',
    filename => 'tpx.txt',
    open_mode => 'r');
    utl_file.fclose(fh_lis);
    end;
    Use:
    declare
    fh_lis utl_file.file_type;
    begin
    fh_lis := utl_file.fopen('\\caghk8\vtfp2\transfer\', 'tpx.txt', 'r');
    utl_file.fclose(fh_lis);
    end;
    He said it worked!
    null

  • How to append a character using UTL_FILE pkg

    A table with student_id, student_name and date_of_join.
    create table student(std_id varchar2(10),std_name varchar2(20),std_doj date);I am loading the data from the below flat file using UTL_FILE package
    101   ron   04081999
    101   ron   01081996
    102   ram   05082000
    102   ram   12101999
    103   fin   06082001
    104   gin   07082002
    105   gem   08082003I am using a procedure to load the data into table using UTL_FILE package
    Students with id's 101 & 102 have two joining dates as they have registered for two courses. In flat file there is no change in std_id but I have to append a character "C" to those who have registered for the second course.
    I have to append a character to std_id column. for eg: After loading the result what I am expecting is
    std_id          std_name          std_doj
    101          ron               04081999
    101C          ron               01081996
    102          ram               05082000
    102C          ram               12101999
    103            fin                06082001
    104             gin               07082002
    105             gem               08082003          Can you please give me an idea on how to get the above result using UTL_PACKAGE in the procedure?

    It has nothing to do with UTL_FILE. In your load procedure you are looping through the file line by line, right? SO you need to :
    DECLARE
        prev_std_id number;
    BEGIN
        LOOP
          read a line
          parse it into std_id, std_name and std_doj
          IF std_id = prev_std_id
            THEN
              std_id := std_id  || 'C';
            ELSE
              prev_std_id := std_id;
          END IF;
          insert row
        END LOOP;
    END;SY.

  • Spooling large data using UTL_FILE

    Hi Everybody!
    While spooling out data into a file using UTL_FILE package I am unable spool the data The column data has a size of 2531 characters
    The column 'source_where_clause_text' has very large data.
    Its not giving any error but the external table is not returning and data
    Following is the code.
    CREATE OR REPLACE PROCEDURE transformation_utl_file AS
    CURSOR c1 IS
    select transformation_nme,source_where_clause_text
    from utility.data_transformation where transformation_nme='product_closing';
    v_fh UTL_FILE.file_type;
    BEGIN
    v_fh := UTL_FILE.fopen('UTLFILELOAD', 'transformation_data.dat', 'w', 32000);--132767
    FOR ci IN c1
    LOOP
    UTL_FILE.put_line( v_fh, ci.transformation_nme ||'~'|| ci.source_where_clause_text);
    -- UTL_FILE.put_line( v_fh, ci.system_id ||'~'||ci.system_nme ||'~'|| ci.system_desc ||'~'|| ci.date_stamp);
    END LOOP;
    UTL_FILE.fclose( v_fh );
    exception
    when utl_file.invalid_path then dbms_output.put_line('Invalid Path');
    END;
    select length(
    '(select to_char(b.system_id) || to_date(a.period_start_date,''dd-mon-yyyy'') view_key, b.system_id, to_date(a.period_start_date,''dd-mon-yyyy'') period_start_date, to_date(a.period_end_date,''dd-mon-yyyy'') period_end_date, to_date(a.clos
    ing_date,''dd-mon-yyyy'') closing_date from ((select decode(certification_type_code, ''A'', ''IDESK_PRODUCTS_PIPELINE'',''C'', ''IDESK_PRODUCTS_COMMITMENT_LINKAGE'') system_nme, to_char(to_date(''01'' || lpad(trim(to_char(certification_as_of_month_yr)),6,''0''),''ddmmyy
    yy''),''dd-mon-yyyy'') period_start_date, to_char(last_day(to_date(''12'' || lpad(trim(to_char(certification_as_of_month_yr)),6,''0''),''ddmmyyyy'')),''dd-mon-yyyy'') period_end_date, to_char(trunc(certification_datetime_stamp), ''dd-mon-yyyy'') closing_date from odsu
    pload.prod_monthly_certification where certification_type_code in (''A'',''C'') minus select trim(system_nme), to_char(period_start_date, ''dd-mon-yyyy''), to_char(period_end_date, ''dd-mon-yyyy''), to_char(closing_date, ''dd-mon-yyyy'') from utility.system_closing
    statusv where system_nme in (''IDESK_PRODUCTS_PIPELINE'', ''IDESK_PRODUCTS_COMMITMENT_LINKAGE'')) union all (select ''BMS Commitment Link'' system_nme, to_char(to_date(''01'' || lpad(trim(to_char(certification_as_of_month_yr)),6,''0''),''ddmmyyyy''),''dd-mon-yyyy'')
    period_start_date, to_char(last_day(to_date(''12'' || lpad(trim(to_char(certification_as_of_month_yr)),6,''0''),''ddmmyyyy'')),''dd-mon-yyyy'') period_end_date, to_char(trunc(certification_datetime_stamp), ''dd-mon-yyyy'') closing_date from odsupload.prod_monthly_c
    ertification where certification_type_code = ''C'' minus select trim(system_nme), to_char(period_start_date, ''dd-mon-yyyy''), to_char(period_end_date, ''dd-mon-yyyy''), to_char(closing_date, ''dd-mon-yyyy'') from utility.system_closing_status_v where system_nme
    = ''BMS Commitment Link'') union all (select ''BMS'' system_nme, to_char(to_date(''01'' || lpad(trim(to_char(certification_as_of_month_yr)),6,''0''),''ddmmyyyy''),''dd-mon-yyyy'') period_start_date, to_char(last_day(to_date(''12'' || lpad(trim(to_char(certification_as_
    of_month_yr)),6,''0''),''ddmmyyyy'')),''dd-mon-yyyy'') period_end_date, to_char(trunc(certification_datetime_stamp), ''dd-mon-yyyy'') closing_date from odsupload.prod_monthly_certification where certification_type_code = ''A'' minus select trim(system_nme), to_char
    (period_start_date, ''dd-mon-yyyy''), to_char(period_end_date, ''dd-mon-yyyy''), to_char(closing_date, ''dd-mon-yyyy'') from utility.system_closing_status_v where system_nme = ''BMS'')) a, utility.system_v b where a.system_nme = b.system_nme)') length1
    from dual
    --2531
    begin
    SSUBRAMANIAN.transformation_utl_file;
    end;
    create table transformation_utl
    TRANSFORMATION_NME VARCHAR2(40),
    SOURCE_WHERE_CLAUSE_TEXT VARCHAR2(4000)
    ORGANIZATION external
    type oracle_loader
    default directory UTLFILELOAD
    ACCESS PARAMETERS
    records delimited by newline CHARACTERSET US7ASCII
    BADFILE UTLFILELOAD:'transformation.bad'
    LOGFILE UTLFILELOAD:'transformation.log'
    fields TERMINATED by "~"
    LOCATION ('transformation_data.dat')
    ) REJECT LIMIT UNLIMITED
    select * from transformation_utl

    after running the procedure, did you verify that the file 'transformation_data.dat' has data? open it, make sure it's correct. maybe it has no data, and that's why the external table doesn't show anything.
    also, check the LOG and BAD files after selecting from the external table. maybe they have ERRORS in them (or all the data is going to BAD because you defined something wrong).

  • Problem with flash on IE11 after using adobe cleaner

    Problem with flash on IE11 after using adobe cleaner to remove a trial version of photoshop because there was not any entry on add/remove applications in windows 8.1
    Its to frustrating to reinstall everything. I tried everything from your support page with no luck…

    Link for Download & Install & Setup & Activation problems may help
    -Online Chat http://www.adobe.com/support/download-install/supportinfo/

  • My MacBook screen is stuck in "presentation" mode after using my "Mini DisplayPort to VGA Adapter." How can I fix this?

    My MacBook screen is stuck in "presentation" mode (I don't know the correct term) after using my Apple Mini DisplayPort to VGA Adapter - meaning the screen fonts and windows are larger than usual. How can I fix this? I've changed the display settings to modify it a little, but it still doesn't look right. I reinserted the adapter numerous times and restarted my computer, it still hasn't worked. Help!

    Reset PRAM.  http://support.apple.com/kb/PH4405
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the appropriate method.
    "Resetting SMC on portables with a battery you should not remove on your own".
    Best.

  • Lose airport connection after using boot camp and windows XP

    After using windows XP on boot camp and shutting down windows and booting to Mac OS 10.5.7 I lose the airport connection and have to restart or reset my airport extreme base station. My imac 2.8 is connected to airport via ethernet. Air port is operating on 5.7 version. This is a recent development and suspect it is related to updates in windows. I do not know where to start but need to solve this problem as it interrupts the other computers on wireless. Thanks Carl

    I have solved problem. It was in the windows settings using airport rather than ethernet connection. Carl

  • Mac is not connecting to TV after using Mini DisplayPort to HDMI Adapter Cable?

    Macbook Pro is not connecting to TV after using Mini DisplayPort to HDMI Adapter Cable. 2010 Macbook Pro, just purchased Mini DisplayPort to HDMI Adapter Cable from Amazon. Link here: http://www.amazon.com/Mini_Dis-HDMI-CB6-Mini-DisplayPort-Adapter-Cable/dp/B003OC 6LWM/ref=sr_1_2?ie=UTF8&qid=1406238976&sr=8-2&keywords=mac+to+tv --When i connect both ends of the cable to the TV and to the laptop, the screen will blink, but then afterwards it will not mirror on the TV. I have tried going to display setting but cannot find the arrangements tab. When i searched "arrangements" a message said, "The Arrangement tab of Displays preferences is hidden because you only have a single display attached to this computer." Not sure how to fix this problem. I have connected this laptop to a TV before, but with a different cable other than the one i just purchased. Any help would be greatly appreciated, thanks.

    Found the fix.  Still don't know if it was Windows, iTunes, or Norton 360, but this worked immediately for me:
    +++++++++++++++++
    edgravel
    Re: iTunes Store Won't Load, Won't Show Error Message
       Aug 13, 2011 4:32 PM    (in response to Daedalme) 
    I found a solution posted from Rodfromnework for PC users. It worked for me and easy to do.
    Start --> Programs --> Accessories (Right Click on Command Prompt) --> Run as Administrator
    then type in:
    Netsh winsock reset
    Hit enter, restart PC, open iTunes, go to Store
    Hope it works for you too. 

  • Aperture 2.0 Activation Key does not work after using older trial version

    I was using the installed trial version of Aperture 1.5+ in my recently purchased MacBook Pro Duo (December 2007). After using the trial version for 30 days I debated whether to take the plunge ...and then within a few days recieved word that v2.0 was out at 199$. That motivated me ...however, here I am nearly one week later without ability to activate a full blown version of 2.0.
    I recieved the activation key, but it doesn't accept it in the dialog to upgrade in the trial version. Hint seems to be that it is not a serial number I am entering but an activation key.
    I did not order a boxed version, so what do I do now? Support is not too helpful as I have searched Apple's website and have no clue as to where to go.
    Last resort ... I want my $199 back!

    did you download the trial for Aperture 2

  • My classic video ipod won't switch back to regular video mode after using it on an elliptical. The port still allows me to charge and works on the elliptical and treadmill but it will no longer change modes to allow me to watch my shows on the ipod screen

    My classic video ipod won't switch back to regular video mode after using it on an elliptical. The port still allows me to charge and works on the elliptical and treadmill but it will no longer change modes to allow me to watch my shows on the ipod screen

    From the iPod's Main Menu choose Videos -> Settings and make sure TV Out is set to Off.
    Otherwise, try a hard reset as well.  To do this, press and hold both the Select (Center) and Menu buttons together long enough for the Apple logo to appear.
    B-rock

  • Several Apps seem to just mysteriously shut down after using for a while. Same with Safari, I will be using Safari and it shuts down. Face book too. I've reset and shut down my iPad 3 and restart it, but it stills shuts down. What to do?

    Several Apps seem to mysteriously shut down after using them for a while. Face Book shuts down , netflix, Safari, and other Apps. They work fine for a short while, or a long while, and then shut down and it brings me to my regular desktop screen. I've tried restarting by completely shutting down the IPad until I see the apple pic and turned it back on, but the shutdowns of apps continue. Anyone else have this issue? It generally started shortly after downloading and installing IOS 7......

    Hi jennyoutwest,
    Welcome to the Support Communities!
    The following articles will provide some troubleshooting steps for your iPhone.
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If that does not resolve the issue, refer to page 146 in the iPhone User Guide to Reset All Settings:
    iPhone User Guide for iOS 7
    manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    The final troubleshooting step would be to restore your device:
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition. Before restoring:
    Verify that you are using the latest version of iTunes.
    Back up your device.
    Transfer and sync content to your computer.
    Cheers,
    - Judy

  • Aperture 3 keeps crashing on me, consistently. More frequently after using Burn tool or skin smoothing - and even more often when I feather. What can I do? I already upgraded my RAM. I'm at a loss!

    Aperture 3 keeps crashing on me, consistently. More frequently after using Burn tool or skin smoothing - and even more often when I feather. What can I do? I already upgraded my RAM. I'm at a loss!

    4) When my computer crashes, once it starts again, it says "repairing" ... but I am not familiar with reparing permissions -- can you explain how I might do that?
    If you are running OS X Lion, then you can restart your computer and then press and hold the 'Option' key immediately after you hear the start up 'gong' (usually heard when grey screen shows as it restarts).
    You should see at least two Disks to choose from. Choose 'Recovery Disk' and wait for it to load, then choose 'Disk Utility' option in the Utilities dialog.
    Once Disk Utility loads, do the following:
    1 - In the left hand pane, choose your system partition (usually called either 'Macintosh HD' or 'Macintosh SSD'). Note - don't choose the actual hard drive listed above the partition when using Disk Utility in OS X Lion as this doesn't offer options for repairing due to it including the Recovery Disk you have loaded in memory.
    2 - Click the 'First Aid' tab
    3 - Click the 'Repair Disk Permissions' button in lower portion of main pane and allow to complete. Ideally, you will get a final message in main pane saying Disk Permissions are repaired.
    4 - At lower right of same pane, click the 'Repair Disk' button and allow to complete. Ideally, you will get a final message indicating that Disk Repair is completed and all appears to be good.
    5 - Quit Disk Utility > Close Utilities dialog window > Click 'Restart' button (confirm as needed).
    You should boot straight into the system partition when complete.
    Note - any red text in the main pane text while running the repairs will be issues and you will need to follow the advice given or post back.
    If you are running Snow Leopard; then (as David mentions) boot from your first OS X reinstall disc and run the Disk Utility the same way; except you select the actual hard drive listed at top of left pane (not the partition below it). This is because Snow Leopard does not use a 'Recovery Disk' partition and repairs can be run on the HD or SSD itself.
    Hope that helps.

Maybe you are looking for