We have a problem selecting records from a PRO-ISAM file using SEL-(ANYTHING) when not assigning all keys for a single specific record select. The file has 4 keys, and if we assign all 4 keys and use SEL-ONLY the single record is retrieved fine. We need to retrieve all records with only the first 2 keys matching but for some reason with this particular file we get no reads at all when only the first two keys are defined before the SEL-XXXX statment.
The following examples are in an update function with 3 LU's, the first 2 LU's are getting the information needed from other files needed to access (and subsequently filter the retrieved records) from this file. Everything works perfectly until the 3rd LU retrieves no records unless it's forced to retrieve a single specific record. The following code is in the Default Logic for the 3rd LU.
For example:
This works perfectly and retrieves the specific record requested:
IM.TTYPE = "S"
IM.ITREF = " 250192"
IM.ITSEQ = "002"
IM.TFLAG = ""
SEL-ONLY(IM.TFLAG)
Any of the following retrieve absolutely no records (no after read logic hit):
IM.TTYPE = "S"
IM.ITREF = " 250192"
SEL-ONLY(IM.ITREF)
IM.TTYPE = "S"
IM.ITREF = " 250192"
SEL-PARTIAL(IM.ITREF)
IM.TTYPE = "S"
IM.ITREF = " 250192"
IM.ITSEQ = "0"
SEL-ONLY(IM.ITSEQ)
IM.TTYPE = "S"
IM.ITREF = " 250192"
IM.ITSEQ = "001"
IM.TFLAG = ""
$END_KEY = @COMP + IM.TTYPE + IM.ITREF + "999"
SEL-RANGE($END_KEY)
This is the only file that has this problem, we use the set one or more keys and use SEL-ONLY on the last key set all the time and never have any problems.
The definition of the file is attached - any ideas as to what the problem with this file may be?
We have checked the file for corruption and it's clean, we've checked the file for size limit and and it's well within the defined file size.
Thanks,
JC Jones