RMVLSTCHR REMOVE LAST CHARACTER TAACLTO |
The Remove Last Character command sets the last character in a
variable to blank. It is primarily intended for use when receiving
escape messages that already have a period at the end of the message
text and should be resent using SNDESCMSG (which causes a period to
be added at the end of the text). The message text must be declared
as *CHAR LEN(512).
A typical series of commands would be:
DCL &MSG *CHAR LEN(512)
.
xxxx /* Some command */
MONMSG MSGID(CPF0000) EXEC(DO) /* Failed */
RCVMSG MSGTYPE(*EXCP) MSG(&MSG)
RMVLSTCHR INPVAL(&MSG)
SNDESCMSG MSG('The xxx command failed with a +
text of - ' *CAT &MSG)
The RMVLSTCHR INPVAL is scanned from the right for the last character
and a blank is inserted. If the value is all blank to begin with, no
error occurs.
RMVLSTCHR escape messages you can monitor for
---------------------------------------------
None. Escape messages from based on functions will be re-sent.
RMVLSTCHR Command parameters *CMD
----------------------------
INPVAL The value to be scanned to remove the last
character. The value is updated and returned in the
same parameter. The variable must be declared as
*CHAR LEN(512).
If the value is all blank to begin with, it is
returned as all blanks without an error.
Restrictions
------------
Because the RMVLSTCHR command returns a variable, the command may
only be used in a CL program.
Prerequisites
-------------
The following TAA Tools must be on your system:
SNDESCINF Send escape information
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RMVLSTCHR *CMD TAACLTO QATTCMD
TAACLTOC *PGM CLP TAACLTOC QATTCL
|
Added to TAA Productivity tools October 15, 2010