CHANGE in OUTREC statement can be used to look up and change the content in the file while sorting. Build…