Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trimming trailing Spaces

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am getting a concatenating error because of trailing spaces in my output. Does anyone know how to resolve getting rid of the blank trailing spaces? Thanx
 
Depending on the result of your concatenation, you might want to use the EDIT function, or the SUBSTR routine. For example, if you concatenate a 3 byte field to another 3 byte field, and wanted 5 bytes out, you could do the following:

CONC/A6 = FIELD1 | FIELD2;
OUT/A5 = EDIT(CONC,'99999');
 
Actually I am pulling records from the database using dialog manager and don't know exactly how long each row is. So when the results come back, I need their trailing spaces cut off. The trim function doesn't work in the latest realease of WebFocus. Here is the code that is pulling the info. Please Help!

-SET &VAR1 = '"' | &VAR1 | ' ' | &VAR2 | '"';
 
Have you tried the double | for concatenation,
e.g.
-SET &VAR1 = ""||&VAR1||''||&VAR2||"";

cheers
 
If you're going to use STRONG concatenation (||) in the Dialogue Manager, you should have a space BEFORE and AFTER the STRONG concatenation, and, if you want the imbedded blank, you'll need parens, like this:

-SET &VAR1 = '"' | &VAR1 || (' ' | &VAR2 || '"');





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top