godzuki,
When you say
'If record X in File A is in File B then delete record X'
Do you mean the complete record in FileB or only some fields that exist also in FileB ?
1/ If complete record, I fear that you'd better write a little bit of RPG, or ... concatenate all fields of FileA to be compared to the concatenation of all fields of FileB like in the example below.
2/ with some fields only, it can be directly carried out in interactive SQL :
- Concatening 2 alphameric fields:
Delete From FileA a Where a.MyFld1||a.MyFld2 =
( Select b.MyFld1||b.MyFld2 from FileB where b.MyFld1||b.MyFld2 = a.Myfld1||a.Myfld2 )