Member Avatar

Would anybody know of a way to take a text file and break it up on specific lines? For example, let's say I have a text file such as "This is my text file". I want to split it up like "This is" "my text" "file". Therefore I want to split it on line 7 and 15. There are tons of Split examples out there, but nothing that I can find where you can split at a specific line.

I am specifically trying to split a Cobol text file in order to read specific data. So if anybody knows of a better way of doing this, I would appreciate the input.

Recommended Answers

By line you mean charactercount IN a line of text?

Jump to Post

All 2 Replies

By line you mean charactercount IN a line of text?

Member Avatar

Sorry, yes. That's what I meant. I just found the substring method and it is working.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.