We help IT Professionals succeed at work.
Get Started

Parse a Text File Based on Record Number in File

sparker1970 asked
Last Modified: 2016-10-04
I have a fixed length file I receive from a client that contains 12 potential record types. The records are identified by a 3 digit number in positions 33-35 called a Transaction-Code.

What I need is a batch program that can split the file by Transaction-Code and output the entire record as a text file:

Transaction-Code / File Output
110 / Record110.txt
111 / Record111.txt
210 / Record210.txt
211 / Record211.txt
213 / Record213.txt
214 / Record214.txt
300 / Record300.txt
400 / Record400.txt
700 / Record700.txt
800 / Record800.txt
900 / Record900.txt
910 / Record910.txt
Watch Question
Distinguished Expert 2019
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE