The command is ? WRKMSGD MSGID(X) MSGF(QCPFMSG). You provide the message ID in place of “X”. Most common messages will exist in the message file QCPFMSG (Those that begin with CPF* & MCH*).
If you can’t find it there, search for an *MSGF object (DSPOBJD) that starts with the Qxxx where “xxx” is the first three characters of the message id. That seems to be the pattern IBM has been following for their message IDs.