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 ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are the pertinent COBOL
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
how do you reference the printer file formats from cobol programs
) what is the difference between AID and HANDLE AID?
Mention the guidelines to write a structured cobol program?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
What type of SDLC u followed? Why?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
) How do u handle errors in BMS macro?
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 ......
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How to remove 2 duplicate records and copy only one using job control language?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need