for creating the new format, you might use the following approach:
- read the input-file line-by-line
- if a line starts with SBSB_ID
- extract everything befor the WMDS_SEQ and write it to your output-file
- split the rest into WMDS_SEQ-blocks and print all of them to your output-file (seperated by \n)
for creating many SBS_ID-blocks you might modify step 2 of the algorithm above as follows:
- instad or writing the text to a file, write it to a string
- additionally extract the SBSB_ID
- now create a loop, running e.g. 100 times
- create a new SBSB_ID (e.g. by increasing the SBSB_ID by one) and put it into the string
- write the string to the output-file
HTH, Rata