Program P1 which calls file F1 which has 100 records



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Program P1 which calls file F1 which has 100 records

Postby ganeshpande » Wed Nov 17, 2010 5:43 pm

I have program P1 which calls file F1 which has 100 records
and following structure
001 ..................
002 ..................
003 ..................
...
....
...
098 ....................
099 ...................
100 ....................

Now I want to read these files and write these records in
file F2 in following manner.

001 ...... 051 .....
002 ...... 052 .....
003 ...... 053 .....
.......... .......
.......... .......
.......... .......
048 ........ 098 ......
049 ....... 099 .......
050 ....... 100 ......
ganeshpande
 
Posts: 2
Joined: Wed Sep 01, 2010 2:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Program P1 which calls file F1 which has 100 records

Postby prino » Wed Nov 17, 2010 8:46 pm

Programs don't call files.

What have you tried so far that didn't work?
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: Program P1 which calls file F1 which has 100 records

Postby Robert Sample » Wed Nov 17, 2010 9:06 pm

Terminology is critical in IT, where similar terms may mean very different things. So far, your use of incorrect terminology does not help provide you solutions. Learning to use appropriate terminology should be a very important part of your learning process.

Use an array to hold the first 50 records, then you can easily output the concatenated records.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post