Question for you gurus out there.

I'm trying to use Cobol to interrogate a database.  What I want to do is
request from the user what database they want to open, then open it, request
what set they want information on (listing it if requested).  Once I have
the setname, then I want to be able to list the items within that set to the
user.  This is where I'm having trouble.

What I am trying to do is this:

DBINFO mode 104 to get the number of items within the set (this gives me the
loop boundaries for the next step - i.e. if there are 5 items, then I need
to do the next step 5 times).  This also returns the item numbers for those
particular items (I'm assuming that every item in the database has it's own
unique number - please correct me if I'm wrong).   Getting the number of
items seems to work correctly, however I don't know of a way to check the
item numbers being returned (though based on step #2 I'm not sure that they
are right).

I then try to DBINFO mode 102 using the item numbers returned above to get
the data item name.  This always fails.

Any ideas of what I'm doing wrong?  Or does anyone know of an interactive
way to get the item number of the items in a dataset?

-------------------------------
Gary L. Paveza, Jr.
Technical Support Specialist
All opinions are mine and not those of my employer