SELECT
  RTRIM(SRCE) AS srce,
  RTRIM(WRKO) AS wrko,
  BTID AS btid,
  "ENT#" AS "ent#",
  "SEQ#" AS "seq#",
  RTRIM(PART) AS part,
  RTRIM(RPLN) AS rpln,
  PQTY AS pqty,
  RTRIM(ARSC) AS arsc,
  RTRIM(ADEP) AS adep,
  RTRIM(ACTN) AS actn,
  RTRIM(ACCT) AS acct,
  AMNT AS amnt,
  RTRIM(SRSC) AS srsc,
  RHRS AS rhrs,
  RCRW AS rcrw,
  SHRS AS shrs,
  SCRW AS scrw,
  RRAT AS rrat,
  RSIZ AS rsiz
FROM FANALDEV.FFPDGLR1
INNER JOIN LGDAT.RPRH ON NWBTID = BTID
WHERE DIGITS(NWFSYY)||DIGITS(NWFSPP) >= {ffpdglr1_wm}
