TRMFSTBLK TRIM FIRST BLANK TAACLRT |
The Trim First Blank command trims an input value after the first
blank position. For example, if 'ABC DEF' is input, 'ABC ' is
returned. The INPVAL may be up to 256 bytes. The RTNVAL parameter
must be specified as *CHAR LEN(256).
A typical series of commands would be:
DCL &RTNVAL *CHAR LEN(256)
.
TRMFSTBLK INPVAL(xxxx) RTNVAL(&RTNVAL)
No error occurs if the input value does not have any blanks.
An option exists to determine how leading blanks should be handled.
The default is to trim them off such that an input of '@@ABC@DEF'
would allow 'ABC@@@' to be returned (assume that @ is a blank).
TRMFSTBLK escape messages you can monitor for
---------------------------------------------
TAA9891 The input value may not be all blanks
Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
INPVAL The input value to be scanned for the first blank.
Up to 256 bytes may be input.
The value may not be all blanks. The value may
contain all non-blanks.
RTNVAL The return value after the INPVAL is trimmed after
the first blank. For example, if 'ABC@DEF' is
input, 'ABC@@@' is returned (assume @ is a blank).
This is an optional return value that if used must
be specified as *CHAR LEN(256).
RTNLEN The length of the characters returned that are
non-blank. For example, if 'ABC@DEF' is input, '3'
is returned (assume @ is a blank). This is an
optional return value that if used must be specified
as *DEC LEN(3 0).
TRMLDGBLK A *YES/*NO value to determine how leading blanks
should be handled.
*YES is the default which would cause 'ABC@DEF' and
'@@ABC@DEF' to be treated the same with 'ABC@@@@@'
being returned (assume @ is blank).
*NO may be specified to cause the leading blanks to
be returned. Thus '@@ABC DEF' would return
'@@ABC@@@@'.
Restrictions
------------
Because the command has return values, it 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
------ ---- --------- ---------- ----------
TRMFSTBLK *CMD TAACLRT QATTCMD
TAACLRTC *PGM CLP TAACLRTC QATTCL
|
Added to TAA Productivity tools September 15, 2006