SCAN/XLATE/CAT

pts.
Tags:
RPG string operations
RPG/400
Hi, Good evening every body.Can you tell me what is the difference between SCAN AND XLATE AND CAT ?in real time answers.

Answer Wiki

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

Hello,

SCAN -: is used to search for a value in a particular variable.
e.g – if I want to search ‘A’ in the string ‘AAABC’ then I can make use of SCAN.

SCAN returns a numeric value: if it returns zero that means the value is not found in the variable. If the value is found then SCAN returns the position from the string.

XLATE -: is used to translate a string using 2 other strings as a “key”

CAT -: is used to concatenate two strings.

Hope this answers your questions if you need any further help then please let me know.

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
  • Cwc
    What version of RPG are you using? If you're using IV, then you are better off using the equivalent built in functions such as %Scan, %Subst, or %Xlate. To do simple concatenation, you can just string the fields together that you want, using the plus sign between each value, which will work as a concatenation operator when the fields are alphanumeric.
    4,290 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