Writing one line of code in RPG: greater than ‘A’ and less than ‘Z’

75 pts.
Tags:
iSeries
RPG Code
RPG ILE
How can I write one line of code in RPG Free something like if x >= 'A' and x <= 'Z' instead of x = 'A' or x = 'B', etc.

Answer Wiki

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

uh…..

/free

if X >= ‘A’ and X <= ‘Z’;
(do somthing here)
EndIf;

-Sarge

Discuss This Question: 3  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
  • CharlieBrowne
    Are you concerned about other values other than the letters of the alphabet? There are Hex values between I and J and also between R and S. What about lower case characters? You need different comparisons for those.
    41,370 pointsBadges:
    report
  • TomLiotta
    Yeah, it's a strange question since the question contains the answer. The hex values that are intermixed with upper-case letters in EBCDIC seem to be a good guess at what is really being asked. Tom
    125,585 pointsBadges:
    report
  • Sloopy
    If %Scan( X : 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ) > 0
    2,195 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