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

Answers were Sorted based on User's Feedback



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

Answer / vivek c

Use ICETOOL utility as below.

//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
/*
//CTL1CNTL DD *
OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,
TRAILER1=('FILE1',5X,COUNT=(M10,LENGTH=5))
/*

Is This Answer Correct ?    5 Yes 0 No

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

Answer / 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

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

Answer / roger caviness

fileaid

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More COBOL Interview Questions

what is mainframe? what is the mainframe software ? what is use in s/w field?

7 Answers   CSE,


what is level 66 means??

7 Answers  


I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?

2 Answers  


What is the difference between comp and comp-3 usage?

0 Answers  


Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?

12 Answers   T systems, Tech Mahindra,






how do u link sub pgm to main pgm ?

2 Answers   TCS,


can we read in input the file with a variable length ? please , how ..could you help me ?

3 Answers   EDS,


How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp

3 Answers   CTS,


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

3 Answers   IBM,


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


Following questions were asked in Capegemini on 8th sep,2012 mainframe test 1.)Condition code for dul recors in VSAM- 2.) Is NULL or =NULL in Select statement 3.)max size of CI 4.)What happens after CI is full 5.)Ques on COND parameter 6.)which among following can not be rolled back a)delete table b.)droptable c)Update d.)insert 7.)groupby and orderby sql querries 8.)Max extents in VSAM file 9.)quesn on DPRTY=(1,10) 10.)range of condition codes in COBOL 11.)occurs clase can not be used at which level? 12.)delimiter in jcl 13.)sort card for file in PGM=SORT 14.)PIC(6) value 120056 possible? 15)question on BLKSIZE Is (20,20) and (20,10) possible? 16.)number of bytes in RDF 17.)Can we use index in WS-section or LK-section 18.)Verify command in IDCAMS used for? 19.)question on Alternate Index 20.)Return code of file attribute mismatch 21.)In which format COBOL variables stored? 22.)what is Alternate of HANDLE? 23.)can SUM,AVG,MIN,ROUND used in numeric and char variable data types? 24.)What is the datatype of FILE STATUS codes in WS-section?

2 Answers   Cap Gemini,


What are the different ways to run a COBOL DB2 program using JCL?

2 Answers  


Categories