1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Concatenating strings in a BTM

Discussion in 'Support' started by pizzaman, May 1, 2016.

  1. pizzaman

    Joined:
    Oct 24, 2011
    Messages:
    53
    Likes Received:
    0
    How do I concatenate two strings in a BTM without spaces between them. Concatenating in REXX is so easy, but for the life of me I don't know how to accomplish that in a BTM.

    I want to write filenames, but changing the final letter based on a variable. There has to be a way, but I'm too stupid to figure it out. Would somebody give me a hint? :)
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,288
    Likes Received:
    39
    Code:
    set foo=abc
    set bar=xyz
    echo %foo%%bar%
    echo %[foo]%[bar]
    
     
  3. pizzaman

    Joined:
    Oct 24, 2011
    Messages:
    53
    Likes Received:
    0
    Thanks for the prompt response and the correct answer. I should have been able to figure that out myself, but I didn't.
     
  4. CarlM

    Joined:
    Jan 16, 2009
    Messages:
    45
    Likes Received:
    0
    No, it's not that you should have been able to figure it out. It is that the documentation in general is poor. This particular issue is documented, but it is very hard to find because the index is also poor. I hope it gets improved.
     

Share This Page