Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 ......

Answer Posted / gm

Simple. Read the input file in sequence.
Store the first 50 records in a table.
When you start reading from 51st record,
Build your output record with one half of
the record from the table (record 1) and the
other half from the input that u have read (51)
and write the output record.
Loop thru till end.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between next sentence and continue in cobol programing language?

1163


Difference between cobol and cobol-ii?

1197


How do you reference the fixed block file formats from cobol programs

1158


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

820


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1063


Which mode is used to operate the sequential file?

1152


What is the difference between PIC 9.99 and 9v99 in COBOL?

1245


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

6452


I have a File that has duplicate records. I need only those records that occur more than thrice.?

9748


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2173


What is the Purpose of Pointer in the string?

1028


What is the utilization of copybook in cobol?

1117


What is perform what is varying?

1111


How many sections are there in data division in COBOL?

1080


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2015