RTVMSGD3 RETRIEVE MESSAGE DESCRIPTION 3 TAAMSKG |
The Retrieve Message Description 3 command retrieves the format of
the replacement data descriptions for a specific message ID. A large
variable is returned made up of 20 byte elements for up to 49
replacement descriptions. Each element contains the type, the
length, and the number of decimal positions if any. The QMHRTVM API
is used.
When writing a loop to process the elements, a blank entry will
always exist after the last value.
The format of each element is:
1 - 2 The number of the replacement value
3 - 5 The length of the replacement value
6 - 7 The number of decimal positions if the
type is decimal.
8 - 17 The type of replacement value
18 - 20 Reserved
A typical series of commands would be:
DCL &RPLDSC *CHAR LEN(1000)
DCL &RPLVAL *CHAR LEN(20)
DCL &RX *DEC LEN(3 0) VALUE(-19)
DCL &RPLNBR *CHAR LEN(2)
DCL &RPLLEN *CHAR LEN(3)
DCL &RPLDEC *CHAR LEN(2)
DCL &RPLTYP *CHAR LEN(10)
DCL &NBRRPL *DEC LEN(3 0)
DCL &COUNT *DEC LEN(3 0)
.
RTVMSGD3 MSGID(aaannnn) MSGF(xxx) +
RPLDSC(&RPLDSC)
NXTRPL: CHGVAR &COUNT (&COUNT + 1)
IF (&COUNT *LE &NBRRPL) DO /* LE number */
CHGVAR &RX (&RX + 20)
CHGVAR &RPLVAL %SST(&RPLDSC &RX 20)
CHGVAR &RPLNBR %SST(&RPLVAL 1 2)
CHGVAR &RPLLEN %SST(&RPLVAL 3 3)
CHGVAR &RPLDEC %SST(&RPLVAL 6 2)
CHGVAR &RPLTYP %SST(&RPLVAL 8 10)
/* */
/* Your code to handle the value */
/* */
/* */
GOTO NXTRPL
ENDDO /* Some value */
Note that the &RPLDEC value will be blank for all but *DEC type
fields.
RTVMSGD3 escape messages you can monitor for
--------------------------------------------
None. Escape messages from based on functions will be re-sent.
RTVMSGD3 Command parameters *CMD
---------------------------
MSGID The 7 character message ID to retrieve the
replacement format information for.
MSGF The qualified name of the message file to retrieve
from. The library value defaults to *LIBL. A
specific library or *CURLIB may also be used.
RPLDSC The return value for the replacement descriptions.
Up to 49 descriptions may be returned (the last
value will be blank). Each description is 20 bytes
long with a format of:
1 - 2 The number of the replacement value
3 - 5 The length of the replacement data
6 - 7 The number of decimal positions if the
type is decimal
8 - 17 The type of replacement value
18 - 20 Reserved
All values are in character format.
This is an optional return value that if used must
be specified as *CHAR LEN(1000)
NBRRPL The number of replacement values defined for the
message description.
This is an optional return value that if used must
be specified as *DEC LEN(3 0).
Restrictions
------------
Because RTVMSGD3 returns values, the command may only be used in a CL
type of program.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKOBJ3 Check object 3
RSNLSTMSG Resend last message
SNDESCINF Send escape information
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVMSGD3 *CMD TAAMSKG QATTCMD
TAAMSKGC *PGM CLP TAAMSKGC QATTCL
|
Added to TAA Productivity tools January 15, 2013