I've been trying to use keyxfer on an LPAR with 3072 length keys and found it doesn't work. After some discussion with IBM Support we've identified that token_lenx and tokenx don't allocate enough space. Suggested updates are to increase these two values in the PKDS_READ and PKDS_WRITE functions:
Current:
token_lenx = "00000600"x
tokenx = COPIES("00"x,1600)
New:
token_lenx = "000009C4"x
tokenx = COPIES("00"x,2500)