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
What is the difference between next sentence and continue in cobol programing language?
Difference between cobol and cobol-ii?
How do you reference the fixed block file formats from cobol programs
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Which mode is used to operate the sequential file?
What is the difference between PIC 9.99 and 9v99 in COBOL?
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.
I have a File that has duplicate records. I need only those records that occur more than thrice.?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What is the Purpose of Pointer in the string?
What is the utilization of copybook in cobol?
What is perform what is varying?
How many sections are there in data division in COBOL?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..