IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Change the columns to rows and rows to columns


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
k_kirru
Currently Banned

New User


Joined: 14 Sep 2005
Posts: 16

PostPosted: Fri Apr 04, 2008 4:12 pm
Reply with quote

Hi,

I have one sequential file, here I need to change the columns to rows and rows to columns, below is my requirement.

Seq File:

ABC BCD CDE DEF EFG FGH GHI ......
123 234 345 456 567 678 789 .....

Now output file should be:

ABC 123
BCD 234
CDE 345
DEF 456
EFG 567
FGH 678
GHI 789
. .
. .
. .


Can anyone suggest me how to get this in COBOL/EZT/REXX/FOCUS...
if so can you give me the sample code.

Thanks in advance...

Regards,
Kiran
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Fri Apr 04, 2008 4:26 pm
Reply with quote

In COBOL read the first record , store in an array, one array occurence will be your one col , read the second record into a second array ... combine the corresponding array occurences and write into the output file as a single record ...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
Search our Forums:

Back to Top