IBM i message

CPF9897: General-purpose message (program text, no period)

CPF9897 is a general-purpose IBM i message that programs fill with their own text. It has no fixed meaning of its own. The meaning is the text the program sent, and the sending program is the one to ask about.

Other names for this code

Also written as MSGID CPF9897, CPF9897 message, SNDPGMMSG CPF9897, CPF9897 vs CPF9898, CPF9897 QCPFMSG.

What it means

CPF9897 is one of the general-purpose messages in the IBM i system message file QCPFMSG. Its whole text is a substitution variable, so the program that sends it supplies the words. It is the sibling of the better-known CPF9898. The practical difference IBM i programmers point to is the ending. CPF9898 adds a period after the text, and CPF9897 doesn't, so programmers who want to control the punctuation or show a value on its own use CPF9897.

Programs use these messages because some kinds of message need a message ID. A program can send plain text as an informational message, but an escape message, the kind that ends the sender and reports failure to its caller, must have an ID. CPF9897 and CPF9898 give application code a ready-made one, so a CL program can run SNDPGMMSG with MSGID(CPF9897), MSGF(QCPFMSG) and its own text in MSGDTA.

Because the text is the message, CPF9897 tells you nothing until you read it and find who sent it.

Common causes

  • An application program sent its own error or status text with CPF9897, for example to report a failed business rule.
  • A CL error routine resent an earlier failure as CPF9897 with a short description.
  • A vendor tool or utility reported its own condition using CPF9897.
  • A program sent it as an informational or status message, which only adds a line to the job log or the message line and isn't an error at all.

How to find the problem

  1. Read the text. On the message screen or in DSPJOBLOG, put the cursor on CPF9897 and press F1 to see it in full.
  2. Press F9 on the help screen for the message details. The sending program and library show which application sent it.
  3. Check the message type in the details. An escape message means the sender failed. An informational or completion message is usually just a note.
  4. Search the program source for CPF9897, or for a phrase from the text, to find the line that sends it.

How to fix it

  • Act on what the text says. The fix is usually in the data, the setup or the run order of the application, not in IBM i.
  • If the text isn't clear, send the application's support team the full text, the sending program from F9 and the job log.
  • If the message was an escape message and nothing monitored it, the caller will show a CPF9999 function check after it. Fixing the condition in the text clears both.
  • For your own code, think about defining your own message IDs with CRTMSGF and ADDMSGD. They can carry their own help text, typed values such as numbers, and a severity you choose. A general-purpose message only carries your text.

IBM documentation

IBM Display Message Descriptions (DSPMSGD). Use the documentation for your installed release.

This link opens the relevant IBM reference library or lookup instructions. Match the complete code and your installed product release; it is not a code-specific review.

Read the installed message description:

DSPMSGD MSGID(CPF9897) MSGF(QSYS/QCPFMSG)

Also inspect the full job log and second-level message text, including substitution values.

Report a correction to WND Software.

Questions

What is the difference between CPF9897 and CPF9898?

Both are empty messages that programs fill with their own text. CPF9898 puts a period after the text and CPF9897 doesn't.

How do I find out what CPF9897 means in my job log?

Read its text, then press F1 and F9 on it to see the sending program. The meaning belongs to that program, not to IBM i.

Can I see the definition of CPF9897 on my system?

Yes. Run DSPMSGD with RANGE(CPF9897) and MSGF(QSYS/QCPFMSG) to see its text, severity and other attributes on your release.