[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

2361.0. "Lowerc. & Upperc string" by BALZAC::KUOCH () Thu Mar 04 1993 17:46

Hi,

  Question 1:

    When I read an index file, if the key contains lowercase string,
    my script changes it to uppercase. So I have a big problem, 
    the lowercase key record is alway confused with the uppercase one.
    And it is impossible to modify the application file record.

    Is there a solution ?

  Question 2 : 

    In a script, how to make a difference if I compare a lowercase string
    and an uppercase string ?


Please help ASAP. Thank in advance.
Cheu.
    
T.RTitleUserPersonal
Name
DateLines
2361.1In a word, sorry!IOSG::SHOVEDave Shove -- REO2-G/M6Fri Mar 05 1993 11:5124
    On question 1, yes you do have a problem.
    
    ALL-IN-1 only works properly with indexed files if they have upper-case
    keys. If the key gets into the file (from some other application,
    perhaps) in lower-case, it's very hard to get ALL-IN-1 to find it.
    (ALL-IN-1 always converts keys to upper-case before passing them to
    RMS).
    
    This is a real pain if you want to use, for example, people's names as
    keys (and have them list in upper- and lower-case on the screen etc).
    The only way out of this is to have two fields in the file - one (the
    key) holds the upper-cased name, the other (not a key) holds the
    original upper- and lower-case name. The second one is used for
    display, the first for looking up (and your script/named data sets one
    from the other as required).
    
    On question 2, strings are always converted to upper-case before
    comparisons. I don't know if there's any trickery you might be able to
    do with the new(-ish) lexical functions (comparing each character, as
    integers rather than strings, or something like that) - anyone got any
    neat ideas??
    
    Sorry!
    D.
2361.2DATA_FILE ?AIMTEC::BUTLER_TFri Mar 05 1993 16:1413
    I am not sure I understand what question 2 will get you?  Are we
    describing after the fact (ALL-IN-1 has made it upper!).
    
    I do have a question.  Does DATA_FILE always return the key in upper
    case?
    
    You may be able to use DATA_FILE Locate*** to search the file and
    do comparision if it does not.
    
    
    HTH,
    
    Tim
2361.3Lower case string comparisonIOSG::MAURICEBecause of the architect the building fell downFri Mar 05 1993 16:3625
    One way of getting a lower case string comparison done is by having in
    done in the sub-process.
    
    Here's a little command procedure to compare #A against #B and gives
    the result in #C. Just type
    
    	<command comp\get #c
    
    COMP.COM is:
    
    $WRITE OAMAILBOX "OA GET #A"
    $@DCLMAILBOX:
    $A = RESULT
    $WRITE OAMAILBOX "OA GET #B"
    $@DCLMAILBOX:
    $B = RESULT
    $if a .eqs. b then c = "Match"
    $if a .nes. b then c = "No Match"
    $WRITE OAMAILBOX "OA GET #C =""''C'"""
    $@DCLMAILBOX:
    $EXIT
    
    Cheers
    
    Stuart
2361.4Use DATA_FILE & lex. function.BALZAC::KUOCHMon Mar 08 1993 15:4412
    Thank you a lot for yours quick replies.

    The problem 1 is solved : DATA_FILE GET doesn't convert key to uppercase.
    (The key in that application is a telecom. interface protocol status
     "A..Z, a..z")
    
    With ALL-IN-1 V3.0, the problem 2 is solved using lexical functions
    (FN$LENGTH + FN$LOCATE).

Best regards.
Cheu.