ASCII to EBCDIC Packed Decimal

Hi all,
I want to convert a 9-digit number which is in ASCII to a 5-digit EBCDIC packed decimal using OSB.
Can anyone please help me with this?
Thanks in advance!
Regards,
Karthik

This can be done using MFL

Similar Messages

  • Is there any java Charset for converting EBCDIC packed decimal to ASCII?

    Pls reply if you know the solution.

    This is not a function of a Charset, because of the packing. There are plenty of EBCDIC<->ASCII libraries out there.

  • 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

  • Long / double value convertion to Packed Decimal

    Hi,
    Could anybody tell me how to convert a long / double value to Packed Decimal (AS400) ?
    Thanks,
    Probir

    Now I'm writing this value in a flat file by
    FileOutputStream and sending to mainframe through FTP.
    But the mainframe people said it's not converted into
    packed decimal. Is it the right way to convert ??When you say "mainframe" I assume you are referring to a machine that uses EBCDIC. Java, even on the iSeries, uses Unicode and not EBCDIC, so when you FTP anything to the mainframe it will go through an ASCII-to-EBCDIC conversion. You want this to happen for text but you don't want it to happen for packed decimals; your carefully-constructed x'12' x'3f' bytes will be dutifully converted into EBCDIC garbage.
    FTP of an iSeries file (in the QSYS.LIB file system) to a mainframe is trivial because both client and server use EBCDIC, so there are no conversion issues. So if you could do it that way, you definitely should. Otherwise you are going to have to take your packed decimal data and replace it by the bytes that would be translated into it if it were in EBCDIC. The translation table QEBCDIC in library QSYS shows you how it does that, so use that table. You can look it with the command WRKTBL QSYS/QEBCDIC. You'll notice for example that x'09' in ASCII gets converted to x'05' in EBCDIC. So if you want to get x'05' into part of a packed decimal field on the mainframe, you have to send it x'09'. And so on. Like I said, I would recommend doing something other than this. Ask the mainframe people to not make you used packed decimal, for example.
    PC&#178;

  • Conversion of Packed Decimal Numbers to Java Data Types

    Hi all,
    I'm working with a mainframe file which contains datas in Packed Decimal Numbers.My requirement is to convert these datas to Java datatypes and also to convert the Java datatypes to Packed Decimal Numbers before storing them in the mainframe.
    Can anyone help me out with any code for converting Java data types to/from other data formats such as: EBCDIC, IBM370 COMP (binary numbers up to 9 digits), and COMP-16 (packed decimal numbers)?
    I would hugely appreciate any response to my query.
    Thanking you all,
    Kaushik.

    Rather than go that route, I'd instead look into providing a "service" on your mainframe to:
    1) provide a textual representation of the numbers (from native to text)
    2) read text, converting to native numeric storage
    And use that service to retrieve that information by your Java app (1)Similarly, instead of trying to write natively-formatted numbers from your Java app, I'd write it as text and make that same "service" read the text (2)
    This is the kind of thing XML is for.

  • Data flow fails on packed decimal field moving iSeries DB2 data from one iSeries DB to another

    I' trying to use SSIS to move table content from one iSeries DB2 database to another.  I'm using the .Net providers for OleDb\IBM DB2 for i5/OS IBMDA400 OLE DB Provider in the connection managers for the source and destination and the test connection
    works fine.  When I try to run the data flow task however it fails on the first packed decimal field it encounters with the exceptions ...
    [select from hydro520 hydroweb2 blpmstr [16]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "select from hydro520 hydroweb2 blpmstr" (16)" failed because error code 0x80004002 occurred, and the error
    row disposition on "output column "MSPRIB" (55)" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.
    [select from hydro520 hydroweb2 blpmstr [16]] Error: The component "select from hydro520 hydroweb2 blpmstr" (16) was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "select from hydro520 hydroweb2 blpmstr" (16) returned error code 0xC02090F5.  The component returned a failure code when the pipeline
    engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    ...in the progress tab.  Can someone kindly tell me what I need to do to get the connection manager to work with DB2 packed decimal fields?  Or is it a different issue all together?  Thanks tonnes for any help, Roscoe

    Hi rpfinn,
    From the Data Types mapping rules between SSIS and DB2, we can see that both the NUMERIC and DECIMAL data types in DB2 are mapped to DT_NUMBERIC data type in SSIS. Now that the source data in your DB2 database is NUMERIC data type, changing the DT_NUMBRIC
    data type to DT_DECIMAL is invalid. Besides, if we check the data types of the target External column and Output column from the Advanced Editor for ADO NET Source adapter, the data type should be defined as DT_NUMERIC with Precision as 9 and Scale as 2. I
    am not clear where you see the DT_NUMBERIC(9,0) e.g. DT_NUMERIC with Precision as 9 and Scale as 0, but it may be the cause of the issue. You need to make sure the DT_NUMERIC data type also has Scale 2 instead of 0.
    If you don’t know how to modify the data type, please elaborate the Data Flow Task of the package so that we can make further analysis. Besides, the error messages you posted are incomplete, it will be helpful if you post the complete error message.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Loading the data from a packed decimal format file using a sql*loader.

    Hi ,
    In one of the project i'm working here i have to load the data into oracle table from a file using a Sql*loader but the problem is the data file is in the packed decimal format so please let me know if there is any way to do this....I search a lot regarding this ..If anybody faced such type of problem ,then let me the steps to solve this.
    Thanks in advance ,
    Narasingarao.

    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;SY.

  • How to move the value from a character field to numeric or packed decimal

    Hi,
    can anyone explain me on how to move the value from a character field to numeric or packed decimal.
    Please help me on this. Thanks...
    Regards,
    Rose.

    Hi ,
    if you use keyword MOVE u may loose the decimal and thoussan separator and if u don't want to loose them just call the FM ..HRCM_STRING_AMOUNT_CONVERT.
    i doubt wherther it is HRCM or HCRM just try using *
    this will suit ur requirement.
    Regards,
    KK

  • ASCII to EBCDIC

    Hello All,
    How can I convert ASCII to EBCDIC using PI? Any modules to be used in channel?
    Thanks,
    Regards,
    Naresh

    Hi,
    Please check below thread.. it mentions about the beans you can use.
    Convert EBCDIC to ASCII and ASCII to EBCDIC in PI7.0 SP14
    Regards,
    Deepak

  • Convert Mainframe Packed Decimal to Oralce Number Format

    Dear all,
    I am having a file in which amount fields are given in a Packed Decimal format. Can anyone suggest me how I can read this data element from the file and convert it into Oracle Number datatype.
    File is a fixed length. All the amount fields are given in Packed Decimal Format and rest of the fields are given in text format.
    Thanks and regards
    Nagasayan Puppala

    Hi,
    Firstly thanks for your reply.
    Actually I am not using SQL Loader to load data from
    a flat file to Oracle table. I am writing a custom
    program that reads the file and populates the oracle
    table. I'll put aside the question of 'why' you'd want to do that. SQL*Loader's singular purpose in life is to load flat files of data into Oracle DB. Sometimes there is a reason for reinventing the wheel.
    How does your program communicate with the Oracle DB? If utilizing ESQL and Pro*Cobol (or Pro*<whatever> ) you will have read the data into a variable of some type in you host language. The variable of the host variable to hold the value (if you did a 'select from' that table) would be the correct target type for an insert statement. Whatever host language type conversion is available bewteen those two types ( if they are different at all ) is all that is needed. The precompilers have converters between certain native host and internal Oracle types built-in. It is how you get any data between the two systems. This is only a problem if the host language has no converter between the numeric types (if differnet.). When you read from the flat file are you reading it into a native packed decimal in the host language?
    ODBC/JDBC similar strategy..... cast conversion between the native type that Oracle wants and the one into which your custom program reads it into.
    So I want to know whether there are any Oracle
    utility programs that will convert the packed decimal
    to a oracle number format or not.There are Oracle routines that convert into the native Oracle DB formats. There are implicitly available through the normally utilized interfaces to OCI ( ESQL and ODBC/JDBC ) . There are none decoupled from those interfaces though (that I know of).
    There are no standalone programs that mutate a flat file into another flat file that then could be loaded. That's is typically slower and utilzes more space than most customers want than just directly inputing the data into Oracle DB.
    Message was edited by:
    lytaylor

  • Can we move char type data to packed decimal

    Hi
    can we move char type data to packed decimal??
    Thanks
    Devi

    Hi..
    that depends on the data in the character variable..
    if that character variable contains onli numbers then it is possible.
    <b>data c type c value '1'.
    data p type p.
    p = c.
    write p.</b>
    here the output is  1.
    If it contains even a single Alphabet , then it goes for a dump.
    <b>data c type c value 'A'.
    data p type p.
    p = c.
    write p.</b>
    here u will get a short dump.
    hope u understood.
    regards,
    sai ramesh

  • ASCII to EBCDIC converter

    Hello everybody!
    I'm looking for a function module which converts ASCII text to EBCDIC. Unfortunately I couldn't find anything about this so far. It would be great if somebody could give me some information about.
    Thankyou!
    Best regards,
    Markus

    Hi Marcus,
    You don't need a Function Module; there is a ready ABAP command 'EBCDIC(x)' available.
    You will find more information here: [Converting ASCII to EBCDIC and vice-versa|http://www.sapdb.org/7.4/htmhelp/5e/0a41edba9d11d2a97100a0c9449261/frameset.htm]
    Also, check this link : [Standard include for converting ASCII / EBCDIC|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/converting-data-from-ascii-to-ebcdic-in-unicode-environment-420663]
    Hope this helps! Please let me know if you need anything else!!
    Cheers,
    Shailesh.

  • Re: Code convert ascii to EBCDIC

    At 09:06 PM 8/13/97 +0900, Isao Yamada wrote:
    I am trying conversion ascii-to-EBCDIC conversion.You didn't mention the platform, but if it is Unix, I would just pipe the
    input through the dd command. Even if this is a Win32 platform, I would
    consider buying the Win95 toolkit from Ready-to-Run and using the dd
    command in it.
    =========================================================================
    Thomas Mercer Hursh, Ph.D email: [email protected]
    Computing Integrity, Inc. sales: 510-233-9329
    550 Casey Drive - Cypress Point support: 510-233-9327
    Point Richmond, CA 94801-3751 fax: 510-233-6950

    Isao,
    You can convert arbitrary binary data
    using MemoryStream, ReadBinary(), pointers
    and casting to convert simple binary types to the
    type you require. Here is a partial code fragment
    from some binary communications code we wrote
    to give you the idea. Although it looks like
    'C' in places it really is valid TOOL code.
    buf : MemoryStream = new;
    theHeader : MemoryStream = new;
    theData : MemoryStream = new ;
    tempData : BinaryData = new ;
    countBytes : integer = 0 ;
    tempcountBytes : integer = 0 ;
    ConnId : ui2 = 0 ;
    magicNumber : ui4 = 0x5aa50ff0 ;
    p : pointer = nil;
    buf.Open(accessMode = SP_AM_READ_WRITE);
    theHeader.Open(accessMode = SP_AM_READ_WRITE);
    // Read the header
    theHeader.Flush() ;
    theHeader.Seek( position = SP_RP_START ) ;
    countBytes = 0 ;
    // Parse theHeader here
    theHeader.Seek( position = SP_RP_START ) ;
    theHeader.ReadBinary( target = tempData, length = 4 ) ;
    p = (pointer)(tempData.Value) ;
    PacketLength = *(pointer to ui4)(p) ;
    theHeader.ReadBinary( target = tempData, length = 1 ) ;
    p = (pointer)(tempData.Value) ;
    PacketType = *(pointer to ui1)(p) ;
    theHeader.ReadBinary( target = tempData, length = 2 ) ;
    p = (pointer)(tempData.Value) ;
    PacketSeqNo = *(pointer to ui2)(p) ;
    theHeader.ReadBinary( target = tempData, length = 2 ) ;
    p = (pointer)(tempData.Value) ;
    ConnId = *(pointer to ui2)(p) ;
    theHeader.ReadBinary( target = tempData, length = 4 ) ;
    p = (pointer)(tempData.Value) ;
    magicNumber = *(pointer to ui4)(p) ;
    if( magicNumber != 0x5aa50ff0 ) then
    buf.Close() ;
    theHeader.Close() ;
    return FALSE ;
    end if ;
    [email protected]
    MIME-Version: 1.0
    Content-type: text/plain; charset=iso-2022-jp
    Hi! Everyday I read some useful tips from this mailing-list.
    I am trying conversion ascii-to-EBCDIC conversion.
    I want to read binary-file, because EBCDIC code data come by floppy-disk.
    But I can't read this file into TextData object.
    (TextData Class have method to access by byte.)
    I know that I can read binary-data into BinaryData object.
    if I can access BinaryData class by byte or read binarydata into textdata.
    Does anyone have good idea for this question?
    thanks.
    T.C.F.Co.Ltd.
    Isao Yamada([email protected])
    Any views expressed in this message are those of the individual sender,
    except where the sender specifically states them to be the views of
    Reuters Ltd.

  • Parsing a packed decimal value

    I am doing an extraction of BKPF and my ETL process is failing because the data which is being returned via RFC_READ_TABLE for KURS2 is '0.1234-'
    When I go in to SE16 and look at that record, the displayed field value (based on localisation to F) is: '/0,1234'.
    KURS2 has a datatype of P. Its values also should be always unsigned (since a negative currency conversion rate doesn't make any sense). Are signed values in P fields which come out of RFC_READ_TABLE have the - sign at the end (like a BCD?) or is it returning that because the RFC is misparsing the '/' in the actual field? And why would the UI allow someone to enter such a value? (I understand that it looks like whoever entered it wanted something to divide WRBT* by KURS2 to get DMBT2 or whatever, but that seems strange to me).

    How do you store the "PACKED DECIMAL" in Oracle?
    Do you use one of the following data types:
    NUMBER(n,n)
    DECIMAL(n,n)?
    or
    is it mainframe data that is represented in PACKED DECIMAL format that you've loaded into Oracle via SQL Loader.
    P;

  • Cobol Packed Decimal and Binary Compressed Numbers

    Hello!
    I am having some difficulties finding the correct datatype in Oracle for numbers in flat files coming from Cobol which are packed-decimal type and binary compressed. These are not objects, hence the use of BLOB is not appropriate?!
    Thaks for any help!!!
    null

    The sqlloader manual (i.e. utilities reference, loader chapters) tells all about how to load packaed decimal.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Adrian Zeller ([email protected]):
    Hello!
    I am having some difficulties finding the correct datatype in Oracle for numbers in flat files coming from Cobol which are packed-decimal type and binary compressed. These are not objects, hence the use of BLOB is not appropriate?!
    Thaks for any help!!!<HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • Error when consuming WebService SOAP in DataService 4.2

    Hi everybody, I've a problem when I try to import the function in DataService 4.2 (the Data Service version is 14.2.1.224). How you can see in the attachments file, I've created the DataStore WebServiceSoap with le right characteristics but when duri

  • Toshiba DVR620KU VHS/DVD Recorder broken and needs repaired

    I have a fairly new Toshiba DVR620Ku VCR/DVD Recorder that was working fine until I ejected a VHS tape.  The tape hung on some white plastic roller and when I tried to extract it the white plastic roller broke off.  Now the VCR will not work.  Any id

  • The file[Langu​age \\app.P2GR​C.dll] is missing

    I've read previous problems concerning this and the answers all included finding the installation file in C:\SwSetup\CyberDVD folder.  My problem is ,I cant find that folder on my system!!! Am I totally stupid and overlooked something????? Thanks!!

  • Calendar lost all alert files when I upgraded-..

    Hello, I use a LOT of events in Calendar that run either Applescript apps or Automator alarms. Since I updated to Mavericks, it seems that all of the pointers to the app files are gone.  When I go in to re-establish the links to the files to "open" (

  • Dictation won't work mountain lion

    I have a macbook with mountain lion. I can't get dictation to work in imessenger.  Any ideas?