DUPCHAR DUPLICATE CHARACTERS TAACLTY |
The Duplicate Characters command duplicates a string of 1 to 50
characters to a return variable. An output length must be described.
The return variable must be 32,000 bytes. DUPCHAR can be used as a
testing aid or for other unique situations.
A typical command would be:
DCL &OUTCHR *CHAR LEN(32000)
.
DUPCHAR INPCHR(ABC) OUTLEN(10) OUTCHR(&OUTCHR)
The INPCHAR value would be duplicated until 10 characters existed.
The return value would be 'ABCABCABCA'.
Note that the output length does not have to cause an even multiple
of the input characters.
You could also specify:
DUPCHAR INPCHAR(X) OUTLEN(5) OUTCHR(&OUTCHR)
and the return value would be 'XXXXX'.
DUPCHAR escape messages you can monitor for
-------------------------------------------
TAA9891 The INPCHR value cannot be all blank
Escape messages from based on functions will be re-sent.
DUPCHAR Command parameters *CMD
--------------------------
INPCHR The input characters to be duplicated. Up to 50
characters may be entered. The length of the data
will be determined by the right most non-blank
character. Embedded blanks are valid. An all blank
value is invalid.
OUTLEN The length of the characters after duplication. A
value between 2 and 32,000 must be entered. The
length must be equal to or greater than the length
of the input value.
OUTCHR The result of the duplicated characters. This is a
required return variable that must be declared as
*CHAR LEN(32000).
Restrictions
------------
Because DUPCHAR returns a variable, the command may only be used in a
CL program.
Prerequisites
-------------
The following TAA Tools must be on your system:
RTVVALA Retrieve value attributes
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
------ ---- --------- ---------- ----------
DUPCHAR *CMD TAACLTY QATTCMD
TAACLTYC *PGM CLP TAACLTYC QATTCL
|
Added to TAA Productivity tools October 15, 2012