We will generate XML statement from input records having fixed positions using SORT. We will use REMOVECC, HEADER1, BUILD, JFY,…