Cobol interview question.
Posted: Tue Jun 10, 2014 2:18 pm
Hi
Interviewer said, suppose there is a sequential file with millions of records, used as i/p. When a job uses this file and due to some data problem the job abends. How can you find out which particular record is the culprit?
My answer was:
I would first look at the abend description then from the compile listing of the program,I will search for the particular verb that has caused problem. Will basically get offset of the instruction. Based on the result of the above I would view the file with its copy book for the location of the particular field using filel-aid, for example the location of the field is 45: Field-Name 45 EQ ' '
Which would get the records that match the value.With an assumption that the field value should not be space.
Please help if it's correct or there are better ways of doing it.
Interviewer said, suppose there is a sequential file with millions of records, used as i/p. When a job uses this file and due to some data problem the job abends. How can you find out which particular record is the culprit?
My answer was:
I would first look at the abend description then from the compile listing of the program,I will search for the particular verb that has caused problem. Will basically get offset of the instruction. Based on the result of the above I would view the file with its copy book for the location of the particular field using filel-aid, for example the location of the field is 45: Field-Name 45 EQ ' '
Which would get the records that match the value.With an assumption that the field value should not be space.
Please help if it's correct or there are better ways of doing it.