title: append data while double looping of record
body: <p>I have data like given below.</p>
  
  <pre><code>11
  13
  15
  17
  25         
  26
  29
  30
  17  
  25      
  26
  29
  30
  25      
  26
  29
  30
  25       
  26
  29
  30
  17
  25
  26
  29
  30 
  17
  19
  </code></pre>
  
  <p>In this data there are two groups of record (15,17) can occur only once at position only 3rd and 4th only. Second group is (25, 26, 29, 30) and can be occur multiple times.</p>
  
  <p>Record 17 is like a break..after this new group starts and in that group multi subgroups(25,26,29,30) could be present.</p>
  
  <p>I want to append two characters when ever a new group starts, and keep increment the subgroup if doesnt break by breaker record(17).</p>
  
  <p>I hope its cleared.
  My output data looks like this</p>
  
  <pre><code>11
  13
  1115
  17
  2125         
  26
  29
  30
  17  
  3125      
  26
  29
  30
  n225      
  26
  29
  30
  n325       
  26
  29
  30
  17
  4125
  26
  29
  30 
  17
  19
  </code></pre>
  
  <p>tried so far..with this abstract code. But not able to handle subgroups with n character</p>
  
  <pre><code>int line=0
  int seq =0
  
  
      if     (in.equal =15 or 25) {
              line++
              seq++
              context.line = line++  // variable to store line variable
              context.seq = seq++    // variable to store seq variable
              out = context.line+context.seq+in  // out is output record and in is input record mentioned in above data
              flag = 1
              }
      else  (if in.equal = 17 and flag = 1){
              flag = 0
              seq=0
             }
  </code></pre>
  
  <p>Any suggestion please ?</p>