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
Discuss about changing dataset name in proc.
What rules are to be followed while using the corresponding options?
What is report-item in COBOL?
What are the different rules for performing sort operation?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is a report item?
What is the difference between comp and comp-3 usage?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What is the difference between structured cobol programming and object alternativelyiented cobol?
How arrays can be defined in COBOL?
How can you get the ksds file records into your cobol program?
What are the different types of condition in cobol and write their forms.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
Write some characteristics of cobol as means of business language.
how can i see junk values in dclgen or in hostvariable of comp ?