View previous topic :: View next topic
|
Author |
Message |
gayathrinag
New User
Joined: 16 Oct 2008 Posts: 37 Location: chennai
|
|
|
|
Hi,
This is my requirement.
VAR A W 04 A
VAR B W 04 A
VARC W 08 A
VAR A have values like " ABCD" or "ABC "
VAR B can have values like "1234" or "123 ".
If i concatenate VAR A + VAR B = VAR C
Then I will get
"ABCD1234"
and "ABC 123 ".
In the "ABC 123 " result i have leading spaces. I wanted to remove these spaces.
Please help in solving this issue.
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Define two arrays and move bytes from one array to the other bypassing the unwanted spaces. |
|
Back to top |
|
|
gayathrinag
New User
Joined: 16 Oct 2008 Posts: 37 Location: chennai
|
|
|
|
Hi Dick,
Thanks for the response. Can i have an example for this?
Thanks |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
RTFM
CA-Easytrieve/Plus Reference Guide Chapter 13 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You are familiar with an array?
Once the combined field is built, redefine it with an array of one-byte items.
Then copy the array with new names. Then write a loop to move one byte at a time from the "input" to the "output" (bypassing the unwanted spaces). When the end of the input array is reached, the output array will contain the value you describe.
We will help you if you have problems, but we won't do the work for you.
If you do not have the documentation and your organization is licensed to use the product, all of the material may be downloaded free from CA SUpport. |
|
Back to top |
|
|
|