Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us