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 / krishnan a

1.first use JCL to sort the file then split the file into
two or read the file first 50 record by using count after
reached 50 then move to one file then remaining 50 move to
other file then read file1 and write by using write para
(PERFORM FILE1-WRITE1) then READ SECOND file then write
second FILE2 record(PERFORM FILE2-WRITE2)into the same
output file.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which mode is used to operate the sequential file?

800


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

773


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

752


Define cobol?

979


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1717






Give some examples of command terminators?

849


What is the default value(s) for an initialize and what keyword allows for an override of the default?

831


How are the next sentence and continue different from each other?

875


What are the different rules for performing sort operation?

851


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

2034


What is static and dynamic call in cobol?

678


What is redefines clause in COBOL?

927


) how do u code after getting data?

1657


What guidelines should be followed to write a structured cobol prgm?

766


How can you get the ksds file records into your cobol program?

727