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
What is rmode(any) ?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What are declaratives and what are their uses in cobol?
Which division and paragraphs are mandatory for a COBOL program?
What is difference between static and dynamic call in cobol?
What kind of error is trapped by on size error option?
Have you used comp and comp-3 in your project? And how?
HOw can I get the negative sign while deduct high value from low value
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
What are the access modes of START statement?
What is redefines clause in COBOL?
) How do u handle errors in BMS macro?
Write the code implementing the perform … varying.
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?