Q1) There is a master file(PS) A and we have two more PS files B & C which has the updated records which is a part of A(Master file), Basically we have to match the records in A with B & C and update the records in master file(A). how can we do that?
Q2) I am writing some records through a cursor into a PS file at some point for some reason the programe is getting abend or stopped at 1000th record. now how can i start from the 1001th record and continue the process.
Note: These questions were asked in an interview, i dont know the answers thats the reason i am posting here.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
1. Either write a 3-file match/update or first combine the 2 transaction files into one and then do a 2-file match/update to update fileA.
2. The program would need to include restart logic. Places that still perform this type of restart already have a methodology in place and whatever it is, that methodology should be used. Implementing restart logic is less and less common due to the speed of the new cpus and dasd as well as the complexity of managing the restart in a large integrated environment. It is usually faster and cleaner to restart from the beginning of a process than try to continue from some point "in the middle".
Hi i think you are using Cobol as Programing Lang
Q1) Merge both B and C and then use matching logic
Dont forget to use Sort step before that
Q2) Restart logic should be used...Normaly we use Restart logic for programs involves Databse operation