Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Ninth Hell
    Posts
    19

    Unanswered: Import Cobol Data to ASE 12.5.1

    I am running ASE 12.5.1 and I want to import data from a file exported using cobol. One of the fields in the file is defined in cobol as S9(13)V9(2). As I have no control over the file`s structure, how can I convert the above to something that sybase can use, for example the above fields has a value of 1440} in the file which I suppose means +/-144.0x. Is there any table listing all the possible characters and the value/sign they represent(such as what "}" is supposed to mean in the above) or is there a way that this can be done automatically?

  2. #2
    Join Date
    Aug 2004
    Posts
    42
    The COBOL data can come in two flavors

    1. All values contain a "zoned" character.
    2. Negative values contain a "zoned" character.

    If all values are zoned then the possibilities (-9,...,-0,0,...9) are:

    RQPONMLKJ}{{ABCDEFGHI

    If only negative values are zoned then they are:

    RQPONMLKJ}00123456789

    Note the 2 entries for zero in both the lists.

    In either case the "zone" gives the sign of the entire value.

  3. #3
    Join Date
    Feb 2004
    Location
    Ninth Hell
    Posts
    19
    thx, it seems that the first case works here(all characters have a zoned character) so now I am actually able to parse the value correctly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •