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 problem of ordered sequential files access?

692


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

702


Give some examples of command terminators?

751


In COBOL, what is the different between index and subscript?

753


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

10571






What is comp-1 and comp-2?

756


Define static linking and dynamic linking.

658


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1763


What kind of error is trapped by on size error option?

736


For rewrite, why is it mandatory that file needs to be opened?

619


Can a Search can be done on a table with or without Index?

800


how do you reference the esds vsam file formats from cobol programs

627


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

739


IF I mention stop run in CICS what happens?

1891


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

639