Hi I would like to have some help to do the particular problem using synctool.

I have two input PSTRGE09.FIRST and TRGE09.SECOND (the record length is 10)each PS contains a record and it contains a numerical value

and two output PSTGRE09.OUT1 and TRGE09.OUT2 (the record length is 10)

I need to compare the fields from TRGE09.FIRST and TRGE09.SECONDand if the first one is lesser than or equal to the second one the first one is put into TGRE09.OUT1 or if the first one is greater than the second one the second one is put into TRGE09.OUT2

Let me see if I understand your requirements. Basically, you want to keep only the smaller values. If the smaller value comes from the 1st file, put it in OUTFIL1, doing nothing with the record from File2. However, if the smaller value is in File2, then write the record from File2 to OUTPUT2 and do nothing with the record from File1. Am I correct so far?

And is there a key field in each file that will correspond the records from File1 to File2?