Insured Name not displayed properly

45 pts.
Tags:
RPG ILE
I have a program which accepts inputs from the user on the screen.Accordingly it would display. Problem - User enters CHRIS(only accepts capital). When user hits enter it is displaying insured name starting with CHRIS only. Though database is having both CHRIS and Chris. Is there any built-in-functions to trap both CHRIS and Chris and that too sequentially.Means - Chris Smith should appear befor CHRIS William. Appreciate your help. Thanks & Regards Chinmoy Dasgupta

Software/Hardware used:
OS400, V6R1M0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • WoodEngineer
    This article from this website answers your question nicely: http://www.itjungle.com/mgo/mgo121203-story01.html
    6,680 pointsBadges:
    report
  • TomLiotta
    ...database is having both CHRIS and Chris. Is there any built-in-functions to trap both CHRIS and Chris...   There are multiple possibilities for that.   ... and that too sequentially.   But that restricts the possibilities a little. Best might be to FETCH through a cursor that uses a WHERE clause based on something like this:  WHERE SUBSTR(UPPER( name ),1,length(trim('CHRIS')))=TRIM('CHRIS')   You wouldn't actually use 'CHRIS' in the SQL. Use a host variable. For 'name', use the column that holds the name value. And use an ORDER BY clause to control sequencing.   A different 'best' way would be to use a LIKE predicate, but a lot of people have trouble with variable length patterns.   Tom   Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following