[Migrated content. Thread originally posted on 03 December 2007]
I'm trying to improve our inhouse toolkits, and am currently writing a hexdump style record viewer using R$IO and I$IO. I'm having a problem with each and was hoping someone here would be able to point out what I need to do differently.R$IO: I haven't seen any sample code for this, but assume it works like I$IO. I've read the 7.2 documentation for this call, and set things up like it looks they need to be. I can get a successful open, but when I call it for the START_FUNCTION it crashes on me. Is there something different I need to be doing to start this other than:
77 KEY-VAL SIGNED-LONG.
...
*
SET IO-START-FUNCTION TO TRUE.
SET IO-F-NOT-LESS TO TRUE.
MOVE START-KEY TO KEY-VAL CONVERT.
CALL "R$IO" USING IO-FUNCTION, FILE-HANDLE, KEY-VAL, IO-START-MODE.
I$IO: This works like a champ except for one (seemingly minor) issue. On files with alternate keys, it returns back the correct number of keys when I query for file information. However, when I attempt to start the file it only ever recognizes the primary key. No matter which keynum I pass I$IO it _always_ uses the primary key as the key of reference. Is this a bug or am I doing something wrong?
Any assistance on these two issues would be appreciated!



