top of page

Messages

  • On AS/400, communication between procedures or programs, between jobs, between users occurs through messages

  • A message can be predefined or immediate

  • A predefined message is created and exists outside the program that uses it.

  • An immediate message is created by the sender at the time it is sent. It is not stored in any message file

 

Predefined Messages

  • A predefined message in a message file is uniquely identified by a seven character identifier and is defined by a message description

  • Message description contains

  1.  First Level Message (148 characters)

  2.  Second Level Message (3016 characters)

  3.  Severity Level

  4.  Valid Reply Values

  5.  Default Reply Values

  6.  Other Attributes

Message Files

vCreate Message File Command- CRTMSGF

Example:

  *CRTMSGF  +

  MSGF(LSSLIB/USRMSGF) +’

  SIZE (164 *NOMAX) +

  AUT (*PUBLIC) +

  TEXT(‘USER MESSAGE FILE”) +

 

  • Other Commands : DLTMSG, MRGMSGF, CHGMSGF

 

Message Description

 

-Use ADDMSGD to add predefined messages and to add them to the message file.

-In the message description, you can specify

  • Message text

  • Message help text

  • Severity code

  • Validity checking values for a reply

  • Default message handling action for the escape messages

  • Creation level

  • Alert options

  • Entry in the error log

 

 Example:

  ADDMSGD  +

  MSGID  (ABC1234)  +

  MSGF (INVENT/STORE)  +

  MSG (‘ENTER ITEM CODE’)

  SECLVL (‘VALID CODES &NA1, &BB2, &PC3’)  +

  SEV (30)  +

  TYPE (*CHAR)  +

  LEN (2)  +

  DFT (XX)

Other Commands: RMVMSGD, CHGMSGD, DSPMSGD, WRKMSGD

bottom of page