Note: Built-In Function Rules Usage Options
Right aligns argument into return string.
Arguments
|
Return Values
|
Example
Right align and remove imbedded blanks from a requested string.
DEFINE FIELD(#INTEXT) TYPE(*CHAR) LENGTH(18)
DEFINE FIELD(#OUTEXT) TYPE(*CHAR) LENGTH(18)
**********
REQUEST FIELDS(#INTEXT)
USE BUILTIN(RIGHT) WITH_ARGS(#INTEXT Y) TO_GET(#OUTEXT)
DISPLAY FIELDS(#OUTEXT)
Resulting displays would look something like this:
FUN01 Right Example
In text . . . FR E D
CF1=Help
then,
FUN01 Right Example
Out text . . . FRED
CF1=Help