Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to define Index Key > 99 bytes?

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
I've never run into this before and the manuals and web searched for RPG are not coming up empty.

I need to create/access a new ISAM file with a key that might be up to 120 characters in length. Can anyone please advise as to how one codes for this key length?

The 'F' spec only provides up to 99 bytes but the system docs state keys can be up to 120 bytes.

Any techniques appreciated.

B
 
Hi: The IBM Data Description Specifications Reference manual that I have says that "The number of fields that make up a key is restricted to 120. The total key length cannot exceed 2000 bytes". I can only assume that you are thinking about an internally described file. You don't need to define the key length for an externally defined file.

Warren
 
Are you using an old version of RPG? The current version (RPG-IV) has 4 columns - you can enter up to 2000 no problem.
 
yes, I am using a Unibol/Unicomp RPG II compliant version on AIX.
 
In that case, I think you are out of luck. I've never worked with the Unibol version, but I suspect it has the same limitations as RPG-II.
 
Thanks - I believe you are right. I am planning on reducing the key length to <100 bytes and using a SETLL and READ for the primary key matches then comparing the remaining "key" fields to see if there's a match.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top