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
What is the problem of ordered sequential files access?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
Give some examples of command terminators?
In COBOL, what is the different between index and subscript?
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 ......
What is comp-1 and comp-2?
Define static linking and dynamic linking.
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What kind of error is trapped by on size error option?
For rewrite, why is it mandatory that file needs to be opened?
Can a Search can be done on a table with or without Index?
how do you reference the esds vsam file formats from cobol programs
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
IF I mention stop run in CICS what happens?
How can you get the ksds file records into your cobol program?