/* * Example program using STR$MATCH_WILD. (VAX PL/I V3.0) * * The following program reads in a master pattern string and then * compares that to input strings until it reaches the end of the * input file. For each string comparison done, it will print * either 'Matches pattern string' or 'Doesn't match pattern string'. */ %include str$match_wild; wildcard: procedure options(main); declare pattern_string character(80) varying; test_string character(80) varying; on endfile(sysin) stop; put skip; get list(pattern_string) options(prompt('Pattern string> ')); do while( '1'b ); get skip list(test_string) options(prompt('Test string> ')); if str$match_wild(test_string,pattern_string) then put skip list('Matches pattern string'); else put skip list('Doesn''t match pattern string'); end; end;