%ATRIM

Return an alpha stripped of trailing blanks

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
alpha = %ATRIM(expression)

Return value

alpha

An alpha stripped of its trailing blanks. If expression is null or only contains blanks, the return value is an alpha whose length is 0 bytes. (a)

Arguments

expression

The alpha expression whose blanks will be stripped. (a)

Discussion

On Windows, you can use %ATRIMTOSTRING to perform the same function as %ATRIM but with less overhead when creating a string.

Examples

The example below displays the data in the fields name and comp without any trailing blanks.

subroutine show_rec
record custmast
    id          ,d5
    name        ,a50
    comp        ,a50
proc
    writes(TTCHN, "Name: " + %atrim(name))
    writes(TTCHN, "Company: " + %atrim(comp))
    xreturn
endsubroutine