X-Delivery-Notice:  SMTP MAIL FROM does not correspond to sender.
Newsgroups: bit.listserv.notis-l
Date:         Wed, 7 Oct 1992 13:32:00 EDT
From:         Ron Johnston <ADLB001@MVS.MCGILL.CA>
Subject:      trailing blanks in opac 5.0.2
Comments: To: Notis Discussion <NOTIS-L@VM.TCS.TULANE.EDU>

I think I've solved the little problem of trailing blanks in the 5.0.2 opac.  At
the same time, I've discovered that the underscore can already be used as an
explicitly desired trailing blank.

If you try the following two searches, you should get more hits with the first
than the second.

A=SMITH
A=SMITH_

The first one should match to things like SMITHSONIAN.  However, the opac
(LPC100P) changes the underscore to a blank before it matches the search string
to the MHI index.  Thus the second search fails to match to the second S in
smithSonian.  The second search therefore represents a useful way to limit the
number of hits.

The problem, as I see it, is that the addition of trailing blanks as, for
example,

A=SMITH...  where the periods represent blanks produced by the space bar,

will have the same effect as the addition of trailing underscores.  Since the
opac shows "Search Request: A=SMITH" in either case, it can be a mystery to the
user as to why a seemingly identical search can yield radically different
numbers of hits.  (Using the underscore, the opac shows
"Search Request: A=SMITH_".)

The attached patch to LPC102P will truncate the trailing blanks (produced with
the space bar) from a search command.  As a result, typing "A=SMITH..." yields
the same results as "A=SMITH".  On the other hand, "A=SMITH_" continues to yield
the smaller result set.

As of tomorrow, this change should be visible in MUSE which you can reach at the
telnet address below.  The EXP PUNCTUATION screen may or may not be updated to
reflect the change.

Ron Johnston  McGill University Libraries  Montreal Quebec

voice:        (514) 398-4797          |    S/390  ES/9000-320
fax:          (514) 398-7356          |    MVS/XA  CICS 1.7
internet:     ADLB001@MVS.MCGILL.CA   |    NOTIS 4.7
bitnet:       ADLB001@MCGILLVS        |    GTO 2-Utlas
telnet:       132.206.27.5            |    GTO 3-Bibliofile
=============================//=============================================
MAINLNEA DS    0H
         CLI   0(R3),C' '          BYPASS INITIAL BLANKS
         BNE   MAINLNEB            BRANCH IF PAST BLANKS
         LA    R3,1(,R3)           LOOK AT NEXT CHARACTER
         CR    R3,R5               STILL WITHIN COMMAND ?    insert  RJ
         BL    MAINLNEA              YES, KEEP LOOKING       change  RJ
MAINLNEB DS    0H
         OC    DSWORKA,BLANKS      CONVERT TO UPPERCASE
*              DETERMINE LENGTH OF USER COMMAND
MAINRJ01 DS    0H                                            insert  RJ
         CR    R5,R3               IS END STILL > START ?         |  RJ
         BNH   MAINRJ05              NO, EXIT LOOP                |  RJ
         S     R5,=F'1'            DECREMENT END POINTER          |  RJ
         CLI   0(R5),X'40'         IS LAST CHAR BLANK ?           |  RJ
         BE    MAINRJ01              YES, KEEP LOOKING            |  RJ
         LA    R5,1(,R5)             NO, INCREMENT BACK TO END + 1|  RJ
MAINRJ05 DS    0H                                            insert  RJ
         SR    R5,R3               GET LENGTH OF TIOA
         BP    MAINLNB2            IF POSITIVE, PROCESS COMMAND