Convert data from AS/400

When I make a query to AS/400 table, the character field appear in Hexa presentation, How can I translate that to human readable format?

You can retrieve data from your database, and then perform some convertions between datacodifications.
You can cast an int to a char to a String:
int vInt = 50;
char vChar = (char)vInt;
String vString = ""+vChar;
System.out.println("int=" + vInt + ", char=" + vChar + ", str=" + vString);
// output: int=50, char=2, str=2
All think that your stoed data are in the form of strings like "0x56" for hex 56, Integer.decode() are useful here.

Similar Messages

  • Need to convert  Date from calendar to String in the format dd-mom-yyyy

    Need to convert Date from calendar to String in the format dd-mom-yyyy+..
    This is absolutely necessary... any help plz..

    Look up the SimpleDateFormat class:
    Arwinder wrote:
    This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first:
    (Yes I know it's on JavaRanch but I think it applies everywhere)

  • How to convert date from "yyyymmdd" to "MM/DD/YYYY" format

    1. I have one BLDAT field in my internal table.
       its getting updated from input file.
    2. The value in the input file is like yyyymmdd.
       So the internal table field is filled like this
    3. After this,I have to compare this internal table  
       field with BSAD table.
    4. The BLDAT field in BSAD table is in the format of 
    5. the BLDAT field is having diff format in internal  table and BSAD table.So I am unable to check this value.
    How to convert it as like the BSAD table format."MM/DD/YYYY" format.
    Thanks in advance!!

    Using the WRITE statement
      data: gd_date(10).  "field to store output date
    * Converts date from 20020901 to 09.01.2002
      write sy-datum to gd_date mm/dd/yyyy.
    OR u can
    CONCATENATE gd_date+4(2) gd_date+6(2) gd_date+0(4)
    into gd_date seperated by '/' .
    Hope this helps.
    Kindly reward points and close the thread for the
    answer which helped u OR get back with queries.

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks. has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.

  • Convert data from internal table to XML file.

    Hi All,
    I am selecting data from database into one internal table.
    Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
    Kindly reply me ASAP.

    Check this link too -
    Re: Data Export in XML format
    XML files from ABAP programs

  • How can i convert data from DBF to oracle database 10g?

    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

  • Converting date from DD.MM.YYYY  to  YYYY - MM - DD  format

    Hi All,
    Can you give me a way to convert date from DD.MM.YYYY  to  YYYY - MM - DD  format. Actually frm tables i am getting date in DD.MM.YYYY format.  And i want to print it in YYYY-MM-DD format.
    Please reply.
    Thanks And Regards,
    Mayank Verma
    Moderator message - Please search before asking. Date formatting is one of the most common questions asked - post locked
    Edited by: Rob Burbank on Jul 6, 2009 10:42 AM

    Hey you can make use of offset  and concatenate statement to convert the date.
    Ankur Parab

  • Convert date from YYYYMMDD to DDMMYYYY

    Please help if anyone knows any function module to convert date from YYYYMMDD to DDMMYYYY format..
    Thanks in Advance,

    Simply do like this:
    DATA: datum TYPE char10.
    WRITE sy-datum TO datum <format option>.
    <format options>:
    DD/MM/YY and MM/DD/YY:
    Both additions have the same effect. The date output has a two-digit year value and a separator. The separator and the order are taken from the definition for date output in the user master record.
    Both additions have the same effect. The date output has a four-digit year value and separator. The separator and the order are taken from the definition for date output in the user master record.
    Both additions have the same effect. The date output has a two-digit year value and no separator. The order is taken from the definition for date output in the user master record.
    This addition provides a date output with a two-digit year value without a separator in the format YYMMDD.
    Valter Oliveira.

  • How to convert date from ccyymm format to mmddyy

    How to convert date from ccyymm format to mmddyy

    Please don't multipost. This question has been answered in your first post.
    How to convert date to ccyymm format

  • What is the fastest way to bulk load data from AS/400 to Oracle?

    I have been asked to move data from AS/400 to Oracle11gR2 as fast as ODI possibly can. Just straight mapping, no transformation, no joining.
    An ODI11g agent is started on the target Oracle machine but, being new to ODI, I only know how to use SQL to Oracle LKM to load to staging and then Oracle Incremental Update IKM to move from staging to target table.
    It took 50 minutes to move around 4 million records. I need to get this down to around 10 minutes. So guys, if there is a best practice to do this, please let me know, but right now I'll try any suggestion that you could think of.
    Thank you in advance.

    Create a new FILE dataserver - the put the IP address in the 'Host', complete the user and password fields. Create a new 'physical schema' - badly named I know as there is no such thing. The Physical schema 'Data Schema' would point to the directory that you require. /usr/etc/data/ for example. set your work as well.
    create a logical, link the two together via the context etc etc
    Basically the same as a db topology object. You can also refer this in the API OdiRef.getSchemaName() as you can with any other db logical.

  • I want to convert date from Microsoft Access to Oracle.

    I want to convert date from Microsoft Access to Oracle.
    My Oracel date format is 21-Jul-2004 02:24:09 AM
    I use sqlldr in Oracle 9i Database and I
    write control file
    load data
    infile 'test.txt'
    into table test
    fields terminated by "," optionally enclosed by '"'
    trailing nullcols
    data file 'test.txt' for input
    "dao","21-Jul-2004 02:24:09 AM"
    why did error? ORA-01843: not a valid month

    replace birthday with
    birthday "to_date(:birthday, 'DD-Mon-YYYY HH:MI:SS AM', 'NLS_LANGUAGE=''american''')"Of course, if your monthes are in German, then set the language to german (JUL=JUL but DEZ<>DEC)

  • ALE, use bd79 (converting data from sender to receiver to blank out fields)

    Hi, I am trying to blank four fields out in our FI IDOC for a certain business reason.  These fields must be blank (it is the FIDCC1 message type).   I am trying to use transaction bd79 (converting data from sender to receiver) maintain rules.  Is there a way to blank out these fields using a conversion rule?  I can change data fine but I cannot find a way to blank or null a field out.  Thanks in advance.

    You should have a look at the inbound function module (linked to your inbound process code). sometimes there are checks that if fields are initial that nothing will be changed.

  • What is the best way to load and convert data from a flat file?

    I want to load data from a flat file, convert dates, numbers and some fields with custom logic (e.g. 0,1 into N,Y) to the correct format.
    The rows where all to_number, to_date and custom conversions succeed should go into table STG_OK. If some conversion fails (due to an illegal format in the flat file), those rows (where the conversion raises some exception) should go into table STG_ERR.
    What is the best and easiest way to archive this?

    thanks for your answers so far!
    I gave them a thought and came up with two different alternatives:
    Alternative 1
    I load the data from the flat file into a staging table using sqlldr. I convert the data to the target format using sqlldr expressions.
    The columns of the staging table have the target format (date, number).
    The rows that cannot be loaded go into a bad file. I manually load the data from the bad file (without any conversion) into the error table.
    Alternative 2
    The columns of the staging table are all of type varchar2 regardless of the target format.
    I define data rules for all columns that require a later conversion.
    I load the data from the flat file into the staging table using external table or sqlldr without any data conversion.
    The rows that cannot be loaded go automatically into the error table.
    When I read the data from the staging table, I can safely convert it since it is already checked by the rules.
    What I dislike in alternative 1 is that I manually have to create a second file and a second mapping (ok, I can automate this using OMB*Plus).
    Further, I would prefer using expressions in the mapping for converting the data.
    What I dislike in alternative 2 is that I have to create a data rule and a conversion expression and then keep the data rule and the conversion expression in sync (in case of changes of the file format).
    I also would prefer to have the data in the staging table in the target format. Well, I might load it into a second staging table with columns having the target format. But that's another mapping and a lot of i/o.
    As far as I know I need the data quality option for using data rules, is that true?
    Is there another alternative without any of these drawbacks?
    Otherwise I think I will go for alternative 1.

  • Convert data from one table to another

    SQL> select * from A;
    empid | mon_tips | tues_tips | wed_tips | thu_tips | fri_tips
    ----------------- ------------  --------- ----------+----------
    1 | 10 | 20 | 30 | 20 | 10
    2 | 10 | 20 | 30 | 40 | 50
    i want a SQL query that will convert the data from table A into table B with the following format:
    B(empid, Day, tips) where the column Day can take the values (Mon, Tue, Wed, Thu, Fri).
    Thanks in adavnce for the replies

    creaate table B as (select empid, 'MONDAY' day_1, mon_tips tips from a
    select empid, 'TUESDAY' day_1, tues_tips tips from a
    select empid, 'WEDNESDAY' day_1, wed_tips tips from a
    select empid, 'THURSDAY' day_1, thu_tips tips from a
    select empid, 'FRIDAY' day_1, fri_tips tips from a)Cheers

  • Convert data from cobol to SAP-R/3

    Hi Experts,
    Plz let me to know, How to Convert data in cobol format to SAP-R3?
    I get Cobal data in a file that should be updated to SAP..
    Thanks & Regards,

    It should be in excel sheet if you want transafer data from any Legacy to SAp,Not only cobol,so first convert data to excel then trasfer to SAP.

Maybe you are looking for

  • Poor OTA reception with Windows 7 Media Center but fine with other software and my TV

    I installed a new tuner (ASUS EHD3-100 dual ATSC tuners) into my Inspiron 518 (7 Enterprise, C2Q 2.4GHz, 3GB RAM, 640GB HDD, Radeon 5450 512MB, most recent drivers and updates installed).  Tried to set up the tuner in windows 7 media center and had t

  • redirect script doesn't work

    I'm trying to script a batch process to redirect selected messages in the Mail application. I found a nifty script on one problem: it doesn't work with 10.4's Mail. The script fails ("variable is undefined") when trying to get t

  • No Content in Emails when using Gmail

    When sending email it shows no content even though I typed info in the email. It also gives a smtp error, but then when you close out the mail program it sends the email. I am using gmail. I checked all of the settings and they are the same as my Iph

  • Can I launch an application from keynote?

    We have a proprietary application that we want to launch directly from our presentation - can't seem to do it from a hyperlink...any other ways to launch?

  • Why do we use WLST Scripting when things can be done manually??

    Hi experts , It may be a stupid question , why do we use WLST scripting for things like deleting Queue _ _ etc ,      which can be done manually (through console)Please help i am newbie in this technology