Re: How to do "matches" in C-ISAM version 6
Posted in 1996
Topics: General Discussion
john wrote: > > Hi, > We have a inhouse program that runs on the command line. The program > can take arguments such as "AB" or "AB*" but not "*AB*". > > I have the source of the program and think the problem is caused by > a line that says the following: > > if ((cc = isstart(fd, &key, length, rec, ISEQUAL) == 0) { > /* print out records that start with AB or match AB* */ > } > > Is there a way to make "*AB*" work? I had hoped that there was a > ISMATCHES but there was none. > > Pls. email or post. Thanks! > > -- > ==== > John I do not have the C-ISAM 6 manuals, so I do not know whether Informix provides pattern matching (I suspect they do not). Matching a field to the pattern "*AB*" will require a full table scan. You can use regexp(5) to match the records read against the pattern specified. Mark van Holsteijn holsteijnm@usoft.nl