I want to write to space with "-" for a separate integer and separate character such asSorry, but I don't know COBOL and have absolutely no idea, what you want to achieve.
Do you just want to separate text/number with dashes?
What is the COBOL format and how should the items be separated?
Please provide a little more information.
Input asdfggh Output asd-fg-gh by Conditional is start position : 1 and end position : 4.Unfortunately I still don't understand what you need.
Could you describe it in a different way?
And give an example input/output.
Yes. please help me for example with these cases.asdfghjk to asd-fg-hijk = 3, 2 and 4 characters (You must have missed the letter "i" in the before string)
1234567 to 12-345-67 = 2, 3 and 2 characters
xx-xxx-xx-xxxx-xxxx = 2, 3, 2, 4 and 4 characters
asdfggh to asd-fg-gh = 3, 2 and 2 characters
Is there a logic in it? The four examples you gave us are all different.
both characters and numeric.If you answer the question first. What is the logic?
When do we split into 3, 2 and 4 and when into 2, 3 and 2 and when into 2, 3, 2, 4 and 4 and when into 3, 2 and 2 characters? And I assume there are others yet to come.