how can we find total no of records in a file ....is there
any utility......?
Answers were Sorted based on User's Feedback
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 |
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 |
what is mainframe? what is the mainframe software ? what is use in s/w field?
what is level 66 means??
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?
What is the difference between comp and comp-3 usage?
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 ?
can we read in input the file with a variable length ? please , how ..could you help me ?
How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp
how can we find total no of records in a file ....is there any utility......?
What are the differences between OS VS COBOL and VS COBOL II?
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?
What are the different ways to run a COBOL DB2 program using JCL?