Upper Case Identification

70 pts.
Tags:
AS/400
RPGLE
I m accepting a string from user in RPGLE,is there any way to know that the string enter by user is in Upper or Lower Case??? Please Help.... Thanks in Advance

Software/Hardware used:
RPGLE
ASKED: May 11, 2010  12:27 PM
UPDATED: May 12, 2010  12:04 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

http://www.mcpressonline.com/programming/cl/string-handling-in-rpg400-and-cl.html

Check: Finally, string checking is the process of determining if all the characters in the string belong to a certain set of characters. For instance, you can check that a given string (which is supposed to contain a hexadecimal notation like “12F6″) only contains the valid hexadecimal nybbles 0 to 9 and A to F.

RPG performs this function with the CHECK operation. Factor 1 is a string containing all the characters that are considered valid. Factor 2 contains the string to be checked, with an optional :n extension if you want to start checking at a certain position. The result field can contain either a numeric field or a numeric array, which will have the position(s) of the invalid characters found in the string. If all characters in the string are valid, the result field is zero. If you use a numeric array, CHECK reports multiple occurrences of invalid characters. An optional indicator in columns 56-57 can be used to monitor for an invalid condition such as a starting position beyond the end of the string.

CL has no equivalent of the CHECK operation.

Discuss This Question: 1  Reply

 
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
  • TomLiotta
    Do you need to know if it's upper-/lower-case? Or do you need to make it upper- or lower-case? In many cases, it doesn't matter which case the user typed. The program simply translates everything to upper-case (or lower-case) and ignores how the user typed the value. Is that what you want to do? 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