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 ?    1 Yes 1 No

Post New Answer

More COBOL Interview Questions

What is SSRANGE, NOSSRANGE ?

5 Answers  


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I am going to Display the WS-VARX and WS- VARN?

6 Answers   Xansa,


01 A pic 9(100) find record length of it

6 Answers   TCS,


How can you get the ksds file records into your cobol program?

0 Answers  


how many divisions are there in cobol

3 Answers   ADP,






is this below syntax correct? CALL 'subprg' using A,B Please help

2 Answers  


Without using move verb how to move one variable to another.

5 Answers  


can we use COPY statement in w-s section? how?

3 Answers  


1.Can we define condition-name conditions in FD entry.

11 Answers  


What is the difference between a binary search and a sequential search what are the pertinent cobol?

0 Answers  


What is the difference between PIC 9.99 and 9v99?

7 Answers  


what are the utilities for load and unload the DB2 tables

1 Answers   L&T,


Categories