SYNON built in function *CONCAT

AS/400 Synon
Synon 2E
I need to combine several fields into one text field and thinking about using *CONCAT for that. However it seems that *CONCAT can only merge two fields at a time. If so it would mean a lot of code if I have ten fields to merge.

Am I understanding this correctly?

Thanks for any help!

Lars Holmberg




Software/Hardware used:

Answer Wiki

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

This is similiar to another question I just answered.
use this link to get to it.

Concatenate many *CHAR variables.

Discuss This Question: 4  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.
  • TomLiotta
    As far as I know, Synon *CONCAT concatenates two values. You might need nested functions to continue bringing more values into a single string. (But I haven't actually used Synon in the past decade.) You might also create your own 'user' function based on CharlieBrowne's earlier suggestion in another question. Tom
    125,585 pointsBadges:
  • Yorkshireman
    True - like the RPG Concatentae, 2e concats 2 items a t a time into a third. But the advantages of tracebaility, guaranteed accuracy, and transparency of code outweigh the trivial need to stack up 10 lines of a concat - simple control of spacing too look - LCL.text500 = CONCAT(LCL.text1,LCL.text2,CND.*One) LCL.text500 = CONCAT(LCL.text500,LCL.text3,CND.*One) LCL.text500 = CONCAT(LCL.text500,LCL.text4,CND.*One) LCL.text500 = CONCAT(LCL.text500,LCL.text5,CND.*One) LCL.text500 = CONCAT(LCL.text500,LCL.text6,CND.*One)
    6,085 pointsBadges:
  • SyninGuru
    You can use RTV type Synon message to build a string from any type of multiple fields. By any type, I mean both alphanumeric and numeric values. 
    You will just call the message from action diagram just as any other Synon message. The message will have an output parameter to return the entire value.
    All you need is to define all of the fields as input parameters, and in the content of the message, just use each field with or without blanks, or with commas, additional constant words etc.
    This will combine all of your fields at one line in action diagram.
    10 pointsBadges:
  • SaurabhChakraborty
    use multiple concats to achieve the same or use user source to do the same.
    355 pointsBadges:

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.

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


Share this item with your network: