when iam reading a flat file which has 100 records through
cobol program when iam reading 50th records it gets abends
.. so when i run the program again it should read from 50th
record .where it got abened ? how it is possible



when iam reading a flat file which has 100 records through cobol program when iam reading 50th reco..

Answer / pramod dixit

WHEN EVER THERE IS AN ERROR / ABEND IN THE CODE(50TH
RECORD), BEFORE THE PROGRAM STOPS, WWRITE THAT RECORD INTO
TEMP (PRE DEFINEED AND CREATED) FILE. eVERY TIME THE
PROGRAM IS RUN, CHECK THE TEMP FILE, IF THE TEMP FILE IS
EMPTY, THEN CODE IS NOT ABENDED., IF THE TEMP FILE HAS
VALUES, READ THE TEMP FILE, PASS THE KEY VALUES FROM IT TO
FLAT FILE AND DO A READ. ., AND PERFORM OPRATIONS FOR ALL
OTHER RECORDS AFTER THAT RECORD.

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More COBOL Interview Questions

consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

5 Answers   TCS,


How is sign stored in Packed Decimal fields and Zoned Decimal fields?

6 Answers   ABC, HCL, TCS,


can i give 9(10) in comp 3 instead of s9(10) ? if i can give wht would be ths ans

2 Answers   DELL,


Differentiate between structured cobol programming and object-oriented cobol programming.

0 Answers  


I know my query will return more than one row but I don't want cursor what should I do?

1 Answers  






Can anybody give me example of subscript and index

5 Answers  


What is the difference between NEXT SENTENCE and CONTINUE?

2 Answers   Mphasis,


What is the difference between a binary search and a sequential search?

3 Answers  


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

0 Answers   IBM,


What is report-item in COBOL?

0 Answers   Arigo Infotech,


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?

4 Answers   IBM,


Categories