1

I am trying to write a unit test for reading message files (for node-jt400 which wraps open-jt400 to javascript.)

I am wondering if there is a Message File (MSGF) that can be used that is likely to be on any IBM i computer (Say a temporary MSGF that is created for every user upon connecting, or QCBLMSGE which is the COBOL RUN TIME MESSAGE FILE on the machine I work with).

I am not implementing creating or deleting message files, otherwise I would create one and unit test all of those cases as well and not require this.

Thanks in advance.

Cody G
  • 8,368
  • 2
  • 35
  • 50

1 Answers1

7

The QCPFMSG message file exists on every system in the QSYS library.

David G
  • 3,940
  • 1
  • 22
  • 30
  • I am just going to pick one message ID at random to use as a test case, unless you think that these vary wildly from version to version... CPDBC27 "File not found" seems like a good one... – Cody G Jun 28 '18 at 17:29
  • 5
    Just pick one that is documented for a basic command like `DSPOBJD`. It won't ever change. Here is a good one `CPF2105`. That is "Object &1 in &2 type *&3 not found." Or `CPF9898`; That's a custom message. Been that way since the beginning of time. – jmarkmurphy Jun 28 '18 at 17:38