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

how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


Should I use STOP RUN in the sub program??why?

6 Answers   Xansa,


hw to create 3 dimensional array & hw to access it?

1 Answers  


What does the IS NUMERIC clause establish ?

2 Answers  


WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.

4 Answers   Atos Origin,






Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks

0 Answers  


How do you come out of an EVALUATE statement?

3 Answers  


How to read a record from bottom of a file which is indexed by 'A'.

4 Answers   Oracle,


what is Pic 9v99 Indicates?

2 Answers  


What is the problem of ordered sequential files access?

0 Answers  


how do you reference the printer file formats from cobol programs

0 Answers  


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


Categories