E$PGMMSG - Send a message or retrieve object attributes
Start Command
- call e$pgmmsg (<request> <message data structure> <queue> <program>)
Call Parameters
- request (a4)
- Action to perform:
- Value: *SND
- This value instructs the program use the data in the message data structure to send a message from a messagefile to the specified queue.
- Value: *OBJ
- This value instructs the program to retrieve a job attribute and attributes from a *PGM object, specified in queue (the name of the library) and program.
- message data structure (a161)
Sending a message- The structure has the following subfields when used for sending a message:
- Message Identifier: MSGID, Postions 1-7
The message id is used to retrieve message text from a message file. - Message Severity: MSGSV, Positions 8-9
The severity of the message is retrieved from the message definition and returned to the calling program through this subfield. - Message Data: MSGDT, Positions 10-141
Message data is used for variables defined within the message text (&1, &2, etc.) and used by the message sending command SNDPGMMSG. - Message File: MSGFL, Positions 142-161
This subfield contains two fields of 10 characters each:- Library
The name of the library of the message file to use. Standard value is *LIBL. - Messagefile
The name of the message file to use.
- Library
- If the message identifier is empty, no message is sent and the message queue *PRV is emptied.
- The structure has the following subfields when used for sending a message:
- queue (a10)
- The name of the message queue to send the message to.
- program (a10)
- The name of the program that is sending the message.
Return Parameters
- message data structure (a161)
Retrieve Object- and Jobattributes- Data retrieved is returned to the calling programm through this parameter. The structure has the following subfields when used for retrieving data:
- Object description: TEXT, Positions 1-50
- OS/400 release where program was compiled: SYSLVL, Positions 51-59
- Compiler name and release: COMPILER, Positions 60-75
This field contains two subfields:- Compiler name, Positions 1-7 (60-66 of COMPILER)
- Compiler release, Positions 8-16 (67-75 of COMPILER)
- Runmode: Job TYPE, Position 76
This is a job attribute which is converted to 'B' for batch mode and 'I' for interactive mode.
- See the source of DS_E$PGM how this data is used.
- Data retrieved is returned to the calling programm through this parameter. The structure has the following subfields when used for retrieving data:
What it does
- Read above.
Examples
- See FN_E$MSG for a coding example.
Go to download page



Transportation Administration System
Snoezelen Pillows for Dementia
Begeleiders voor gehandicapten
Laat uw hond het jaarlijkse vuurwerk overwinnen
Betuweroute en Kunst
Hey Vos! Je eigen naam@vos.net emailadres?
Kunst in huis? Nicole Karrèr maakt echt bijzonder mooie dingen
Kunst in huis? Netty Franssen maakt ook bijzonder mooie dingen