Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Change the columns to rows and rows to columns

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Change the columns to rows and rows to columns
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us