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
What is Pic 9v99 Indicates in COBOL?
How are the next sentence and continue different from each other?
IF I mention stop run in CICS what happens?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
how can i see junk values in dclgen or in hostvariable of comp ?
Which is not true about evaluate statement
example for sub strings ? and refernce modifications whit output pls
Have you used comp and comp-3 in your project? And how?
What are literals?
How to print 10 to 1 if the input have only 10 digit number?
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
Which division and paragraphs are mandatory for a COBOL program?
What is the difference between a binary search and a sequential search what are the pertinent cobol?