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 / ch. ranveer singh

//Aaaaaaaa JOB ,'ADC',NOTIFY=&SYSUID
BY CH . RANVEER SINGH GURJAR




//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=WW.W.AHOC.ADC.P1,DISP=SHR
//SORTOF1 DD DSN=WW.W.AHOC.ADC.P2,DISP=SHR
//SORTOF2 DD DSN=WW.W.AHOC.ADC.P3,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FILES=(1,2),SPLITBY=50
/*
//

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rmode(any) ?

690


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

835


What are declaratives and what are their uses in cobol?

716


Which division and paragraphs are mandatory for a COBOL program?

715


What is difference between static and dynamic call in cobol?

789






What kind of error is trapped by on size error option?

749


Have you used comp and comp-3 in your project? And how?

2014


HOw can I get the negative sign while deduct high value from low value

1802


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1912


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

835


What are the access modes of START statement?

728


What is redefines clause in COBOL?

853


) How do u handle errors in BMS macro?

1435


Write the code implementing the perform … varying.

648


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

725