I have special condition while removing the duplicate records. For a given household the policy details and vehicle details remains the same and only driver details and error code varies. If its a policy error or vehicle error i need to retain only the first record for the household; if its a driver error i need to retain all the records in that household.
Here you are populating the output file based on the condition in the INCLUDE statement.
(41,1,CH,EQ,C'D') - if its driver error you are populating all the records to the output.
(81,4,ZD,EQ,+1,AND,41,1,SS,EQ,C'PV') - Why are we using +1 in the Sequence check and when we use SS will it check for P or V in the 41st position?
Joined: 15 Aug 2015 Posts: 452 Location: Bamberg, Germany
It's pretty easy. Your Input is pre-sorted, so we can assign an ascending number (col. 81) to every Policy. The value restarts with every new Policy number. Next is to ask for the first PERR/VERR or anything DERR.
If your input is not pre-sorted, you just replace INREC with OUTREC and SORT in advance. The logic should be the same.