× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



All,

I have a process that I want to use OPNQRYF to build a file that allows the 
user to change a range of data. The issue is that the file I'm overriding to 
has two logicals, one that I would prefer it to use when building the data 
access path, which is keyed by 5 values {acd(3S0), pfx(3S0), sfx(4S0), 
xtn(7S0), pcd(3A)} And another which is keyed by 6 values {pcd(3A), fon(8S0), 
acd(3S0), pfx(3S0), sfx(4S0), xtn(7S0)}.

Currently the OPNQRYF process uses the 2nd logical to build it's access path. 
The main issue with using the 2nd file is that it causes the process the have 
to read all records that match on the 1st key to get only what's needed in the 
range. I believe the reason it does this is because I'm concatenating character 
versions of the numeric values to create the range to compare to 2 chararcter 
values being passed into my CL. What can I do to get OPNQRY to use the first 
logical. Or is there anything I can do, keeping in mind that the situation in 
our shop is such that I can't create a new logical, and the data, at times, is 
too large to build a view/index during processing.

 Here's my OPNQRY definition TL0C17 & TL1C17 are the 2 character values passed 
in;

 OPNQRYF FILE((MYFILE)) FORMAT(*FILE) QRYSLT('(pcd +

 *EQ %VALUES(''' || &RCFPGT || ''' ''' || +

 &RCTPGT || ''')) *AND (TLC17 *GE "' || +

 &TL0C17 || '") *AND (TLC17 *LE "' || +

 &TL1C17 || '")') MAPFLD((acdC acd *CHAR +

 3) (pfxC pfx *CHAR 3) (sfxC sfx *CHAR 4) +

 (xtnC xtn *CHAR 7) (TLC17 'acdC *CAT pfxC +

 *CAT sfxC *CAT xtnC' *CHAR 17)) +

 OPNSCOPE(*JOB)

Thanks,

Randy Stogner

USA Mobility

 

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.