SELECT
  RTRIM(IHPART) AS ihpart,
  RTRIM(IHUNT1) AS ihunt1,
  RTRIM(IHUNT2) AS ihunt2,
  IHCNV1 AS ihcnv1,
  IHCNV2 AS ihcnv2,
  CASE WHEN IHCDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE IHCDAT END AS ihcdat,
  RTRIM(IHCUSR) AS ihcusr,
  CASE WHEN IHUDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE IHUDAT END AS ihudat,
  RTRIM(IHUUSR) AS ihuusr
FROM LGDAT.PUNIT
