title: Concatenate string by its length COBOL
body: <p>Need to concatenate 4 strings to a destination variable in cobol.</p>
  
  <p>Like,</p>
  
  <pre><code>01 WS-S1 X(10) VALUE "HI ".
  01 WS-S2 X(10) VALUE "HOW ".
  01 WS-S3 X(10) VALUE "ARE ".
  01 WS-S4 X(10) VALUE "YOU?".
  </code></pre>
  
  <p>to a resultant string </p>
  
  <pre><code>"HI HOW ARE YOU?"
  </code></pre>
  
  <p>Can anyone please help me out?</p>