Could anyone tell me how do you trim the trailing blanks from a CL variable? Any BIF??
which joins two strings with the first string trimmed (without trailing blanks ), TCAT results in a string that has no embedded blanks no matter how many trailing blanks were found in the string
Thanks Giri, but my problem is that i dont want to concatenate 2 strings, just remove the trailing blanks of a variable and send it as a parameter to some other program.
Is this question hinting at another problem. Does this variable contain "garbage" when it reaches the called program....and is this parm Xtra long like 25 + Characters?
If so then make this parameter the last in the plist.
otherwise there is no need to trim the trailing blanks of a character field just clear it first
and move your data into it.
i am calling a standard program which already exists in the application so i cant change the sequence of the parameters. Also, it is only 10 char long.
any ideas on how to fix the problem in the CL which i am making?
Then we are back to giri post. if you are moving a constant into this field then use this:
x = *blank
chgvar &chr10 'ABCxxxxxxx'
chgvar &Chr10 'xxxxxxxxxx'
CHGVAR VAR(%SST(&Chr10 1 3 )) VALUE('ABC')
If possible lets post some of the code and let us know what is your true problem.