Where allowed to run:
|
Parameters Examples Error messages |
The COZZI-Copy Text Right-Adjusted (CLRIGHT) command copies a character variable or text string to a target CL variable, right-justified. If you have the latest IBM i PTFs installed and you are running IBM i v7r1 you may be able to use %TRIMR instead of this command.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
VAR | CL variable name | Not restricted | Required, Positional 1 |
VALUE | Text to be copied | Character value | Required, Positional 2 |
TRIM | Trim blanks before copy | *YES, *NO | Optional, Positional 3 |
Top |
Specifies target CL variable that receives the right-justified text.
This is a required parameter.
Top |
Specifies text that is copied, right-justified to the CL variable specified on the VAR parameter.
This is a required parameter.
Top |
Specifies whether blanks are moved from the value prior to the right-adjust being performed.
Top |
Example 1: Simple Command Example
DCL &TEXTTOT TYPE(*CHAR) LEN(15) DCL %GRANDTOT TYPE(*DEC) LEN(7 2) CLEDIT VAR(&TEXTTOT) VALUE(&GRANDTOT) CLRIGHT VAR(&TEXTTOT) VALUE(&TEXTTOT *TCAT '**')
This command convert the numeric value in &GRANDTOT to character using the COZTOOLS CLEDIT command. Then it adds two asterisks to the result and moves everything, right-justified into the &TEXTTOT variable.
Top |
Top |