how would find total records in files using sequential?



how would find total records in files using sequential?..

Answer / Matendra Singh Manu

To find the total number of records in a file using sequential access, you can read each record and increment a counter until reaching the end of the file. Here's an example in COBOL:n SET COUNTER TO 0n OPEN INPUT FILEn PERFORM UNTIL END-OF-FILEn READ RECORDn IF ADVANCING THENn ADD 1 TO COUNTERn END-IFn END PERFORMn CLOSE FILEn DISPLAY 'Total Records: ', COUNTER

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More IBM MainFrame AllOther Interview Questions

When are scope terminators compulsory?

1 Answers  


Is it rquired any server for Ibm framework? Give me list of Ibm framework & recent version IBm framework?

0 Answers   IBM,


how to handle -911 (deadlock) error in a db2 program so that the program will never abend?

1 Answers   IBM,


What is use of IBM framework?

1 Answers   IBM,


have you ever know what is the meaning of Packed Decimal  

1 Answers  


what sorting order does search all have?

1 Answers   IBM,


List the type of locks?

1 Answers  


What is mainframe computer /system?

1 Answers  


how is the future of tandem mainframe?

1 Answers  


How to declare host variables?

1 Answers  


What will happen if both steplib and joblib are determined?

1 Answers  


How can a like table be created?

1 Answers  


Categories