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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between PIC 9.99 and 9v99 in COBOL?

741


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

654


What is static and dynamic call in cobol?

601


How many bytes S(8) comp field occupy and its maximum value?

1644


What is the Purpose of POINTER Phrase in STRING command in COBOL?

731






How to know whether the module is dynamical or statistical?

667


What are the various section in data division and briefly explain them.

710


Mention the guidelines to write a structured cobol program?

627


What is an in line perform? When would you use it? Anything else you wish to say about it.

653


How to remove 2 duplicate records and copy only one using job control language?

762


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

2349


how do you reference the printer file formats from cobol programs

675


What is the difference between goback, stop run and exit program in cobol?

941


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

691


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

667