If you know the message ID of the message you are trying to find in History log, you can use the DSPLOG command...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
with MSGID and you will only see Messages with that message ID. For example: DSPLOG MSGID(CPF0000) will display only messages starting with CPF as their message IDs.
Writing to History log:
Use the following command to write to the History log:
SNDMSG MSG('Message text') TOMSGQ(*HSTLOG)