Page 1 of 1

Convert a file from Vertical Layout to Horizontal Layout

PostPosted: Fri Apr 27, 2012 5:41 pm
by pjagathis
Hi all,

Need to convert the file from vertical layout to Horizontal Layout..

Input File:

00|X|201203|123|
00|X|201205|789|
00|X|201204|456|


Output File:

00|X|201203|123|456|789


3rd field indicates the year and month. So based on that field, i have to write to horizontal layout.

I have to write it in sorted order based on year and month.

03 month value should come as first, then 04 month value, then 05 month value and so on.

Re: Convert a file from Vertical Layout to Horizontal Layout

PostPosted: Fri Apr 27, 2012 6:01 pm
by enrico-sorichetti
Please do the needful.

Why do not start doing that Yourself ???
You have the need, we do not have the need nor any obligation :evil:

the <SORT> related forums have quite a few examples on how to do it !

Re: Convert a file from Vertical Layout to Horizontal Layout

PostPosted: Fri Apr 27, 2012 9:15 pm
by dick scherrer
Hello,

What should happen if the input "months" are not consecutive?

How many months is the maximum?

What are the recfm and lrecl for the files?