how can we find total no of records in a file ....is there
any utility......?

Answer Posted / varsha

//SYSIN DD *
INREC FIELDS=(1,4,C'00001')
SORT FIELDS=(01,04,CH,A)
SUM FIELDS=(05,05,ZD,A)
OUTREC FIELDS=(01,04,05,05)
/*
Briefly, I'm adding a numeric 00001 to each record and
sorting them on the numeric field and summing all such
records, which will give you the desired output.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is length is cobol?

641


Write a program to explain size error.

667


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1693


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

704


How do we get current date from system with century in COBOL?

793






i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

989


What is the difference between goback, stop run and exit program in cobol?

914


How do you define a variable of comp-1 and comp-2?

699


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1605


What is Pic 9v99 Indicates in COBOL?

716


how to access the file from prodution from changeman tool and to submit a file to production

6667


What is amode(31)

714


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

1921


) How do u handle errors in BMS macro

1500


How you can read the file from bottom?

654