Search with wildcard in multiples fields

Etienne Rompré erompre at koala-tech.com
Thu Mar 5 08:07:52 CST 2009


Hi Ken,

Thanks for the reply.  We'll checked the code you proposed.

In the meantime, I'll try to be a little more precise...

Screen 1.
One field TEMP

Screen 2
Search results

The file:
The file has 5 text fields of 80 caracters long


The requirement:
The text input in the screen onr must be found in the file even if it's 
located in any of the text field.

We have it working.  The screen 2 will display the records that contains 
what is entered in the screen one...only if it matches exactly whenever 
the position in the 5 text fields.

The issue:
Wild paterns are not possible. XXX@ or %@XXX at .

Anyone has a way to make a search on multiples fields with one input 
field and still have the hability to use the wildcards?

Any help would be appreciated...

Thanks!

Etienne Rompré


Ken Langendock a écrit :
> I'm not exactly sure what you are trying to do but maybe this approach would
> help.
> 
>   TEMP T-StartsWith CHARACTER * 25 &
>        RESET AT STARTUP
> 
>   DEFINE D-NameSize &
>        = SIZE(TRUNCATE(T-StartsWith))
> 
> FILE Filename PRIMARY &
>      OCCURS 16 &
>      CACHE 255
>   ACCESS SEQUENTIAL &
>          REQUEST T-StartsWith
> 
>   SELECT IF (T-StartsWith EQ " " OR &
>              T-StartsWith EQ UPSHIFT(fieldname OF filename[1:D-NameSize]))
> OR &
>             (T-StartsWith EQ " " OR &
>              T-StartsWith EQ UPSHIFT(fieldname2 OF filename[1:D-NameSize])) 
> 
> Ken
> 
> -----Original Message-----
> From: powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com
> [mailto:powerh-l-bounces+ken.langendock=rogers.com at lists.sowder.com] On
> Behalf Of Etienne Rompré
> Sent: March 4, 2009 1:53 PM
> To: powerh-l at lists.sowder.com
> Subject: Search with wildcard in multiples fields
> 
> Hi,
> 
> PH 8.4
> OpenVMS with RMS files
> 
> For PH and PHweb.
> 
> Got an issue here.
> 
> I need to be able to search in multiples fields in a file using one 
> input field in the search screen.
> 
> We are able to do it but we lose the wildcard use...
> 
> A temp field with multiple search in the next screen called.
> 
> Is there a way to do this kind of search screen while maintaining the @ 
> or the %@?
> 
> Any help would be appreciated.
> 
> Thanks!
> 
> 


More information about the powerh-l mailing list