Advertisement

05.03.2001 at 02:10PM PDT, ID: 20113025
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Splitting an input file into 2 output files

Asked by JJSmith in Unix Systems Programming

Tags:


I have an input file from a legacy COBOL system. The file comprises of 2 batches of records which need splitting into 2 output files with the first line being the batch header followed by the records in the batch - 1 per line. The catch is that the 2 batches and records within are delivered as a single record/line of 100K or more.
All I know is that the first 6 chars is the first batch header and the contents of this tells me the length of the records that follow ( but not how many ), then with no seperation the second batch header is there again specifying the length of records that follow but not how many, although end of file would occur anyway.
I've been advised that it may be possible to seperate these batches using something like AWK - any suggestions?

EXAMPLE LAYOUT:
HEAD10RECORD1001RECORD1002...HEAD07RECORD1RECORD2RECORD3..

HEAD10 - signifies following records of 10 characters
HEAD07 - signifies following records of 7 characters

The batches may arrive in any order in the file, but there is a distinct difference between a batch header record ( always 6 chars ) and a transaction record within the batch. The first batch header is easy to locate but what about the second!!

I'd like a unix script answer if possible - I know it's relatively easy using an application programming language.

Anticipated thanks.
Start Free Trial
[+][-]05.03.2001 at 05:18PM PDT, ID: 6049702

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.04.2001 at 12:09PM PDT, ID: 6051692

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.06.2001 at 08:43AM PDT, ID: 6053641

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.07.2001 at 02:00PM PDT, ID: 6056217

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.07.2001 at 02:07PM PDT, ID: 6056244

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.07.2001 at 02:09PM PDT, ID: 6056253

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.08.2001 at 01:21AM PDT, ID: 6057923

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2001 at 09:23AM PDT, ID: 6059765

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2001 at 09:24AM PDT, ID: 6059775

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Unix Systems Programming
Tags: cobol
Sign Up Now!
Solution Provided By: chris_calabrese
Participating Experts: 4
Solution Grade: A
 
 
[+][-]05.09.2001 at 01:41AM PDT, ID: 6062409

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.09.2001 at 06:13AM PDT, ID: 6063272

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2001 at 10:45AM PDT, ID: 6078656

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2001 at 11:59AM PDT, ID: 6078895

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2001 at 07:37AM PDT, ID: 6081830

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32