Ü    MESSAGE

 

·       Message is information that is communicated between users, programs and workstation.

·       There are different types of messages that are generated for the life cycle of the job.

·       There are 2 classes of messages:

1)      Impromptu/Immediate message

2)      Predefined message

 

1)      Impromptu/Immediate message: All the messages that are not predefined is impromptu messages. Since it is not defined in the system, it will not have message-id or message file. All impromptu messages are supplied message text with the message command itself.

The commands that we use in CL to send impromptu messages are:

ü  Control language

v  SNDUSRMSG

v  SNDPGMMSG

v  SNDMSG

v  SNDBRKMSG

Other than these commands, we can also use some keywords in display file to generate impromptu messages:

ü  Display files

v  ERRMSG

v  SFLMSG

 

2)      Predefined message: Predefined messages exist prior to runtime and we don’t need to supply text at run time as we do with the impromptu messages. e.g. CPF9821 of message file QCPFMSG

The message code consist of : CPFxxxx, where x=0 to 9 or A to F.

The commands that we use in CL to send impromptu messages are:

ü  Control language

v  SNDUSRMSG

v  SNDPGMMSG

v  RTVMSG

Other than these commands, we can also use some keywords in display file to generate impromptu messages:

ü  Display files

v  ERRMSGID

v  SFLMSGID

v  MSGCON

v  MSGID

 

Ü   Types of messages

ü  COMPLETION message

It signals the successful completion of the processing.

 

ü  DIAGNOSTIC message

It tells the calling program about errors detected by the program. Completion message tell the result of work done by the program.

 

ü  STATUS messages

Using SNDPGMMSG command status message can be sent to it’s caller’s program message queue or to the external message queue for the job. These message tell the receiving program the status of the work performed by the sending program.

 

ü  ESCAPE message

Using SNDPGMMSG command escape message from a CL program can be sent to it’s calling program. An escape message tells the calling program ended abnormally and why.

 

ü  NOTTFY message

Notify message from a CL program can be sent to the message queue of calling program or to the external message queue. A notify message tells the calling program about a condition under which processing can continue.

 



 

 







User Comments:



Subscribe

  Email:



Copyright © www.go4as400.com, 2013-2017. Copyright notice