On 04-Dec-2014 15:15 -0600, Hoteltravelfundotcom wrote:
I have one field in a file that is char 8
the data has been entered right justified
Is there a q&d way to left justify this field?
Barely quicker than both of the already suggested TRIM [SQL] and %TRIM
[RPG] builtin functions, is a "left trim" function available in both
languages; LTRIM [SQL] and %TRIML [RPG]. The TRIM functions will look for
and trim any trailing blanks.
set the_char8_field = LTRIM(the_char8_field)
The SQL scalar function STRIP can limit the trimming to only blanks; the
LTRIM will trim either blank or hex-zero characters.
set the_char8_field = STRIP(the_char8_field, LEADING, ' ')
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives