View previous topic :: View next topic |
Author |
Message |
JeffG Beginner
Joined: 01 May 2006 Posts: 2 Topics: 1 Location: Minneapolis, MN
|
Posted: Mon May 01, 2006 10:34 am Post subject: Easytrieve SEARCH limit - wide DESC field - any workaround? |
|
|
I have a sequential file that I'd like to use as a lookup table. The ARG field is a 3-byte number, but the DESC field is more than 400 bytes. I've discovered that the DESC field has a 254 character limit which appears to not be adjustable. Granted, the desired DESC field has more data than I usually need for any individual program, but it is a nice "one-stop shop." Is there any way to get around this limit?
At the risk of answering my own question, the only thing I can think of is to dynamically build a lookup table (in a START proc, or in a prior step) that contains only the fields I need right now. However, I'd much prefer a single solution that doesn't require coding a program within the program. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon May 01, 2006 11:01 am Post subject: |
|
|
JeffG,
Can't you use the Search file in the JOB statement and peform Synchronized File Processing ?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
JeffG Beginner
Joined: 01 May 2006 Posts: 2 Topics: 1 Location: Minneapolis, MN
|
Posted: Mon May 01, 2006 11:37 am Post subject: |
|
|
Good idea. That might work occasionally, but there is no guarantee that the driving file (that is, the one that needs to look up the data) is in the proper order, and those files are often large (10M records or more). The Search file, on the other hand, is small (1500 records), yet wide.
I'll keep that in mind, though. Thanks. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon May 01, 2006 11:44 am Post subject: |
|
|
JeffG,
Another idea is split each record of table file into 2 records.
ex:
Code: |
ARG DESC
=== ====
123 data upto 400 bytes
|
As your key is only 3 bytes expand it to 4 bytes by adding another alphabet "A/B" and split each record into 2 records.
ex:
Code: |
ARG DESC
=== ====
123A data upto FIRST 254 bytes
123b data from 255 bytes onwards to end
|
This will increase your file record count by 2. And you may have to use 2 search statements depending on which record you want to fetch.
If you are sure you know which bytes you are gonna pick then may be you can get away with just 1 SEARCH statement.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|