i have n records in one file and in this file there is some
fields and i want to count that how many sharma in my file
so plz give the coding that how we read sharma ?

Answer Posted / abhay

using SORT UTILITY(OUTFIL) AND THROUGH SORT(OUTREC),its
possible..
..
1)THROUGH SORT UTILITY(OUTFIL):

//S1 EXEC PGM=SORT
//F1 DD DSN=....
.
.
//SYSIN DD *
SORT FILEDS=(1,4,CH,A)
OUTFIL FILE 1 INREC FIELDS=(10,5,CH,EQ,C'SHARMA')
*/
//

2)THROUGH SORT(OUTREC):

//S1 EXEC PGM=SORT
//DD1 DD DSN=....
//DD2 DD DSN=.... Where o/p contains SHARMA will move into DD2
.
.
//SYSIN DD *
SORT FILEDS=(1,4,CH,A)
OUTREC FIELDS=(10,5,CH,EQ,C'SHARMA')
*/
//

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name some of the examples of COBOl 11?

2686


What are literals?

632


A table has two indexes defined. Which one will be used by the SEARCH?

759


What is the utilization of copybook in cobol?

657


What is the use of intialize verb?

750






Can we redefine the field of x(200) to less than 200?

818


Explain how to differentiate call by context by comparing it to other calls?

689


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

748


What are all the divisions of a COBOL program?

665


how do you reference the ksds vsam file formats from cobol programs

666


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1653


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

667


What is difference between static and dynamic call in cobol?

777


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

1790


What is cobol?

745