SQL*Loader -- loading EBCDIC-DB2[as400] packed decimals

Hi,
We have a flat file that we are trying to load into Oracle [tried version 8.1.7.0.0 and 9.2.0.1.0]. The flat file is a direct physical ftp from an AS400/DB2 and has a number of packed decimal fields and comes down in EBCDIC.
LOAD DATA
CHARACTERSET 'WE8EBCDIC500'
INTO TABLE asciitest
COL1 position (01:03) DECIMAL(4,0),
COL2 position (04:12) CHAR,
COL3 position (13:21) CHAR,
COL4 position (22:26) DECIMAL (9,2),
COL5 position (27:29) CHAR
with this script i am able to parse the CHAR data successfully however the packed decimal never work. They do get inserted into the fields but the when u select * from asciitest you get non-sensical results (ie characters instead of digits)
I've read some documents on SQL_Loader and it lead to me to beleive that it would be able to handle these numbers. Am I wrong? Is there anyway this can be done (with out 3rd party software)??

Thanks damorgan but I have tried some of these before. The logic of converting the packed fields to zoned decimals and then further is not implemented using oracle which I am looking out for.
RR

Similar Messages

  • Essbase substitution variable used for SQL Dimension load-URGENT

    Hi All,
    I am creating one dimension through SQL Dimension load rule writing by parent child build rule. The SQL query is like below---
    distinct trim(dist_mobile),trim(ret_mobile) from dist_retailer al1 where al1.proc_dt=to_date(&Proc_date,'dd/mm/yyyy')
    When I fixed the value of proc_date (e.g.- '27/09/2008') then it is retrieving data properly, but when I try to make the same as a essbase variable as shown above (to give user the priviledge to select for which date data will be fetched from RDBMS to create the dim) and after setting the aforesaid value of that variable in essbase subs var screen and click 'OK/Retrieve' in rule,it is returning no rows executing the query as well as no error coming.
    I guess in query nothing is wrong but the subs variable part is not working. Can anybody please give some insight to resolve the problem.
    In this context, I would like to mention that I will have to use substitution variable in some other rule file also to automate the load process. How can I use essbase subs variable in SQL load rule? Could you please show me a proper summarise query illustrating how to use the subs var in aforesaid purpose for the sake of understanding?
    Thanks in advance.

    Hi,
    Sorry for delayed response. Appreciate your inputs. At last I have found out the solution which is as below----
    distinct trim(dist_mobile),trim(ret_mobile) from dist_retailer al1 where al1.proc_dt=to_date('&Proc_Dt','dd/mm/yyyy')
    after setting the substitution variable as Proc_Dt and set the value as 27/09/2008 (without any quotation mark or such sign) now I checked and now it is retrieving fine.
    Thanks & Regards.

  • SQL loader load data very slow...

    Hi,
    On my production server have issue of insert. Regular SQL loder load file, it take more time for insert the data in database.
    First 2 and 3 hours one file take 8 to 10 seconds after that it take 5 minutes.
    As per my understanding OS I/O is very slow, First 3 hours DB buffer is free and insert data in buffer normal.
    But when buffer is fill then going for buffer waits and then insert is slow on. If it rite please tell me how to increase I/O.
    Some analysis share here of My server...................
    [root@myserver ~]# iostat
    Linux 2.6.18-194.el5 (myserver) 06/01/2012
    avg-cpu: %user %nice %system %iowait %steal %idle
    3.34 0.00 0.83 6.66 0.00 89.17
    Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
    sda 107.56 2544.64 3140.34 8084953177 9977627424
    sda1 0.00 0.65 0.00 2074066 16
    sda2 21.57 220.59 1833.98 700856482 5827014296
    sda3 0.00 0.00 0.00 12787 5960
    sda4 0.00 0.00 0.00 8 0
    sda5 0.69 2.75 15.07 8739194 47874000
    sda6 0.05 0.00 0.55 5322 1736264
    sda7 0.00 0.00 0.00 2915 16
    sda8 0.50 9.03 5.24 28695700 16642584
    sda9 0.51 0.36 24.81 1128290 78829224
    sda10 0.52 0.00 5.98 9965 19004088
    sda11 83.71 2311.26 1254.71 7343426336 3986520976
    [root@myserver ~]# hdparm -tT /dev/sda11
    /dev/sda11:
    Timing cached reads: 10708 MB in 2.00 seconds = 5359.23 MB/sec
    Timing buffered disk reads: 540 MB in 3.00 seconds = 179.89 MB/sec
    [root@myserver ~]# sar -u -o datafile 1 6
    Linux 2.6.18-194.el5 (mca-webreporting2) 06/01/2012
    09:57:19 AM CPU %user %nice %system %iowait %steal %idle
    09:57:20 AM all 6.97 0.00 1.87 16.31 0.00 74.84
    09:57:21 AM all 6.74 0.00 1.25 17.48 0.00 74.53
    09:57:22 AM all 7.01 0.00 1.75 16.27 0.00 74.97
    09:57:23 AM all 6.75 0.00 1.12 13.88 0.00 78.25
    09:57:24 AM all 6.98 0.00 1.37 16.83 0.00 74.81
    09:57:25 AM all 6.49 0.00 1.25 14.61 0.00 77.65
    Average: all 6.82 0.00 1.44 15.90 0.00 75.84
    [root@myserver ~]# sar -u -o datafile 1 6
    Linux 2.6.18-194.el5 (mca-webreporting2) 06/01/2012
    09:57:19 AM CPU %user %nice %system %iowait %steal %idle
    mca-webreporting2;601;2012-05-27 16:30:01 UTC;2.54;1510.94;3581.85;0.00
    mca-webreporting2;600;2012-05-27 16:40:01 UTC;2.45;1442.78;3883.47;0.04
    mca-webreporting2;599;2012-05-27 16:50:01 UTC;2.44;1466.72;3893.10;0.04
    mca-webreporting2;600;2012-05-27 17:00:01 UTC;2.30;1394.43;3546.26;0.00
    mca-webreporting2;600;2012-05-27 17:10:01 UTC;3.15;1529.72;3978.27;0.04
    mca-webreporting2;601;2012-05-27 17:20:01 UTC;9.83;1268.76;3823.63;0.04
    mca-webreporting2;600;2012-05-27 17:30:01 UTC;32.71;1277.93;3495.32;0.00
    mca-webreporting2;600;2012-05-27 17:40:01 UTC;1.96;1213.10;3845.75;0.04
    mca-webreporting2;600;2012-05-27 17:50:01 UTC;1.89;1247.98;3834.94;0.04
    mca-webreporting2;600;2012-05-27 18:00:01 UTC;2.24;1184.72;3486.10;0.00
    mca-webreporting2;600;2012-05-27 18:10:01 UTC;18.68;1320.73;4088.14;0.18
    mca-webreporting2;600;2012-05-27 18:20:01 UTC;1.82;1137.28;3784.99;0.04
    [root@myserver ~]# vmstat
    procs -----------memory---------- -swap -----io---- system -----cpu------
    r b swpd free buff cache si so bi bo in cs us sy id wa st
    0 1 182356 499444 135348 13801492 0 0 3488 247 0 0 5 2 89 4 0
    [root@myserver ~]# dstat -D sda
    ----total-cpu-usage---- dsk/sda -net/total- -paging -system
    usr sys idl wai hiq siq| read writ| recv send| in out | int csw
    3 1 89 7 0 0|1240k 1544k| 0 0 | 1.9B 1B|2905 6646
    8 1 77 14 0 1|4096B 3616k| 433k 2828B| 0 0 |3347 16k
    10 2 77 12 0 0| 0 1520k| 466k 1332B| 0 0 |3064 15k
    8 2 77 12 0 0| 0 2060k| 395k 1458B| 0 0 |3093 14k
    8 1 78 12 0 0| 0 1688k| 428k 1460B| 0 0 |3260 15k
    8 1 78 12 0 0| 0 1712k| 461k 1822B| 0 0 |3390 15k
    7 1 78 13 0 0|4096B 6372k| 449k 1950B| 0 0 |3322 15k
    AWR sheet output
    Wait Events
    ordered by wait time desc, waits desc (idle events last)
    Event Waits %Time -outs Total Wait Time (s) Avg wait (ms) Waits /txn
    free buffer waits 1,591,125 99.95 19,814 12 129.53
    log file parallel write 31,668 0.00 1,413 45 2.58
    buffer busy waits 846 77.07 653 772 0.07
    control file parallel write 10,166 0.00 636 63 0.83
    log file sync 11,301 0.00 565 50 0.92
    write complete waits 218 94.95 208 955 0.02
    SQL> select 'free in buffer (NOT_DIRTY)',round((( select count(DIRTY) N_D from v$bh where DIRTY='N')*100)/(select count(*) from v$bh),2)||'%' DIRTY_PERCENT from dual
    union
    2 3 select 'keep in buffer (YES_DIRTY)',round((( select count(DIRTY) N_D from v$bh where DIRTY='Y')*100)/(select count(*) from v$bh),2)||'%' DIRTY_PERCENT from dual;
    'FREEINBUFFER(NOT_DIRTY)' DIRTY_PERCENT
    free in buffer (NOT_DIRTY) 10.71%
    keep in buffer (YES_DIRTY) 89.29%
    Rag....

    1)
    Yah This is partition table and on it Local partition index.
    SQL> desc GR_CORE_LOGGING
    Name Null? Type
    APPLICATIONID VARCHAR2(20)
    SERVICEID VARCHAR2(25)
    ENTERPRISENAME VARCHAR2(25)
    MSISDN VARCHAR2(15)
    STATE VARCHAR2(15)
    FROMTIME VARCHAR2(25)
    TOTIME VARCHAR2(25)
    CAMP_ID VARCHAR2(50)
    TRANSID VARCHAR2(25)
    MSI_INDEX NUMBER
    SQL> select index_name,column_name from user_ind_columns where table_name='GR_CORE_LOGGING';
    INDEX_NAME
    COLUMN_NAME
    GR_CORE_LOGGING_IND
    MSISDN
    2) I was try direct but after that i was drop this table and again create new partition table and create fresh index. but still same issue.

  • ORA-06520: PL/SQL: Error loading external library

    Hi
    I am trying to use an external C program from sql using following steps.
    copy the dll in dir ORACLE/806/BIN
    create or replace library outs as
    'e$/ORACLE/806/BIN/SmlCrcChecking.dll'
    create or replace FUNCTION plsCheck_File_CRC (fname Varchar2)
    return boolean
    AS LANGUAGE C
    library outs
    name "Check_File_CRC";
    and call the dll using
    select plsCheck_File_CRC('c:\mttest.txt') from dual;
    The dll is notc alled the message is
    ERROR at line 1:
    ORA-06520: PL/SQL: Error loading external library
    ORA-06522: Unable to load DLL
    Please help
    Prashant

    I am trying to create a Pl/SQL test env using
    create or replace procedure file_test
    (fname in varchar2,
    status out number)
    is
    begin
    If Check_File_CRC (fname) then
    status:=0;
    else
    status:=1;
    end if;
    end;
    However the following errros are displayed
    Errors for PROCEDURE FILE_TEST
    6/1 PL/SQL: Statement ignored
    6/4 PLS-00382: expression is of wrong type
    mY TNSNAMES.ORA contains following
    additions
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA = (SID = PLSExtProc)(PRESENTATION = RO))
    extproc_connection_data.world =
    (DESCRIPTION =
    (ADDRESS =
    (PROTOCOL = IPC)
    (KEY = extproc))
    (CONNECT_DATA =
    (SID = extproc)
    AND LISTNER.ORA
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = D:\oracle\ora81)
    (PROGRAM = extproc)
    Message was edited by:
    prashant13

  • Performance issue loading data out of AS400

    Hi,
    For loading data out of AS400, I have created a view containing a join between three AS400 tables connected with a database link (And some more changes in the file tnsnames.ora and the listener. Hell of a job with Oracle, but it works finally)
    When I use the tool Toad, the results of this query will be shown in about 20 seconds.
    When I use this view in OWB to load this data into a target table, then the load takes about 15 MINUTES!
    Why is this so slow?
    Do I have to configure something in OWB to make this load faster?
    Other loads when I'm using views (to Oracle tables) to load data are running fast.
    It seems that Oracle does internally more dan just running the view.
    Who knows?
    Regards,
    Maurice

    Maurice,
    OWB generates optimized code based on whether sources are local or remote. With remote sources, Warehouse Builder will generate code that uses inline views in order to minimize network traffic.
    In your case, you confuse the generation by creating a view that does some remote/local joins telling OWB that the object is local (which is only partly true).
    Perhaps what you could do is create one-to-one views and leave it up to OWB to join the objects. One additional advantage you gain with this approach is that you can keep track of the impact analysis based on your source tables rather than views that are based on the tables with flat text queries.
    Mark.

  • Exel to SQL DFTask loads some Null records

    I have an SSIS package to import Excel data into SQL. When I look at Excel I dont see ANY Null rows. However when I run the SSIS package and check SQL, It loads some NULL RECORDS IN SQL. WHy is that It loads Null records in SQL, When i cannot see the Null
    recs In Excel?

    That's because the person who created the Excel file and added the data to it pressed the "Enter" key on some of the empty cells under that specific column. In excel, such a row might look like any other empty, non-data row but for SSIS, its an
    actual data row except that it doesn't have any value. SSIS treats a missing data value as a DBNULL and that's what you saw.
    There are multiple ways of fixing this. 
    1. Educate the creator of the excel to be more careful at the time of data entry.
    2. Make that target column in the DB table as NOT NULL. 
    3. Handle such "empty" data values as exception inside your SSIS (using a data flow task and ignoring such rows).
    4. Switch to using CSV file format instead of excel format.
    5. All of the above :)
    Hope this helps.
    Cheers!
    Muqadder.

  • Converting ASCII to EBCDIC and Packed Decimals as well

    Hi All,
    We have a requirement where data from a SAP system comes in ASCII format as  a flat file.PI needs to encode 4 fields in the packed decimals and rest of the fields in EBCDIC format before sending to mainframe system.
    When I use code page cp500 at the reciever file adapter level it encodes the entire file in EBCDIC format.
    However we want those 4 fields to be in packed decimals while sending to mainframe system.
    Could you please help me in figuring out a solution?
    Thanks,
    Sowmya

    Hi Sowmya
    Check this thread
    ASCII to EBCDIC packed decimal

  • Pull the data from Azure sql and load into the on premises data base

    Hi friends,
    I have small requirement here, I have to pull the data from Azure sql and load it to the on premises data base.
    I am using Azure sync process to do that, but it will take so much time to do that..
    I know that azure have some limitations, is there any other way to do this..
    Please help me on this...

    Hello,
    Check the program...
    SAPBC480_DEMO.
    Check the below threads
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/88e7ea34-0501-0010-95b0-ed14cfbeb85a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bfbcd790-0201-0010-679d-e36a3c6b89fa
    Thanks
    Seshu

  • SQL UN loader ????

    Hi there
    Does anyone know of a SQL UN Loader, that can be run on the client?
    Getting data out of oracle into ie CSV, TXT files, BLOBS-> files etc?
    The very opposite of SQL Loader in fact?
    Mette
    PS I know that we can all just write sql*plus scrips, java, c# applications - but a more generic version would be nice - and maybe someone out there knows of one appl. like that

    HI
    Michaels2: I found a reference to lob.zip on the website you referenced: [http://www.dbatools.net/mytools/unload_upload_oracle_lobs.html] and this solves 50% of our problems. Thanks a lot - this is a cmd prompt tool, which we can automate with the job sceduler from any client. Great ! I also downloaded and have done a little test of the ociuldr - and it works just a perfectly - and even creating SQL Loader statements for the other way sa well. Thank you very much for this info. Now its gonne be a nice weekend after all .....
    Others: We dont have - and never will get - access to the server at file level, so the solution above is very nice and just what I was looking for. We do have Enterprise Edition, java etc etc etc enabled - but with no rights to access server this does not get us very far. Thats why we are looking for a reversed "SQL Loader" :-)
    regards
    Mette
    Edited by: mettemusens on 2009-02-06 14:33

  • Thanks to WL team for DB2/AS400 driver

    Thanks to WL team for DB2/AS400 driver.
    With IBM driver we should wait 7 minutes to load 7000+ records.
    We had big problem with our customers.
    Now it - few seconds.
    Thanks,
    Oleg.

    Hello,
    I am not talking about the XI timeouts. But the timeouts which can be used to get the connection timeouts for DB2/AS400 databases.
    So please provide that information.
    THanks,
    soorya

  • Error when connecting to DB2/AS400 as a Datasource

    Hi All,
    I have an issue when connecting to DB2/AS400 as w datasource with IR studio. I am able to create an OCE but when click on tables it throws an error saying ""INFORMATIC.DM3601PF" is an undefined name. SQLSTATEB704
    sqlstate = 42S02
    The drivers I used is the drivers provided by the IBM DB2 and also the Merant drivers provided for Hyperion by DB2. I used ODBC/DB2, ODBC/ODBC, ODBC/AS400 connection while creating an OCE but it did not help.
    The exact version of the database is DB V5R4--AS400--OS. It is a 64 bit client.
    Can anyone help!!!
    Thanks,
    Sree

    Hi,
    Connecting Hyperion with DB2 is simple. When we install DB2 client on the machine it adds a new entry in ODBC drivers, using that DB2 Driver create a system DSN by selecting the appropriate DB. Give the proper credentials.
    Now open Hyperion IR select new Database option...Select ODBC/DB2 and choose the DSN name given by you while creating the system DSN. give the correct credentials to connect to DB.
    After that it will ask for OCE creation...just create oce by giving app name and you are done with the connection.

  • Limitation of BitmapData loaded into memory through Loader.load()

    I am creating a photo gallery using Loader.load() to load
    pictures into Flash Player 9. I plan to make them preloaded in
    advance so when the users turn the page they can see the pic on the
    new page right away without waiting. So the pics are loaded one
    after another automatically on backend. When users request a new
    page, the bitmap object are simply added onto the page’s
    display list.
    I publish the code and test on IE 6 and Firefox 1.5. Only
    about 50 pics can be preloaded on FF and about 70 pics on IE. I
    read some articles talking about memory problem of Loader in Flash
    8.5 alpha. So is it still a problem for "Flash 9 Actionscript 3
    Preview Alpha" ? Check the article -
    http://www.jessewarden.com/archives/..._battlefi.html
    Please see attached my code for preloading job. No error is
    thrown.
    Please advise. Thank you very much

    Hi,
    if it's a IA report the limit of columns you can show at the same time is 100,
    check http://docs.oracle.com/cd/E17556_01/doc/user.40/e15517/limits.htm for more limnitations.
    Regards
    Bas

  • Common requirement_SSMA Runtime emulation components were not found on SQL Server, please check if Extension Pack is installed correctly

    Greetings,
    After the installation of the extension pack (local sql server and installed local) i get this warning:
    Common requirement SSMA Runtime emulation components were not found on SQL Server, please check if Extension Pack is installed correctly
    and
    Common requirement SSMA Synchronization components were not found on SQL Server, please check if Extension Pack is installed correctly.
    In the Program and Features Control panel the Feature "SSMA Extensionpack" (or similar) is installed and i see it in the startmenu.
    what's wrong here, any hints?

    Hi A. Bloise,
    Based on your description ,we need to verify that the type and version of SSMA Extension Pack. Assume that you install SSMA for Oracle Extension Pack, I recommend you check the following things.
    1. Make sure that the setup file of SSMA for Oracle Extension Pack is not corrupted. You can download it from
    Microsoft Download Center.
    2. Make sure that your computer meets the following requirements for the SSMA for Oracle Extension Pack.
        •SQL Server 2005 or higher.
        •Microsoft Windows Installer 3.1 or a later version.
        •Oracle Client 9.0 or a later version, and connectivity to the Oracle databases that you want to migrate.
        •The SQL Server Browser service must be running during installation.
    3. Make sure that  the account used to install the extension pack, is a member of the sysadmin server role on the instance of SQL Server.
    If this does not work, please contact with SSMA support team for further help:
    [email protected]
    Thanks,
    Lydia Zhang

  • Stall after Loader.load() any .png iOS7

    My app includes a script to load several .jpg or .png "slides".  I make an array and then load the first one, when its Event.COMPLETE fires, I load the next one.  I've found that when running on the iPad it will usually pause for a good 30-60 seconds immediately after I call Loader.load() if the file is a .png.  I say that it pauses because I don't even get the progess events to fire until it finally commences.  But then it seems to always recover, fires the progress events and finally the Event.COMPLETE.  It only happens on the device--not the "test movie" similator.  Using AIR 3.9.0.960 in Flash CS6.
    Any ideas?  I can make a simple example that demonstrates the problem if need be.

    Hi,
    Thanks for reporting the problem. Could you please answer following?
    Is this specific to iOS7?
    Is this specific to any particular iOS device type? iPhone or iPad?
    Does this happen only on 3.9 builds or you've encountered this on older versions (3.8?) of AIR SDK as well?
    We request you to file a bug on bugbase.adobe.com with a sample set of files which demonstrate the problem. Also, please report back the bug number here on the forum.
    -Thanks
    Pahup

  • Loading external swf using Loader.load() method is delayed with flash player 10.1 and next versions.

    I am trying to load an external swf file of size 300 kb using Loader.load() method and trying to access some objects in it and i am getting some delay in loading the external file with flash players 10.1 and next versions.
    The action script code used to load:
    var strUrl:String="toLoad.swf";
    var urlReq:URLRequest=new URLRequest(strUrl);
    var ldrLoader:Loader = new Loader();
    var ldrLoaderContext:LoaderContext = new LoaderContext();
    ldrLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, externakSwfLoaded);
    ldrLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorInLoadingSwf);
    ldrLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorInLoadingSwf);
    ldrLoaderContext.applicationDomain = ApplicationDomain.currentDomain;
    ldrLoader.load(urlReq, ldrLoaderContext);
    addChild(ldrLoader);
    System specifications:
    O.S. Windows XP sp2 (32 bit)
    Browser IE 6.0 (128 bit)
    Flash Player version WIN 10,2,152,32

    I think you are lost. This forum is for ROME. It sounds like you want one of the Flash or Flex forums...
    Good luck!
    Harbs

Maybe you are looking for

  • Unable to get my Alphatrack working correctly in Adobe Audition CS6

    I am getting very frustrated with Adobe CS6 Audition, I cannot get my Alphatrack device to work properly. Also has anyone any experience of setting up Alphatrack as a Mackie device and how to setup button assignments Thanks

  • Can't find TutWD_FlightList_Init.zip

    Hello, I intend to do the tutorial : Creating a Web Dynpro Application Accessing ABAP Functions. To do so, I have to download the file TutWD_FlightList_Init.zip on the sdn.sap.com site. However I can't find this file. Do you know where I can find it

  • Update JScrollPane at runtime

    Hi, well my problem is that I have a few JTextFields and an empty JScrollPane, but when something happens (e.i. a JButton is pressed) the text in the JTextFields should be added to the JScrollPane, but instead of that only the text from the last JTex

  • Update Failed - AAM will not update my CC apps

    I have tried uninstalling, reinstalling, and just don't know what else to do. I've been trying to update my CC apps. It tells me everything is up to date which is not true at all. After Effects has a new update and it does not see it from the applica

  • Running ftp in java

    I am actually still working on how to call the ftp program in linux from a java application: And came up wif this: String s; try Runtime rt = Runtime.getRuntime(); Process p = rt.exec("ftp"); BufferedReader in = new BufferedReader(new InputStreamRead