Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. AS400 Data Packed Converting

AS400 Data Packed Converting

Scheduled Pinned Locked Moved C / C++ / MFC
databasealgorithmstoolstutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Farry
    wrote on last edited by
    #1

    I'm having a serious amount of trouble interpreting some data in an AS400 database file. If I look at the Binary representation of the data in the AS400, I see (The values are vertical/columns) Example 1: 001 10F Now on the AS400 this = 1001 When I pull this data to Windows, I get Hex(01 00 1F) or 65567 Example 2: 000 01F Now on the AS400 this = 10 When I pull this data to Windows, I get Hex(00 01 0F) or 271 Example 3: 001 00F Now on the AS400 this = 1 When I pull this data to Windows, I get Hex(00 00 1F) or 31 Now the project at hand is build a utility that will extract this data, and populate a perform value analysis on this.. But I can't figure out an algorithm which will convert this so something useful. Has anyone got any clues about converting this?

    D 1 Reply Last reply
    0
    • P Paul Farry

      I'm having a serious amount of trouble interpreting some data in an AS400 database file. If I look at the Binary representation of the data in the AS400, I see (The values are vertical/columns) Example 1: 001 10F Now on the AS400 this = 1001 When I pull this data to Windows, I get Hex(01 00 1F) or 65567 Example 2: 000 01F Now on the AS400 this = 10 When I pull this data to Windows, I get Hex(00 01 0F) or 271 Example 3: 001 00F Now on the AS400 this = 1 When I pull this data to Windows, I get Hex(00 00 1F) or 31 Now the project at hand is build a utility that will extract this data, and populate a perform value analysis on this.. But I can't figure out an algorithm which will convert this so something useful. Has anyone got any clues about converting this?

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Don't you need to convert from EBCDIC to ASCII?

      P 1 Reply Last reply
      0
      • D David Crow

        Don't you need to convert from EBCDIC to ASCII?

        P Offline
        P Offline
        Paul Farry
        wrote on last edited by
        #3

        I hope it's as simple as that. ALthough from the reading I've done.. EBCDIC isn't that easy to convert from. I could be due to the fact the AS400 (rpg) programmers don't really know how it(as400) packs the data, it just "is"

        D 1 Reply Last reply
        0
        • P Paul Farry

          I hope it's as simple as that. ALthough from the reading I've done.. EBCDIC isn't that easy to convert from. I could be due to the fact the AS400 (rpg) programmers don't really know how it(as400) packs the data, it just "is"

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          Funny you should mention, as I work with an RPG programmer. His code runs on the AS/400, while mine runs on the PC (Windows). Whenever I send him data, it must be converted from ASCII to EBCDIC. Whenever he sends me data, it must be converted from EBCDIC to ASCII. I use a library provided by IBM that has a couple of convertors in it.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups