Results 1 to 6 of 6

Thread: String Concatenation

  1. #1
    Code400 Newbie rananga's Avatar
    Join Date
    Oct 2007
    Location
    Sri Lanka
    Posts
    39
    Rep Power
    557

    String Concatenation

    Hi all,

    Can some body please explain me the way to use |> ''''|< signs instead of *cat operation in a CL program.

    Thank you

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

  3. #2
    Code400 Newbie rananga's Avatar
    Join Date
    Oct 2007
    Location
    Sri Lanka
    Posts
    39
    Rep Power
    557

    Re: String Concatenation

    Also can you all please explain me the difference and the usage between *CAT, *BCAT & *TCAT.

    All these time i was searching about this thing and got fed up.
    If you can please give me a link to refer. That also would be great.

    Thanks in advance

    Rananga.

  4. #3
    Analyst MarkBoyer's Avatar
    Join Date
    Aug 2007
    Location
    Las Vegas
    Posts
    62
    Rep Power
    687

    Re: String Concatenation

    *CAT or || Joins two strings "as is"
    *BCAT or |> Joins two strings with a single blank space between
    *TCAT or |< Joins two strings trimming first string

    'String One ' *CAT 'String Two ' Yields 'String One String Two '
    'String One ' *BCAT 'String Two ' Yields 'String One String Two '
    'String One ' *TCAT 'String Two ' Yields 'String OneString Two '

  5. #4
    Analyst MarkBoyer's Avatar
    Join Date
    Aug 2007
    Location
    Las Vegas
    Posts
    62
    Rep Power
    687

    Re: String Concatenation

    Wow, spaces removed by HTML process...
    PHP Code:
    'String One     ' *CAT 'String Two     ' Yields 'String One     String Two '
    'String One     ' 
    *BCAT 'String Two     ' Yields 'String One String Two '
    'String One     ' 
    *TCAT 'String Two     ' Yields 'String OneString Two ' 

  6. #5
    Code400 Newbie rananga's Avatar
    Join Date
    Oct 2007
    Location
    Sri Lanka
    Posts
    39
    Rep Power
    557

    Thumbs up Re: String Concatenation

    Thanks a lot mark.
    Your explanation was great

    Have a nice day


    Rananga

  7. #6
    Experienced Forum Member arrow483's Avatar
    Join Date
    Oct 2004
    Location
    New Hampshire
    Posts
    1,741
    Rep Power
    4219

    Re: String Concatenation

    FYI: You can find all kinds of answers here http://publib.boulder.ibm.com/infoce...v5r4/index.jsp

    Download the CL, RPG, and other manuals as needed.

  8. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

Facebook Comments


Similar Threads

  1. String Parsing in RPG IV
    By subhashree in forum RPG/RPGLE
    Replies: 22
    Last Post: July 11th, 2012, 09:48 AM
  2. Error with String Concatenation
    By jwglista in forum RPG/RPGLE
    Replies: 2
    Last Post: September 25th, 2006, 08:57 AM
  3. Question about JDBC?
    By Jackie in forum JAVA
    Replies: 21
    Last Post: June 29th, 2006, 12:47 PM
  4. %check sqlrpgle
    By christinaf in forum RPG/RPGLE
    Replies: 1
    Last Post: January 19th, 2006, 03:56 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •