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

How do we get current date from system with century in COBOL?

806


Can we change the password using ALTER? anyone tried and changed?

1548


) How do u handle errors in BMS macro?

1429


What are various search techniques in cobol? Explain.

650


Differentiate between structured cobol programming and object-oriented cobol programming.

668






what happens if parmparameter passes zero bytes to the program

1667


how do you reference the rrds file formats from cobol programs

800


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2060


what is difference between cobol and cobol/400

21567


how to convert the recors form vsam file to db2 table tru file aid

2763


Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

2337


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

690


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

732


What are literals?

632


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

1588