Print contents of rpg file in human-readable format

| | August 4, 2015

Context

A friend of mine is having trouble printing source code to a human readable format.

The compiled (I assume) programs of their welding robot have the .rpg extension. They want to collect print-outs in human-readable format, possibly for backup or future reference.

Their supplier can provide the software that accomplishes this, be it at a considerable cost (and possibly: an annual license). Because of this, my friend decided to ask me if a easier/cheaper solution exists.

Examples & Pictures

The files can be read on the console of the robot, an example:

Picture of robot console.

I’ve done some minor research and I’m fairly sure this is the Report Program Generator (RPG) language developed by IBM. The Assembly-like syntax seems to match; it might be one of the later versions of the language.

My friend has send me an example .rpg file, the contents seem binary with some string literals scattered throughout. Screenshot of the contents of an example file in hexadecimal:

Screenshot of <code>.rpg</code> file contents.

The Question

There is not much, if any, clear information to be found online so I suppose I have multiple questions (for anyone that might know more about this):

  1. Is this (first image) Report Program Generator (RPG) code?
  2. Does the .rpg file contain compiled or processed code? Maybe an intermediate format?
  3. Is it possible to convert files as shown in the example, back to source-code or human-readable format, kind of ‘disassemble‘ it?

If anyone knows more, don’t hesitate to give me any information or ask more details if necessary. Thanks in advance!


And maybe not an important question but still something that bugs me (and might indicate I’m on the wrong track):

If this is indeed an RPG program, why would the compiled/processed binary have the .rpg extension, shouldn’t the source-file have that? This leads me to believe I’m either (a) assuming the wrong things (the language, etc…) or (b) this is an intermediate format, easier for machines to read, that has to be interpreted by some kind of runtime system.

2 Responses to “Print contents of rpg file in human-readable format”

  1. Use a fixed point font (courier) to print it.

  2. Barbara Morris on November 30, -0001 @ 12:00 AM

    I don’t think that’s any version of IBM’s RPG language. RPG does have a MOVEL opcode, but it doesn’t have any of the others.

    Also, all the versions of the IBM language have been intended for business programming. I doubt that it would have been used for robotics.

    My guess is that’s a proprietary language of the company that makes the robot.

Leave a Reply